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 183363 Details for
Bug 330347
[1.4][1.5][compiler] The performance test FullSourceWorkspaceBuildTests#testFullBuildDefault() fails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch with regression test
patch.txt (text/plain), 3.81 KB, created by
Srikanth Sankaran
on 2010-11-18 01:11:15 EST
(
hide
)
Description:
Patch with regression test
Filename:
MIME Type:
Creator:
Srikanth Sankaran
Created:
2010-11-18 01:11:15 EST
Size:
3.81 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java,v >retrieving revision 1.129 >diff -u -r1.129 BinaryTypeBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java 2 Nov 2010 16:10:54 -0000 1.129 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java 18 Nov 2010 06:08:07 -0000 >@@ -570,8 +570,7 @@ > int[] toSkip = null; > if (iMethods != null) { > total = initialTotal = iMethods.length; >- boolean keepBridgeMethods = sourceLevel < ClassFileConstants.JDK1_5 >- && this.environment.globalOptions.originalComplianceLevel >= ClassFileConstants.JDK1_5; >+ boolean keepBridgeMethods = sourceLevel < ClassFileConstants.JDK1_5; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=330347 > for (int i = total; --i >= 0;) { > IBinaryMethod method = iMethods[i]; > if ((method.getModifiers() & ClassFileConstants.AccSynthetic) != 0) { >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java,v >retrieving revision 1.218 >diff -u -r1.218 BatchCompilerTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 2 Nov 2010 16:19:38 -0000 1.218 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 18 Nov 2010 06:08:10 -0000 >@@ -12019,4 +12019,55 @@ > "", > false /* do not flush output directory */); > } >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=330347 - Test retention of bridge methods. >+public void testBridgeMethodRetention(){ >+ String currentWorkingDirectoryPath = System.getProperty("user.dir"); >+ if (currentWorkingDirectoryPath == null) { >+ fail("BatchCompilerTest#testBridgeMethodRetention could not access the current working directory " + currentWorkingDirectoryPath); >+ } else if (!new File(currentWorkingDirectoryPath).isDirectory()) { >+ fail("BatchCompilerTest#testBridgeMethodRetention current working directory is not a directory " + currentWorkingDirectoryPath); >+ } >+ String lib1Path = currentWorkingDirectoryPath + File.separator + "lib1.jar"; >+ try { >+ Util.createJar( >+ new String[] { >+ "Comparable.java", >+ "public interface Comparable<T> {\n" + >+ " public int compareTo(T o);\n" + >+ "}\n", >+ "Character.java", >+ "public class Character implements Comparable<Character> {\n" + >+ " public int compareTo(Character obj) {\n" + >+ " return 0;\n" + >+ " }\n" + >+ "}\n" >+ }, >+ null, >+ lib1Path, >+ JavaCore.VERSION_1_5); >+ this.runConformTest( >+ new String[] { >+ "src/X.java", >+ "public class X {\n" + >+ " Object fValue;\n" + >+ " public int compareTo(Object obj) {\n" + >+ " return ((Character)fValue).compareTo(obj);\n" + >+ " }\n" + >+ "}\n", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "src/X.java\"" >+ + " -cp lib1.jar" // relative >+ + " -sourcepath \"" + OUTPUT_DIR + File.separator + "src\"" >+ + " -1.4 -g -preserveAllLocals" >+ + " -proceedOnError -referenceInfo" >+ + " -d \"" + OUTPUT_DIR + File.separator + "bin\" ", >+ "", >+ "", >+ true); >+ } catch (IOException e) { >+ System.err.println("BatchCompilerTest#testBridgeMethodRetention could not write to current working directory " + currentWorkingDirectoryPath); >+ } finally { >+ new File(lib1Path).delete(); >+ } >+} > }
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 330347
:
183314
| 183363