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 183337 Details for
Bug 330445
[1.4][1.5][compiler] Properties doesn't match Map<String, String> in 1.4 compliance mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix + regression test
patch_330445.txt (text/plain), 2.95 KB, created by
Olivier Thomann
on 2010-11-17 15:07:49 EST
(
hide
)
Description:
Proposed fix + regression test
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2010-11-17 15:07:49 EST
Size:
2.95 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java,v >retrieving revision 1.377 >diff -u -r1.377 Scope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 1 Nov 2010 14:44:53 -0000 1.377 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 17 Nov 2010 20:07:16 -0000 >@@ -3896,7 +3896,8 @@ > for (int i = 0; i < argLength; i++) { > TypeBinding param = parameters[i]; > TypeBinding arg = arguments[i]; >- if (arg != param && !arg.isCompatibleWith(param)) >+ //https://bugs.eclipse.org/bugs/show_bug.cgi?id=330445 >+ if (arg != param && !arg.erasure().isCompatibleWith(param.erasure())) > return NOT_COMPATIBLE; > } > return COMPATIBLE; >#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.212 >diff -u -r1.212 MethodVerifyTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 7 Nov 2010 02:30:20 -0000 1.212 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 17 Nov 2010 20:07:17 -0000 >@@ -11272,4 +11272,48 @@ > compilerOptions14, > null); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=330445 >+public void test330445() { >+ Map compilerOptions15 = getCompilerOptions(); >+ compilerOptions15.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, CompilerOptions.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[] { >+ "Y.java", >+ "import java.util.Map;\n" + >+ "public class Y {\n" + >+ " static void foo(Map<String, String> map) {\n" + >+ " }\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); >+ compilerOptions14.put(JavaCore.COMPILER_PB_UNNECESSARY_TYPE_CHECK, JavaCore.IGNORE); >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "import java.util.Properties;\n" + >+ "public class X {\n" + >+ " static void bar(Object[] args) {\n" + >+ " Y.foo(new Properties());\n" + >+ " }\r\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 330445
:
183330
|
183337
|
183366