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 175288 Details for
Bug 319425
[compiler] JDT outputs corrupt .class file for problem type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix + regression test
patch_319425.txt (text/plain), 3.47 KB, created by
Olivier Thomann
on 2010-07-26 22:39:21 EDT
(
hide
)
Description:
Proposed fix + regression test
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2010-07-26 22:39:21 EDT
Size:
3.47 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ClassFile.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java,v >retrieving revision 1.201 >diff -u -r1.201 ClassFile.java >--- compiler/org/eclipse/jdt/internal/compiler/ClassFile.java 20 Jul 2010 20:23:19 -0000 1.201 >+++ compiler/org/eclipse/jdt/internal/compiler/ClassFile.java 27 Jul 2010 02:14:40 -0000 >@@ -3857,6 +3857,10 @@ > if (aType.isAnonymousType()) { > accessFlags &= ~ClassFileConstants.AccFinal; > } >+ int finalAbstract = ClassFileConstants.AccFinal | ClassFileConstants.AccAbstract; >+ if ((accessFlags & finalAbstract) == finalAbstract) { >+ accessFlags &= ~finalAbstract; >+ } > this.enclosingClassFile = parentClassFile; > // innerclasses get their names computed at code gen time > >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java,v >retrieving revision 1.28 >diff -u -r1.28 ProblemTypeAndMethodTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java 18 Mar 2010 16:22:35 -0000 1.28 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java 27 Jul 2010 02:14:46 -0000 >@@ -31,7 +31,7 @@ > // All specified tests which does not belong to the class are skipped... > static { > // TESTS_NAMES = new String[] { "test127" }; >-// TESTS_NUMBERS = new int[] { 104 }; >+// TESTS_NUMBERS = new int[] { 107 }; > // TESTS_RANGE = new int[] { 169, 180 }; > } > >@@ -5339,4 +5339,50 @@ > "Listener cannot be resolved to a type\n" + > "----------\n"); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=319425 >+public void test107() { >+ this.runNegativeTest( >+ new String[] { >+ "p/OuterBogus.java", //----------------------------------------------------------------------- >+ "package p;\n" + >+ "abstract final class OuterBogus {\n" + >+ " public static void call() {\n" + >+ " System.out.println(\"Hi. I'm outer bogus.\");\n" + >+ " }\n" + >+ "}", >+ }, >+ "----------\n" + >+ "1. ERROR in p\\OuterBogus.java (at line 2)\n" + >+ " abstract final class OuterBogus {\n" + >+ " ^^^^^^^^^^\n" + >+ "The class OuterBogus can be either abstract or final, not both\n" + >+ "----------\n", >+ null /* no extra class libraries */, >+ true /* flush output directory */, >+ null /* no custom options */, >+ true /* do not generate output */, >+ false /* do not show category */, >+ false /* do not show warning token */, >+ false /* do not skip javac for this peculiar test */, >+ false /* do not perform statements recovery */); >+ this.runConformTest( >+ new String[] { >+ "p/Bogus.java", //----------------------------------------------------------------------- >+ "package p;\n" + >+ "\n" + >+ "public class Bogus {\n" + >+ " public static void main(String[] args) {\n" + >+ " try {\n" + >+ " OuterBogus.call();\n" + >+ " } catch(Error e) {\n" + >+ " System.out.println(\"Compilation error found\");\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ }, >+ "Compilation error found", >+ null, >+ false, >+ 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 319425
:
173893
|
173895
|
173896
|
175251
|
175258
| 175288 |
175495