Possible `javadoc` regression when upgrading from 21 to 25

Hannes Wallnoefer hannes.wallnoefer at oracle.com
Fri Nov 14 18:08:22 UTC 2025


Hi Stefano,

DEFAULT_DIRECTION is not a constant in enum Direction[1], it's a field in the enclosing Sort class[2]. So the new bahaviour of JavaDoc is actually correct.

[1]: https://github.com/spring-projects/spring-batch-extensions/blob/deb1c6d7890d8a25312f765724ec5078aaf8a691/spring-batch-notion/src/main/java/org/springframework/batch/extensions/notion/Sort.java#L111-L133

[2]: https://github.com/spring-projects/spring-batch-extensions/blob/deb1c6d7890d8a25312f765724ec5078aaf8a691/spring-batch-notion/src/main/java/org/springframework/batch/extensions/notion/Sort.java#L38

Unfortunately JavaDoc used to accept this kind of invalid link. It was fixed in 23:

https://bugs.openjdk.org/browse/JDK-8164094

It’s quite an easy mistake to make if you don’t get an error for it. We also had several instances of this in JDK source code.

Hannes


On 11.11.2025, at 17:10, Stefano Cordio <stefano.cordio at gmail.com> wrote:

Hello everyone,

I am upgrading a project's build from Java 21 to Java 25, and Javadoc generation fails with the following error:


[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.11.3:jar (attach-javadoc) on project spring-batch-notion: MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 1
[ERROR] /home/runner/work/spring-batch-extensions/spring-batch-extensions/spring-batch-notion/src/main/java/org/springframework/batch/extensions/notion/Sort.java:29: error: reference not found
[ERROR]  * The direction defaults to {@link Direction#DEFAULT_DIRECTION}.
[ERROR]                                     ^
[ERROR] The generated documentation contains diagnostic markers for invalid input.
[ERROR] 1 error
[ERROR] Command line was: /usr/lib/jvm/temurin-25-jdk-amd64/bin/javadoc -J-Duser.language= -J-Duser.country= @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in '/home/runner/work/spring-batch-extensions/spring-batch-extensions/spring-batch-notion/target/reports/apidocs' dir.

Given that it was working fine on 21, I imagine it could be a regression.

Reference: https://github.com/spring-projects/spring-batch-extensions/pull/192

Thanks in advance for any feedback!

Best regards,
Stefano

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/javadoc-dev/attachments/20251114/8a4eb597/attachment-0001.htm>


More information about the javadoc-dev mailing list