Closed chrisvest closed 3 years ago
The Java Language Specification
says in chapter 13.4.4:
If a change to the direct superclass or the set of direct superinterfaces results in any class or interface no longer being a superclass or superinterface, respectively, then linkage errors may result if pre-existing binaries are loaded with the binary of the modified class. Such changes are not recommended for widely distributed classes.
See also the example in the JLS. If together with the mere superclass also a protected member that the child class accesses is removed, a VerifyError
at runtime is thrown.
When a public class ceases to extend a package-private class, it is flagged as a
SUPERCLASS_REMOVED
incompatibility.I'm not sure this is correct since the super-classes was package-private, and thus not visible or accessible.
Is this a false positive, or is there a subtlety that I've missed?
This was observed in https://github.com/netty/netty/pull/10872