@@ -97,10 +97,6 @@ public class MavenArchiver {
9797 "${artifact.groupIdPath}/${artifact.artifactId}/" + "${artifact.baseVersion}/${artifact.artifactId}-"
9898 + "${artifact.baseVersion}${dashClassifier?}.${artifact.extension}" ;
9999
100- private static final Instant DATE_MIN = Instant .parse ("1980-01-01T00:00:02Z" );
101-
102- private static final Instant DATE_MAX = Instant .parse ("2099-12-31T23:59:59Z" );
103-
104100 private static final List <String > ARTIFACT_EXPRESSION_PREFIXES ;
105101
106102 static {
@@ -719,8 +715,7 @@ public void setBuildJdkSpecDefaultEntry(boolean buildJdkSpecDefaultEntry) {
719715 * @return the parsed timestamp, may be <code>null</code> if <code>null</code> input or input contains only 1
720716 * character
721717 * @since 3.5.0
722- * @throws IllegalArgumentException if the outputTimestamp is neither ISO 8601 nor an integer, or it's not within
723- * the valid range 1980-01-01T00:00:02Z to 2099-12-31T23:59:59Z
718+ * @throws IllegalArgumentException if the outputTimestamp is neither ISO 8601 nor an integer
724719 * @deprecated Use {@link #parseBuildOutputTimestamp(String)} instead.
725720 */
726721 @ Deprecated
@@ -756,10 +751,7 @@ public Date configureReproducible(String outputTimestamp) {
756751 * @return the parsed timestamp as an {@code Optional<Instant>}, {@code empty} if input is {@code null} or input
757752 * contains only 1 character (not a number)
758753 * @since 3.6.0
759- * @throws IllegalArgumentException if the outputTimestamp is neither ISO 8601 nor an integer, or it's not within
760- * the valid range 1980-01-01T00:00:02Z to 2099-12-31T23:59:59Z as defined by
761- * <a href="https://pkwaredownloads.blob.core.windows.net/pem/APPNOTE.txt">ZIP application note</a>,
762- * section 4.4.6.
754+ * @throws IllegalArgumentException if the outputTimestamp is neither ISO 8601 nor an integer.
763755 * @see <a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=74682318">Maven Wiki "Reproducible/Verifiable
764756 * Builds"</a>
765757 */
@@ -777,11 +769,6 @@ public static Optional<Instant> parseBuildOutputTimestamp(String outputTimestamp
777769 // Number representing seconds since the epoch
778770 if (isNumeric (outputTimestamp )) {
779771 final Instant date = Instant .ofEpochSecond (Long .parseLong (outputTimestamp ));
780-
781- if (date .isBefore (DATE_MIN ) || date .isAfter (DATE_MAX )) {
782- throw new IllegalArgumentException (
783- "'" + date + "' is not within the valid range " + DATE_MIN + " to " + DATE_MAX );
784- }
785772 return Optional .of (date );
786773 }
787774
@@ -791,11 +778,6 @@ public static Optional<Instant> parseBuildOutputTimestamp(String outputTimestamp
791778 .withOffsetSameInstant (ZoneOffset .UTC )
792779 .truncatedTo (ChronoUnit .SECONDS )
793780 .toInstant ();
794-
795- if (date .isBefore (DATE_MIN ) || date .isAfter (DATE_MAX )) {
796- throw new IllegalArgumentException (
797- "'" + date + "' is not within the valid range " + DATE_MIN + " to " + DATE_MAX );
798- }
799781 return Optional .of (date );
800782 } catch (DateTimeParseException pe ) {
801783 throw new IllegalArgumentException (
0 commit comments