Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 230308 Details for
Bug 406928
computation of inherited methods seems damaged (affecting @Overrides)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch containing test and minimal fix
patch.txt (text/plain), 3.20 KB, created by
Andrew Clement
on 2013-04-30 12:01:18 EDT
(
hide
)
Description:
Patch containing test and minimal fix
Filename:
MIME Type:
Creator:
Andrew Clement
Created:
2013-04-30 12:01:18 EDT
Size:
3.20 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java >index 653d2b9..46e1043 100644 >--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java >+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java >@@ -13911,4 +13911,33 @@ public void testBug384580() { > "Name clash: The method m() of type Foo has the same erasure as m() of type Y but does not override it\n" + > "----------\n"); > } >+ >+ >+public void test406928() { >+ Map compilerOptions16 = getCompilerOptions(); >+ compilerOptions16.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, CompilerOptions.VERSION_1_6); >+ compilerOptions16.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_6); >+ compilerOptions16.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_6); >+ this.runConformTest( >+ new String[] { >+ "TestPointcut.java", >+ "interface MethodMatcher {\n"+ >+ " boolean matches();\n"+ >+ "}\n"+ >+ "abstract class StaticMethodMatcher implements MethodMatcher { }\n"+ >+ "abstract class StaticMethodMatcherPointcut extends StaticMethodMatcher { }\n"+ >+ "\n"+ >+ "class TestPointcut extends StaticMethodMatcherPointcut {\n"+ >+ " @Override\n"+ >+ " public boolean matches() { return false; } \n"+ >+ "}\n" >+ }, >+ "", >+ null, >+ true, >+ null, >+ compilerOptions16, >+ null); >+} >+ > } >diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java >index 7ea0517..b784223 100644 >--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java >+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java >@@ -577,9 +577,8 @@ void computeInheritedMethods(ReferenceBinding superclass, ReferenceBinding[] sup > > List superIfcList = new ArrayList(); > HashSet seenTypes = new HashSet(); >+ collectAllDistinctSuperInterfaces(superclass, seenTypes, superIfcList); > collectAllDistinctSuperInterfaces(superInterfaces, seenTypes, superIfcList); >- if (superclass != null) >- collectAllDistinctSuperInterfaces(superclass.superInterfaces(), seenTypes, superIfcList); > if (superIfcList.size() == 0) return; > > if (superIfcList.size() == 1) { >@@ -620,6 +619,18 @@ void computeInheritedMethods(ReferenceBinding superclass, ReferenceBinding[] sup > } > } > >+void collectAllDistinctSuperInterfaces(ReferenceBinding superType, Set seen, List result) { >+ // use 'seen' to avoid duplicates, use result to maintain stable order >+ if (superType == null) { >+ return; >+ } >+ collectAllDistinctSuperInterfaces(superType.superInterfaces(), seen, result); >+ ReferenceBinding superSuperType = superType.superclass(); >+ if (superSuperType != null) { >+ collectAllDistinctSuperInterfaces(superSuperType, seen, result); >+ } >+} >+ > void collectAllDistinctSuperInterfaces(ReferenceBinding[] superInterfaces, Set seen, List result) { > // use 'seen' to avoid duplicates, use result to maintain stable order > int length = superInterfaces.length;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 406928
: 230308