gnodet-bot commented on code in PR #599:
URL: https://github.com/apache/maven-jar-plugin/pull/599#discussion_r4089128210
##########
src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java:
##########
@@ -254,6 +268,14 @@ protected ToolProvider getJarTool() throws MojoException {
* Returns the output timestamp or, as a fallback, the {@code
SOURCE_DATE_EPOCH} environment variable.
* If the timestamp is expressed in seconds, it is converted to ISO 8601
format. Otherwise it is returned as-is.
*
+ * <p>When the timestamp is given as a number of seconds and resolves to a
date before {@code EPOCH_MIN}
+ * (1980-01-01T00:00:02Z — the minimum accepted by the {@code jar} tool
due to the ZIP format constraint),
Review Comment:
📝 **Javadoc inaccuracy — inconsistent with `EPOCH_MIN` Javadoc in the same
PR**
This line says the T00:00:02Z minimum is "due to the ZIP format constraint",
but the `EPOCH_MIN` Javadoc added by this PR correctly explains that the
constraint is a **JDK implementation detail** (the `DOSTIME_BEFORE_1980`
sentinel, JDK-8246129) — not a ZIP format requirement. The ZIP format itself
can represent 1980-01-01T00:00:00Z; it is the JDK `jar` tool that rejects it.
The two Javadocs now say inconsistent things in the same PR. Suggested fix:
```suggestion
* (1980-01-01T00:00:02Z — the minimum accepted by the {@code jar} tool;
see {@link #EPOCH_MIN}),
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]