You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix false positive for static inner class implementing parent interface
When a static inner class implements its parent interface (e.g.,
StateObjectFactory
containing StateObjectFactoryProxy implements StateObjectFactory), API
tools was
incorrectly reporting "implements non-API interface" leak warnings.
Root cause: ReferenceExtractor.consider() only checked if referenced
type starts
with current type name (to exclude member type references), but didn't
check the
reverse case where current type is a member of referenced type.
Fix: Added check in ReferenceExtractor.consider() to also exclude
references when
the current type name starts with referencedTypeName + "$", indicating a
member
type referencing its enclosing type.
Test: Added Etest15.java test case and corresponding test methods in
InterfaceExtendsLeak.java to verify static inner classes implementing
parent
interfaces don't produce false positive warnings.
Copy file name to clipboardExpand all lines: apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/leak/InterfaceExtendsLeak.java
0 commit comments