See discussion https://mail.openjdk.org/pipermail/core-libs-dev/2025-April/142301.html
Some class files that reference missing system classes may in practice be unused at runtime (in the particular case, the reference comes from a class that is overwritten by a version entry for that same class).
It is unnecessarily punishing to throw an error in such cases for the missing system class, as jnativescan does now. We will not be able to know for a missing system class whether it defines any restricted methods, but if the class can not be loaded, it is safe to assume that a restricted method from that class can never be called.
Some class files that reference missing system classes may in practice be unused at runtime (in the particular case, the reference comes from a class that is overwritten by a version entry for that same class).
It is unnecessarily punishing to throw an error in such cases for the missing system class, as jnativescan does now. We will not be able to know for a missing system class whether it defines any restricted methods, but if the class can not be loaded, it is safe to assume that a restricted method from that class can never be called.
- links to
-
Commit(master) openjdk/jdk/5f2a604b
-
Review(master) openjdk/jdk/24499