Community
Participate
Working Groups
If I change the superclass of a class of an API class from a non-API (with a mehtod) class to Object, ot if I remove a public method on the non-API super class, no errors are reported on the public subclass. Tests that should be fixed when this bug is addressed: ClassCompatibilityInternalTests.testRemoveInternalMethod*() ClassCompatibilityHierarchyTests.testRemoveIntSuperClassWithMethod*()
Clarification: Removing a method on an internal superclass is found as a problem in a full build, but not incremental.
So the following tests need updating with this bug: - ClassCompatibilityInternalTests.testRemoveInternalMethodI() > This is a dup of bug 243809. And ClassCompatibilityHierarchyTests.testRemoveIntSuperClassWithMethod*()
Created attachment 112814 [details] Proposed fix + regression tests To make sure I don't lose these changes here is a patch. Removed/method errors should be converted to new flag that would then report a better error message.
The patch is not good enough. I need to check if the methods have been moved in the hierarchy before reporting a method removal.
Created attachment 115424 [details] Proposed fix + regression tests Darin, could you please run all the api plugin test suite? Thanks.
Tests are all green.
Fixed and released in HEAD. Darin, please verify.
I found that if an internal superclass is removed that defines a constructor that the subclass does not, it is reported as removed. However, we should ignore constructors. Updated ClassFileComparator. Added regression test: ClassCompatibilityHierarchyTests.testRemoveInternalSuperClassWithConstructorI/F() Please verify, Olivier.
This will be reverted and I'll close it as INVALID. See bug 251606 for details.
Closing as INVALID.