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 60482 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]
Proposed fix
patch_175987_mdl01.txt (text/plain), 2.29 KB, created by
Maxime Daniel
on 2007-03-09 10:23:12 EST
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Maxime Daniel
Created:
2007-03-09 10:23:12 EST
Size:
2.29 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:12:02 -0000 >@@ -31,13 +31,32 @@ > 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 { >+ boolean methodOneAllArgTypesRawChecked = 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 (oneArgs[i].leafComponentType().isRawType()) { >+ if (oneArgs[i].dimensions() == twoArgs[i].dimensions() && oneArgs[i].leafComponentType().isEquivalentTo(twoArgs[i].leafComponentType())) { >+ if (!methodOneAllArgTypesRawChecked) { >+ // check that all parameter types are RAW types, if one is raw, >+ // then all parameters types must be raw or else we have a mismatch >+ for (int j = 0; j < length; j++) >+ if (i != j && oneArgs[j].leafComponentType().isParameterizedType()) >+ return false; >+ methodOneAllArgTypesRawChecked = true; >+ } >+ continue; >+ } >+ } >+ 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