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 181907 Details for
Bug 328827
Compiler fails to recognize a Map when using J2SE 1.4 compiler settings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch under test
patch.txt (text/plain), 3.55 KB, created by
Srikanth Sankaran
on 2010-10-28 03:11:21 EDT
(
hide
)
Description:
Patch under test
Filename:
MIME Type:
Creator:
Srikanth Sankaran
Created:
2010-10-28 03:11:21 EDT
Size:
3.55 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java,v >retrieving revision 1.115 >diff -u -r1.115 ParameterizedTypeBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java 20 Oct 2010 05:46:47 -0000 1.115 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java 28 Oct 2010 07:04:04 -0000 >@@ -694,6 +694,17 @@ > return true; > if (otherType == null) > return false; >+ >+ /* With the hybrid 1.4/1.5+ projects modes, while establishing type equivalence, we need to >+ be prepared for a type such as Map appearing in one of three forms: As (a) a ParameterizedTypeBinding >+ e.g Map<String, String>, (b) as RawTypeBinding Map#RAW and finally (c) as a BinaryTypeBinding >+ When the usage of a type lacks type parameters, whether we land up with the raw form or not depends >+ on whether the underlying type was "seen to be" a generic type in the particular build environment or >+ not. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=328827, >+ */ >+ if (erasure() == otherType.erasure()) >+ return true; >+ > switch(otherType.kind()) { > > case Binding.WILDCARD_TYPE : >#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.204 >diff -u -r1.204 MethodVerifyTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 22 Oct 2010 04:25:43 -0000 1.204 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 28 Oct 2010 07:04:11 -0000 >@@ -11133,4 +11133,53 @@ > "" > ); > } >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=328827 >+public void test328827() { >+ Map compilerOptions15 = getCompilerOptions(); >+ compilerOptions15.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_5); >+ compilerOptions15.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5); >+ compilerOptions15.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_5); >+ this.runConformTest( >+ new String[] { >+ "Map.java", >+ "public interface Map<K,V> {}\n", >+ >+ "EventProperties.java", >+ "public class EventProperties implements Map<String, Object> {}\n", >+ >+ "Event.java", >+ "public class Event {\n" + >+ " public Event(Map<String, ?> properties) {}\n" + >+ "}" >+ }, >+ "", >+ null, >+ true, >+ null, >+ compilerOptions15, >+ null); >+ >+ Map compilerOptions14 = getCompilerOptions(); >+ compilerOptions14.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_2); >+ compilerOptions14.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4); >+ compilerOptions14.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_3); >+ this.runConformTest( >+ new String[] { >+ "Map.java", >+ "public interface Map {}\n", >+ >+ "X.java", >+ "public class X {\n" + >+ " public void start() {\n" + >+ " Event event = new Event(new EventProperties());\n" + >+ " }\n" + >+ "}" >+ }, >+ "", >+ null, >+ false, >+ null, >+ compilerOptions14, >+ null); >+} > }
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 328827
:
181835
|
181907
|
181911
|
181920