Build failure on JDK 23

Pavel Rappo pavel.rappo at gmail.com
Thu Jun 5 21:21:01 UTC 2025


I've just cloned jcstress and tried to build it on my machine, which
has JDK 23 installed. The build failed as follows:

[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] /Users/pavelrappo/repos/jcstress/jcstress-core/src/main/java/org/openjdk/jcstress/util/Multimap.java:[25,1]
documentation comment is not attached to any declaration
[WARNING] /Users/pavelrappo/repos/jcstress/jcstress-core/src/main/java/org/openjdk/jcstress/util/TreesetMultimap.java:[25,1]
documentation comment is not attached to any declaration
[WARNING] /Users/pavelrappo/repos/jcstress/jcstress-core/src/main/java/org/openjdk/jcstress/util/TreeMultimap.java:[25,1]
documentation comment is not attached to any declaration
[WARNING] /Users/pavelrappo/repos/jcstress/jcstress-core/src/main/java/org/openjdk/jcstress/util/HashMultiset.java:[25,1]
documentation comment is not attached to any declaration
[WARNING] /Users/pavelrappo/repos/jcstress/jcstress-core/src/main/java/org/openjdk/jcstress/util/Multiset.java:[25,1]
documentation comment is not attached to any declaration
[INFO] 5 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/pavelrappo/repos/jcstress/jcstress-core/src/main/java/org/openjdk/jcstress/util/Multimap.java:
warnings found and -Werror specified
[INFO] 1 error

The reason the build failed is that a new warning introduced in JDK 23
[^1] is being triggered on some files, and that warning is being
treated as an error.

There are a few ways to fix this. I would recommend fixing the
offending files rather than silencing the warning. Firstly, these
files have duplicating copyright headers. Secondly, these copyright
headers use /** instead of /* as an opener for their comment. If
either of these wasn't true, the files would not have triggered the
warning.

Maybe there are other suggestions? If not, I can file a pull request
to fix the files.

[^1]: https://bugs.openjdk.org/browse/JDK-8329137


More information about the jcstress-dev mailing list