Next: Example Revisited: Programmer &
Up: Other Changes
Previous: Tagging and exception handling
Miscellaneous
- (32,45) Changing a signature has the combined effect of removing the old member and adding a new one.
- (33) Adding or deleting a native modifier is considered compatible. The support for this is trivial. Other changes related to native methods are beyond the scope of the JLS.
- (30,31,43) Adding a field/method is a compatible change, except in the
following cases.
- The new field/method shadows/overrides an old one, and the new field/method is less accessible than the old one.
- The new field/method shadows/overrides an old one, and the new field/method is a static (instance) member but the old one is an instance (static) member.
- The new field in an interface may shadow a field in other classes.
These cases are handled as (25), (27) and (26).
- (44) Adding methods to interfaces is listed as a binary compatible change in the JLS. However, it MAY break compatibility with pre-existing binaries [8].
Based on our support for interfaces in Section 4.3,
together with the technique described for (28), we can build the itable of an interface with pointers to specific exception code. If a class which implements the interface does not define all the interface methods, the exception code is inherited.
Next: Example Revisited: Programmer &
Up: Other Changes
Previous: Tagging and exception handling
Dachuan Yu
2002-05-23