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 92492 Details for
Bug 219625
[1.5][compiler] Generics related AbstractMethodError that is not given by Sun Java
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]
Proposed patch with testcase
patch.txt (text/plain), 3.75 KB, created by
Kent Johnson
on 2008-03-13 15:03:35 EDT
(
hide
)
Description:
Proposed patch with testcase
Filename:
MIME Type:
Creator:
Kent Johnson
Created:
2008-03-13 15:03:35 EDT
Size:
3.75 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java,v >retrieving revision 1.144 >diff -u -r1.144 MethodVerifyTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 22 Feb 2008 09:54:21 -0000 1.144 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 13 Mar 2008 19:03:02 -0000 >@@ -8203,4 +8203,39 @@ > "#method3(D1<String>, D1<String>, D1<java.util.Date>, D1[])#method3(D1<String>, D1<String>, D1<java.util.Date>, D2[])"); > } > >-} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=219625 >+public void test152() { >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " static <T> void feedFoosValueIntoFoo(Foo<T> foo) {\n" + >+ " foo.doSomething(foo.getValue());\n" + >+ " }\n" + >+ " static void testTypedString() {\n" + >+ " ConcreteFoo foo = new ConcreteFoo();\n" + >+ " foo.doSomething(foo.getValue());\n" + >+ " }\n" + >+ " static void testGenericString() {\n" + >+ " feedFoosValueIntoFoo(new ConcreteFoo());\n" + >+ " }\n" + >+ " public static void main(String[] args) {\n" + >+ " testTypedString();\n" + >+ " testGenericString();\n" + >+ " System.out.print(1);\n" + >+ " }\n" + >+ "}\n" + >+ "interface Foo<T> {\n" + >+ " T getValue();\n" + >+ " void doSomething(T o);\n" + >+ "}\n" + >+ "abstract class AbstractFoo<T> implements Foo<T> {\n" + >+ " public void doSomething(String o) {}\n" + >+ "}\n" + >+ "class ConcreteFoo extends AbstractFoo<String> {\n" + >+ " public String getValue() { return null; }\n" + >+ "}" >+ }, >+ "1" >+ ); >+}} >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java,v >retrieving revision 1.84 >diff -u -r1.84 MethodVerifier15.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java 8 Nov 2007 16:29:27 -0000 1.84 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java 13 Mar 2008 19:03:03 -0000 >@@ -123,9 +123,10 @@ > } > } > // check whether bridge method is already defined above for interface methods >- if (originalInherited.declaringClass.isInterface() >- && this.type.superclass.erasure().findSuperTypeOriginatingFrom(originalInherited.declaringClass) == null) { >- this.type.addSyntheticBridgeMethod(originalInherited, concreteMethod.original()); >+ if (originalInherited.declaringClass.isInterface()) { >+ if ((concreteMethod.declaringClass == this.type.superclass && this.type.superclass.isParameterizedType()) >+ || this.type.superclass.erasure().findSuperTypeOriginatingFrom(originalInherited.declaringClass) == null) >+ this.type.addSyntheticBridgeMethod(originalInherited, concreteMethod.original()); > } > } > } >@@ -703,7 +704,7 @@ > inheritedMethod = computeSubstituteMethod(inheritedMethod, existingMethod); > return inheritedMethod != null > && inheritedMethod.returnType == existingMethod.returnType // keep around to produce bridge methods >- && super.isInterfaceMethodImplemented(inheritedMethod, existingMethod, superType); >+ && doesMethodOverride(existingMethod, inheritedMethod); > } > public boolean isMethodSubsignature(MethodBinding method, MethodBinding inheritedMethod) { > if (!org.eclipse.jdt.core.compiler.CharOperation.equals(method.selector, inheritedMethod.selector))
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 219625
:
90208
| 92492