On 12/30/2022 4:12 AM, Glavo wrote:
Java 9 overrides the rewind, flip and other methods of Buffer in subclasses of Buffer such as ByteBuffer.
The methods in these subclasses do not add @since 9 to javadoc.

I think this is an oversight, because this modification destroys some code. When compiling them with JDK 9+ and using the -target 8 option instead of -release 8,
the generated class file crashes when running in Java 8.

Which is exactly why compiling with "javac -source $OLD -target $OLD" *without* setting the bootclasspath was not a recommended option and started generating a warning as of JDK 7:

https://web.archive.org/web/20101225145622/http://blogs.sun.com/darcy/entry/bootclasspath_older_source


IDEs cannot detect this error because there is no @since document.
Therefore, I think it is important to add @since to them, and they need to be back ported to Java 11/17.


The solution to a misconfigured build is to configure the build properly, which includes using --release $FOO where available.

-Joe

Reply via email to