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 195489 Details for
Bug 345569
FUP of bug 345334: CodeSnippetTest has lot of failures
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
proposed fix + tests
patch345569.txt (text/plain), 2.81 KB, created by
Ayushman Jain
on 2011-05-12 07:42:49 EDT
(
hide
)
Description:
proposed fix + tests
Filename:
MIME Type:
Creator:
Ayushman Jain
Created:
2011-05-12 07:42:49 EDT
Size:
2.81 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: eval/org/eclipse/jdt/internal/eval/CodeSnippetToCuMapper.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetToCuMapper.java,v >retrieving revision 1.70 >diff -u -r1.70 CodeSnippetToCuMapper.java >--- eval/org/eclipse/jdt/internal/eval/CodeSnippetToCuMapper.java 11 May 2011 14:58:56 -0000 1.70 >+++ eval/org/eclipse/jdt/internal/eval/CodeSnippetToCuMapper.java 12 May 2011 11:38:45 -0000 >@@ -143,7 +143,7 @@ > } > } > // run() method declaration >- if (this.complianceVersion >= ClassFileConstants.JDK1_6) { >+ if (this.complianceVersion >= ClassFileConstants.JDK1_5) { > buffer.append("@Override "); //$NON-NLS-1$ > } > buffer.append("public void run() throws Throwable {").append(lineSeparator); //$NON-NLS-1$ >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/eval/CodeSnippetTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/CodeSnippetTest.java,v >retrieving revision 1.20 >diff -u -r1.20 CodeSnippetTest.java >--- src/org/eclipse/jdt/core/tests/eval/CodeSnippetTest.java 11 May 2011 14:58:56 -0000 1.20 >+++ src/org/eclipse/jdt/core/tests/eval/CodeSnippetTest.java 12 May 2011 11:38:46 -0000 >@@ -57,8 +57,6 @@ > defaultOptions.put(CompilerOptions.OPTION_ReportLocalVariableHiding, CompilerOptions.WARNING); > defaultOptions.put(CompilerOptions.OPTION_ReportUnusedPrivateMember, CompilerOptions.IGNORE); > defaultOptions.put(CompilerOptions.OPTION_ReportPossibleAccidentalBooleanAssignment, CompilerOptions.WARNING); >- defaultOptions.put(CompilerOptions.OPTION_ReportMissingOverrideAnnotation, CompilerOptions.ERROR); >- defaultOptions.put(CompilerOptions.OPTION_ReportMissingOverrideAnnotationForInterfaceMethodImplementation, CompilerOptions.ERROR); > return defaultOptions; > } > /** >@@ -911,4 +909,22 @@ > this.context.setImports(new char[0][]); > } > } >+/** >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=345334 >+ */ >+public void testBug345334() { >+ Map options = getCompilerOptions(); >+ if (this.complianceLevel == ClassFileConstants.JDK1_5) { >+ options.put(CompilerOptions.OPTION_ReportMissingOverrideAnnotation, CompilerOptions.ERROR); >+ } else if (this.complianceLevel >= ClassFileConstants.JDK1_6) { >+ options.put(CompilerOptions.OPTION_ReportMissingOverrideAnnotation, CompilerOptions.ERROR); >+ options.put(CompilerOptions.OPTION_ReportMissingOverrideAnnotationForInterfaceMethodImplementation, CompilerOptions.ERROR); >+ } >+ evaluateWithExpectedDisplayString( >+ options, >+ buildCharArray(new String[] { >+ "return \"SUCCESS\";\n", >+ }), >+ "SUCCESS".toCharArray()); >+} > }
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 345569
: 195489