ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject Re: cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/util DateUtilsTest.java
Date Tue, 19 Feb 2002 18:39:43 GMT

----- Original Message -----
From: <bodewig@apache.org>
To: <jakarta-ant-cvs@apache.org>
Sent: Monday, February 18, 2002 23:51
Subject: cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/util
DateUtilsTest.java


> bodewig     02/02/18 23:51:12
>
>   Modified:    src/main/org/apache/tools/ant/taskdefs Zip.java
>                src/main/org/apache/tools/ant/util DateUtils.java
>                src/testcases/org/apache/tools/ant/util DateUtilsTest.java
>   Log:
>   please don't use <zip>'s file attribute
>
>   Revision  Changes    Path
>   1.62      +17 -3
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java
>
>   Index: Zip.java
>   ===================================================================
>   RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java,v
>   retrieving revision 1.61
>   retrieving revision 1.62
>   diff -u -r1.61 -r1.62
>   --- Zip.java 8 Feb 2002 14:17:24 -0000 1.61
>   +++ Zip.java 19 Feb 2002 07:51:12 -0000 1.62
>   @@ -62,12 +62,13 @@
>    import java.io.ByteArrayOutputStream;
>    import java.io.ByteArrayInputStream;
>
>   +import java.util.Calendar;
>    import java.util.Hashtable;
>    import java.util.Stack;
>   -
>    import java.util.Vector;
>    import java.util.zip.CRC32;
>    import java.util.zip.ZipInputStream;
>   +
>    import org.apache.tools.ant.BuildException;
>    import org.apache.tools.ant.FileScanner;
>    import org.apache.tools.ant.Project;
>   @@ -76,6 +77,7 @@
>    import org.apache.tools.ant.types.EnumeratedAttribute;
>    import org.apache.tools.ant.types.ZipFileSet;
>    import org.apache.tools.ant.types.ZipScanner;
>   +import org.apache.tools.ant.util.DateUtils;
>    import org.apache.tools.ant.util.FileUtils;
>    import org.apache.tools.ant.util.SourceFileScanner;
>    import org.apache.tools.ant.util.MergingMapper;
>   @@ -135,9 +137,21 @@
>         * @deprecated Use setDestFile(File) instead
>         */
>        public void setFile(File file) {
>   -        log("DEPRECATED - The file attribute has been renamed
destfile."
>   -            +" This attribute will be unsupported before Ant1.5 is
released",
>   +        log("DEPRECATED - The file attribute has been renamed
destfile.",
>   +            Project.MSG_ERR);
>   +        log("This attribute will be unsupported before Ant1.5 is
released.",
>   +            Project.MSG_ERR);
>   +
>   +        log("Be aware that the effect of using the file attribute
depends on",
>                Project.MSG_ERR);
>   +        log("the phase of the moon.", Project.MSG_WARN);
>   +        int phase = DateUtils.getPhaseOfMoon(Calendar.getInstance());
>   +        if (phase == 4) {
>   +            log("You are lucky!  Full moon tonight.");
>   +        } else if (phase == 0) {
>   +            log("Be careful!  New moon tonight.", Project.MSG_WARN);
>   +        }
>   +
>            setDestFile(file);
>        }
>


I like this. Are you trying for an entry into the phase-of-the-moon category
in esr's jargon file? If so it has to be a bit more accidental than this,
like with cern's LEP collider changing shape with the tides and that
effecting timing of the whole system.




--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message