@@ -97,10 +97,6 @@ public class MavenArchiver {
97
97
"${artifact.groupIdPath}/${artifact.artifactId}/" + "${artifact.baseVersion}/${artifact.artifactId}-"
98
98
+ "${artifact.baseVersion}${dashClassifier?}.${artifact.extension}" ;
99
99
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
-
104
100
private static final List <String > ARTIFACT_EXPRESSION_PREFIXES ;
105
101
106
102
static {
@@ -719,8 +715,7 @@ public void setBuildJdkSpecDefaultEntry(boolean buildJdkSpecDefaultEntry) {
719
715
* @return the parsed timestamp, may be <code>null</code> if <code>null</code> input or input contains only 1
720
716
* character
721
717
* @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
724
719
* @deprecated Use {@link #parseBuildOutputTimestamp(String)} instead.
725
720
*/
726
721
@ Deprecated
@@ -756,10 +751,7 @@ public Date configureReproducible(String outputTimestamp) {
756
751
* @return the parsed timestamp as an {@code Optional<Instant>}, {@code empty} if input is {@code null} or input
757
752
* contains only 1 character (not a number)
758
753
* @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.
763
755
* @see <a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=74682318">Maven Wiki "Reproducible/Verifiable
764
756
* Builds"</a>
765
757
*/
@@ -777,11 +769,6 @@ public static Optional<Instant> parseBuildOutputTimestamp(String outputTimestamp
777
769
// Number representing seconds since the epoch
778
770
if (isNumeric (outputTimestamp )) {
779
771
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
- }
785
772
return Optional .of (date );
786
773
}
787
774
@@ -791,11 +778,6 @@ public static Optional<Instant> parseBuildOutputTimestamp(String outputTimestamp
791
778
.withOffsetSameInstant (ZoneOffset .UTC )
792
779
.truncatedTo (ChronoUnit .SECONDS )
793
780
.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
- }
799
781
return Optional .of (date );
800
782
} catch (DateTimeParseException pe ) {
801
783
throw new IllegalArgumentException (
0 commit comments