RFR: 8339550: Enable javac lint options for tests

Andy Goryachev angorya at openjdk.org
Fri Sep 13 18:40:12 UTC 2024


On Fri, 13 Sep 2024 14:52:22 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

> This PR enables the `removal` lint option, along with `-Werror`, for compiling shims and test classes. In order to do that, I had to also do the following:
> 
> * Disable the `options` lint warning as is done for the `javafx.swing` module, and for the same reason: using `-source NN -release NN` produces a warning that we know about and don't care to see (and will fail the build with `-Werror`)
> * Change the `apiguardian` dependency from `testRuntimeOnly` to `testImplementation`, since it needs to be a compile-time dependency to avoid many compile-time warnings for a missing annotation
> * Add a missing `@SuppressWarnings("removal")` in one place
> * Fix the varargs warnings filed in [JDK-8338340](https://bugs.openjdk.org/browse/JDK-8338340)
> 
> I tested locally and with our CI test system. The GHA build passes.

The build fails with inexact types in varargs as expected.
Now I can finally enable this warning in Eclipse.
Nice work, thank you!

![Screenshot 2024-09-13 at 11 35 32](https://github.com/user-attachments/assets/2840b2d4-feea-458b-a087-34692a9b46bb)

-------------

Marked as reviewed by angorya (Reviewer).

PR Review: https://git.openjdk.org/jfx/pull/1565#pullrequestreview-2303818392


More information about the openjfx-dev mailing list