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 60483 Details for
Bug 175987
[1.5][compiler] Missing error when implementing a method with a mix of parameterized and raw generics
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Alternative fix
patch_175987_mdl02.txt (text/plain), 2.64 KB, created by
Maxime Daniel
on 2007-03-09 10:24:58 EST
(
hide
)
Description:
Alternative fix
Filename:
MIME Type:
Creator:
Maxime Daniel
Created:
2007-03-09 10:24:58 EST
Size:
2.64 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#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.69 >diff -u -r1.69 MethodVerifier15.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java 6 Mar 2007 02:38:51 -0000 1.69 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java 9 Mar 2007 15:01:25 -0000 >@@ -31,13 +31,41 @@ > int length = oneArgs.length; > if (length != twoArgs.length) return false; > >- for (int i = 0; i < length; i++) { >- if (!areTypesEqual(oneArgs[i], twoArgs[i])) { >- // methods with raw parameters are considered equal to inherited methods with parameterized parameters for backwards compatibility >- if (!one.declaringClass.isInterface() && oneArgs[i].leafComponentType().isRawType()) >- if (oneArgs[i].dimensions() == twoArgs[i].dimensions() && oneArgs[i].leafComponentType().isEquivalentTo(twoArgs[i].leafComponentType())) >- continue; >- return false; >+ if (one.declaringClass.isInterface()) { >+ for (int i = 0; i < length; i++) { >+ if (!areTypesEqual(oneArgs[i], twoArgs[i])) { >+ return false; >+ } >+ } >+ } else { >+ // methods with raw parameters are considered equal to inherited methods >+ // with parameterized parameters for backwards compatibility, need a more complex check >+ int i; >+ norawyet: for (i = 0; i < length; i++) { >+ if (!areTypesEqual(oneArgs[i], twoArgs[i])) { >+ if (oneArgs[i].leafComponentType().isRawType()) { >+ if (oneArgs[i].dimensions() == twoArgs[i].dimensions() && oneArgs[i].leafComponentType().isEquivalentTo(twoArgs[i].leafComponentType())) { >+ // one parameter type is raw, hence all parameters types must be raw >+ // or non generic or else we have a mismatch check backwards >+ for (int j = 0; j < i; j++) >+ if (oneArgs[j].leafComponentType().isParameterizedType()) >+ return false; >+ // continue in all raw mode >+ break norawyet; >+ } >+ } >+ return false; >+ } >+ } >+ // all raw mode for remaining parameters (if any) >+ for (i++; i < length; i++) { >+ if (oneArgs[i].leafComponentType().isParameterizedType() || >+ !areTypesEqual(oneArgs[i], twoArgs[i]) && >+ (!oneArgs[i].leafComponentType().isRawType() || >+ oneArgs[i].dimensions() != twoArgs[i].dimensions() || >+ !oneArgs[i].leafComponentType().isEquivalentTo(twoArgs[i].leafComponentType()))) { >+ return false; >+ } > } > } > return true;
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 175987
:
60385
|
60482
|
60483
|
60486