From 49fd6018e63cdc3e588fa1738322fa45acad7444 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Thu, 28 Sep 2017 12:31:04 +0200 Subject: [PATCH] record change, add @since tags, closes #36 --- WHATSNEW | 4 ++++ src/main/org/apache/tools/ant/taskdefs/Zip.java | 4 +++- src/main/org/apache/tools/ant/util/DateUtils.java | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/WHATSNEW b/WHATSNEW index 9a95ccb64..d217bb83e 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -59,6 +59,10 @@ Other changes: it uploads, if the preserveLastModified attribute is set to true for that task + * zip and the related tasks can now set the modfication time of all + entries to a fixed timestamp. + Github Pull Request #36 + Changes from Ant 1.10.0 TO Ant 1.10.1 ===================================== diff --git a/src/main/org/apache/tools/ant/taskdefs/Zip.java b/src/main/org/apache/tools/ant/taskdefs/Zip.java index d94f2ceb4..41686041b 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Zip.java +++ b/src/main/org/apache/tools/ant/taskdefs/Zip.java @@ -118,7 +118,7 @@ public class Zip extends MatchingTask { private final List addedFiles = new Vector<>(); private String fixedModTime = null; // User-provided. - protected long modTimeMillis = 0; // Calculated. + private long modTimeMillis = 0; // Calculated. /** * If this flag is true, execute() will run most operations twice, @@ -588,6 +588,7 @@ public class Zip extends MatchingTask { * that you must choose one of a or b, and [c] indicates that you * may use or omit c. ±ZZZZ is the timezone offset, and may be * literally "Z" to mean GMT. + * @since Ant 1.10.2 */ public void setModificationtime(String time) { fixedModTime = time; @@ -596,6 +597,7 @@ public class Zip extends MatchingTask { /** * The file modification time previously provided to * {@link #setModificationtime(String)} or {@code null} if unset. + * @since Ant 1.10.2 */ public String getModificationtime() { return fixedModTime; diff --git a/src/main/org/apache/tools/ant/util/DateUtils.java b/src/main/org/apache/tools/ant/util/DateUtils.java index e487f6c7d..70e901398 100644 --- a/src/main/org/apache/tools/ant/util/DateUtils.java +++ b/src/main/org/apache/tools/ant/util/DateUtils.java @@ -95,6 +95,7 @@ public final class DateUtils { * Provides a thread-local US-style date format. Exactly as used by * {@code }, to minute precision: * {@code SimpleDateFormat("MM/dd/yyyy hh:mm a", Locale.US)} + * @since Ant 1.10.2 */ public static final ThreadLocal EN_US_DATE_FORMAT_MIN = new ThreadLocal() { @@ -108,6 +109,7 @@ public final class DateUtils { * Provides a thread-local US-style date format. Exactly as used by * {@code }, to second precision: * {@code SimpleDateFormat("MM/dd/yyyy hh:mm:ss a", Locale.US)} + * @since Ant 1.10.2 */ public static final ThreadLocal EN_US_DATE_FORMAT_SEC = new ThreadLocal() { @@ -349,6 +351,7 @@ public final class DateUtils { * where {a|b} indicates that you must choose one of a or b, and [c] * indicates that you may use or omit c. ±ZZZZ is the timezone offset, and * may be literally "Z" to mean GMT. + * @since Ant 1.10.2 */ public static Date parseLenientDateTime(String dateStr) throws ParseException { try {