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 154812 Details for
Bug 296998
Unused imports should not prevent execution
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix + regression tests
patch_296998.txt (text/plain), 25.96 KB, created by
Olivier Thomann
on 2009-12-18 14:38:56 EST
(
hide
)
Description:
Proposed fix + regression tests
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2009-12-18 14:38:56 EST
Size:
25.96 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.compiler.tool >Index: src/org/eclipse/jdt/internal/compiler/tool/Options.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/Options.java,v >retrieving revision 1.9 >diff -u -r1.9 Options.java >--- src/org/eclipse/jdt/internal/compiler/tool/Options.java 2 Oct 2009 23:11:12 -0000 1.9 >+++ src/org/eclipse/jdt/internal/compiler/tool/Options.java 18 Dec 2009 19:42:12 -0000 >@@ -25,6 +25,7 @@ > ZERO_ARGUMENT_OPTIONS = new HashSet<String>(); > Options.ZERO_ARGUMENT_OPTIONS.add("-progress");//$NON-NLS-1$ > Options.ZERO_ARGUMENT_OPTIONS.add("-proceedOnError");//$NON-NLS-1$ >+ Options.ZERO_ARGUMENT_OPTIONS.add("-proceedOnError:Fatal");//$NON-NLS-1$ > Options.ZERO_ARGUMENT_OPTIONS.add("-time");//$NON-NLS-1$ > Options.ZERO_ARGUMENT_OPTIONS.add("-v");//$NON-NLS-1$ > Options.ZERO_ARGUMENT_OPTIONS.add("-version");//$NON-NLS-1$ >#P org.eclipse.jdt.compiler.tool.tests >Index: src/org/eclipse/jdt/compiler/tool/tests/CompilerToolTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolTests.java,v >retrieving revision 1.19 >diff -u -r1.19 CompilerToolTests.java >--- src/org/eclipse/jdt/compiler/tool/tests/CompilerToolTests.java 29 Sep 2009 18:33:30 -0000 1.19 >+++ src/org/eclipse/jdt/compiler/tool/tests/CompilerToolTests.java 18 Dec 2009 19:42:13 -0000 >@@ -109,6 +109,7 @@ > "-X", > "-O", > "-proceedOnError", >+ "-proceedOnError:Fatal", > "-verbose", > "-referenceInfo", > "-progress", >#P org.eclipse.jdt.core >Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v >retrieving revision 1.346 >diff -u -r1.346 Main.java >--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 7 Oct 2009 14:58:11 -0000 1.346 >+++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 18 Dec 2009 19:42:14 -0000 >@@ -2023,8 +2023,19 @@ > this.showProgress = true; > continue; > } >- if (currentArg.equals("-proceedOnError")) { //$NON-NLS-1$ >+ if (currentArg.startsWith("-proceedOnError")) { //$NON-NLS-1$ > mode = DEFAULT; >+ int length = currentArg.length(); >+ if (length > 15) { >+ if (currentArg.equals("-proceedOnError:Fatal")) { //$NON-NLS-1$ >+ this.options.put(CompilerOptions.OPTION_FatalOptionalError, CompilerOptions.ENABLED); >+ } else { >+ throw new IllegalArgumentException( >+ this.bind("configure.invalidWarningConfiguration", currentArg)); //$NON-NLS-1$ >+ } >+ } else { >+ this.options.put(CompilerOptions.OPTION_FatalOptionalError, CompilerOptions.DISABLED); >+ } > this.proceedOnError = true; > continue; > } >Index: batch/org/eclipse/jdt/internal/compiler/batch/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties,v >retrieving revision 1.867 >diff -u -r1.867 messages.properties >--- batch/org/eclipse/jdt/internal/compiler/batch/messages.properties 16 Dec 2009 20:14:50 -0000 1.867 >+++ batch/org/eclipse/jdt/internal/compiler/batch/messages.properties 18 Dec 2009 19:42:14 -0000 >@@ -215,8 +215,10 @@ > \ default)\n\ > \ -log <file> log to a file. If the file extension is ''.xml'', then\n\ > \ the log will be a xml file.\n\ >-\ -proceedOnError do not stop at first error, dumping class files with\n\ >+\ -proceedOnError[:Fatal]\n\ >+\ do not stop at first error, dumping class files with\n\ > \ problem methods\n\ >+\ With ":Fatal", all optional errors are treated as fatal\n\ > \ -verbose enable verbose output\n\ > \ -referenceInfo compute reference info\n\ > \ -progress show progress (only in -log mode)\n\ >Index: compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java,v >retrieving revision 1.174 >diff -u -r1.174 CodeStream.java >--- compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java 15 Oct 2009 00:21:38 -0000 1.174 >+++ compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java 18 Dec 2009 19:42:15 -0000 >@@ -4904,7 +4904,7 @@ > if (index > 0) { > // the string already exists inside the constant pool > // we reuse the same index >- ldcForIndex(index, constantChars); >+ ldcForIndex(index); > } else { > // the string is too big to be utf8-encoded in one pass. > // we have to split it into different pieces. >@@ -4949,7 +4949,7 @@ > System.arraycopy(constantChars, 0, subChars, 0, i); > System.arraycopy(utf8encoding, 0, utf8encoding = new byte[length], 0, length); > index = this.constantPool.literalIndex(subChars, utf8encoding); >- ldcForIndex(index, subChars); >+ ldcForIndex(index); > // write the remaining part > invokeStringConcatenationStringConstructor(); > while (i < constantLength) { >@@ -4986,7 +4986,7 @@ > System.arraycopy(constantChars, startIndex, subChars, 0, newCharLength); > System.arraycopy(utf8encoding, 0, utf8encoding = new byte[length], 0, length); > index = this.constantPool.literalIndex(subChars, utf8encoding); >- ldcForIndex(index, subChars); >+ ldcForIndex(index); > // now on the stack it should be a StringBuffer and a string. > invokeStringConcatenationAppendForType(TypeIds.T_JavaLangString); > } >@@ -5050,7 +5050,7 @@ > writeUnsignedShort(index); > } > >-public void ldcForIndex(int index, char[] constant) { >+public void ldcForIndex(int index) { > this.stackDepth++; > if (this.stackDepth > this.stackMax) { > this.stackMax = this.stackDepth; >Index: compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java,v >retrieving revision 1.225 >diff -u -r1.225 CompilerOptions.java >--- compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 26 Nov 2009 16:20:04 -0000 1.225 >+++ compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 18 Dec 2009 19:42:16 -0000 >@@ -1006,8 +1006,8 @@ > // suppress warning annotation > this.suppressWarnings = true; > >- // treat optional error as fatal or just like warning? >- this.treatOptionalErrorAsFatal = true; >+ // treat optional error as non fatal >+ this.treatOptionalErrorAsFatal = false; > > // parser perform statements recovery > this.performMethodsFullRecovery = true; >#P org.eclipse.jdt.core.tests >Index: Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/NegativeTest.java >=================================================================== >RCS file: /home/cvs/numbat/org.eclipse.jdt.core.tests/Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/NegativeTest.java,v >retrieving revision 1.328 >diff -u -r1.328 NegativeTest.java >--- Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/NegativeTest.java 17 Aug 2009 17:45:39 -0000 1.328 >+++ Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/NegativeTest.java 18 Dec 2009 19:42:17 -0000 >@@ -14247,6 +14247,7 @@ > public void test382() { > Map customOptions = getCompilerOptions(); > customOptions.put(CompilerOptions.OPTION_ReportUndocumentedEmptyBlock, CompilerOptions.ERROR); >+ customOptions.put(CompilerOptions.OPTION_ReportDeadCode, CompilerOptions.IGNORE); > runNegativeTest( > true, > new String[] { >@@ -14303,6 +14304,8 @@ > public void test386() { > Map customOptions = getCompilerOptions(); > customOptions.put(CompilerOptions.OPTION_ReportUndocumentedEmptyBlock, CompilerOptions.ERROR); >+ customOptions.put(CompilerOptions.OPTION_ReportDeadCode, CompilerOptions.IGNORE); >+ customOptions.put(CompilerOptions.OPTION_ReportDeadCodeInTrivialIfStatement, CompilerOptions.IGNORE); > runNegativeTest( > true, > new String[] { >@@ -14528,6 +14531,7 @@ > public void test392() { > Map customOptions = getCompilerOptions(); > customOptions.put(CompilerOptions.OPTION_ReportUndocumentedEmptyBlock, CompilerOptions.ERROR); >+ customOptions.put(CompilerOptions.OPTION_ReportUnusedPrivateMember, CompilerOptions.IGNORE); > runNegativeTest( > true, > new String[] { >@@ -14582,6 +14586,8 @@ > public void test394() { > Map customOptions = getCompilerOptions(); > customOptions.put(CompilerOptions.OPTION_ReportUndocumentedEmptyBlock, CompilerOptions.ERROR); >+ customOptions.put(CompilerOptions.OPTION_ReportNullReference, CompilerOptions.IGNORE); >+ customOptions.put(CompilerOptions.OPTION_ReportPotentialNullReference, CompilerOptions.IGNORE); > runNegativeTest( > true, > new String[] { >@@ -14811,6 +14817,7 @@ > public void test401() { > Map customOptions = getCompilerOptions(); > customOptions.put(CompilerOptions.OPTION_ReportUnqualifiedFieldAccess, CompilerOptions.ERROR); >+ customOptions.put(CompilerOptions.OPTION_ReportUnusedPrivateMember, CompilerOptions.IGNORE); > runNegativeTest( > true, > new String[] { >#P org.eclipse.jdt.core.tests.builder >Index: src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java,v >retrieving revision 1.55 >diff -u -r1.55 MultiProjectTests.java >--- src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java 27 Jun 2008 16:02:02 -0000 1.55 >+++ src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java 18 Dec 2009 19:42:17 -0000 >@@ -991,7 +991,7 @@ > ); > > fullBuild(); >- expectingSpecificProblemFor(project2Path, new Problem("", "Access restriction: The type B is not accessible due to restriction on required project Project1", d, 23, 35, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ >+ expectingSpecificProblemFor(project2Path, new Problem("", "Access restriction: The type B is not accessible due to restriction on required project Project1", d, 23, 35, CategorizedProblem.CAT_RESTRICTION, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ > } > > /* >@@ -1042,7 +1042,7 @@ > ); > > incrementalBuild(); >- expectingSpecificProblemFor(project2Path, new Problem("", "Access restriction: The type B is not accessible due to restriction on required project Project1", d, 23, 35, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ >+ expectingSpecificProblemFor(project2Path, new Problem("", "Access restriction: The type B is not accessible due to restriction on required project Project1", d, 23, 35, CategorizedProblem.CAT_RESTRICTION, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ > } > > /* >@@ -1086,7 +1086,7 @@ > ); > > fullBuild(); >- expectingSpecificProblemFor(project2Path, new Problem("", "Access restriction: The type B is not accessible due to restriction on required project Project1", d, 23, 35, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ >+ expectingSpecificProblemFor(project2Path, new Problem("", "Access restriction: The type B is not accessible due to restriction on required project Project1", d, 23, 35, CategorizedProblem.CAT_RESTRICTION, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ > > //---------------------------- > // Step 2 >@@ -1136,7 +1136,7 @@ > ); > > fullBuild(); >- expectingSpecificProblemFor(project2Path, new Problem("", "Access restriction: The type B is not accessible due to restriction on required project Project1", d, 23, 35, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ >+ expectingSpecificProblemFor(project2Path, new Problem("", "Access restriction: The type B is not accessible due to restriction on required project Project1", d, 23, 35, CategorizedProblem.CAT_RESTRICTION, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ > } > > /* >@@ -1187,7 +1187,7 @@ > ); > > incrementalBuild(); >- expectingSpecificProblemFor(project2Path, new Problem("", "Access restriction: The type B is not accessible due to restriction on required project Project1", d, 23, 35, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ >+ expectingSpecificProblemFor(project2Path, new Problem("", "Access restriction: The type B is not accessible due to restriction on required project Project1", d, 23, 35, CategorizedProblem.CAT_RESTRICTION, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ > } > > /* >@@ -1231,7 +1231,7 @@ > ); > > fullBuild(); >- expectingSpecificProblemFor(project2Path, new Problem("", "Access restriction: The type B is not accessible due to restriction on required project Project1", d, 23, 35, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ >+ expectingSpecificProblemFor(project2Path, new Problem("", "Access restriction: The type B is not accessible due to restriction on required project Project1", d, 23, 35, CategorizedProblem.CAT_RESTRICTION, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ > > //---------------------------- > // Step 2 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java,v >retrieving revision 1.62 >diff -u -r1.62 AssignmentTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java 6 Oct 2009 13:18:00 -0000 1.62 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java 18 Dec 2009 19:42:18 -0000 >@@ -1909,6 +1909,7 @@ > " if ((i = 3) != i) {\n" + > " System.out.println(\"The second warning is just.\");\n" + > " }\n" + >+ " return false;\n" + > " }\n" + > "}" > }, >@@ -1939,6 +1940,7 @@ > " if ((s = \"\") != s) {\n" + > " System.out.println(\"The second warning is just.\");\n" + > " }\n" + >+ " return false;\n" + > " }\n" + > "}" > }, >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.199 >diff -u -r1.199 BatchCompilerTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 7 Oct 2009 14:58:12 -0000 1.199 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 18 Dec 2009 19:42:19 -0000 >@@ -1584,8 +1584,10 @@ > " default)\n" + > " -log <file> log to a file. If the file extension is ''.xml'', then\n" + > " the log will be a xml file.\n" + >- " -proceedOnError do not stop at first error, dumping class files with\n" + >- " problem methods\n" + >+ " -proceedOnError[:Fatal]\n" + >+ " do not stop at first error, dumping class files with\n" + >+ " problem methods\n" + >+ " With \":Fatal\", all optional errors are treated as fatal\n" + > " -verbose enable verbose output\n" + > " -referenceInfo compute reference info\n" + > " -progress show progress (only in -log mode)\n" + >@@ -1796,7 +1798,7 @@ > " <option key=\"org.eclipse.jdt.core.compiler.problem.emptyStatement\" value=\"ignore\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.enumIdentifier\" value=\"warning\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.fallthroughCase\" value=\"ignore\"/>\n" + >- " <option key=\"org.eclipse.jdt.core.compiler.problem.fatalOptionalError\" value=\"enabled\"/>\n" + >+ " <option key=\"org.eclipse.jdt.core.compiler.problem.fatalOptionalError\" value=\"disabled\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.fieldHiding\" value=\"ignore\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.finalParameterBound\" value=\"warning\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally\" value=\"warning\"/>\n" + >Index: src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated15Test.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated15Test.java,v >retrieving revision 1.10 >diff -u -r1.10 Deprecated15Test.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated15Test.java 3 Nov 2009 15:12:46 -0000 1.10 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated15Test.java 18 Dec 2009 19:42:19 -0000 >@@ -110,6 +110,7 @@ > public void test002() { > Map customOptions = new HashMap(); > customOptions.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR); >+ customOptions.put(CompilerOptions.OPTION_ReportNullReference, CompilerOptions.IGNORE); > this.runNegativeTest( > true, > new String[] { >Index: src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java,v >retrieving revision 1.38 >diff -u -r1.38 DeprecatedTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java 3 Nov 2009 15:12:46 -0000 1.38 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java 18 Dec 2009 19:42:19 -0000 >@@ -563,6 +563,7 @@ > public void test015() { > Map customOptions = new HashMap(); > customOptions.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR); >+ customOptions.put(CompilerOptions.OPTION_ReportNullReference, CompilerOptions.IGNORE); > runNegativeTest( > // test directory preparation > true /* flush output directory */, >@@ -614,6 +615,7 @@ > public void test016() { > Map customOptions = new HashMap(); > customOptions.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR); >+ customOptions.put(CompilerOptions.OPTION_ReportNullReference, CompilerOptions.IGNORE); > runNegativeTest( > // test directory preparation > true /* flush output directory */, >@@ -699,6 +701,7 @@ > Map customOptions = new HashMap(); > customOptions.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR); > customOptions.put(CompilerOptions.OPTION_ReportDeprecationInDeprecatedCode, CompilerOptions.ERROR); >+ customOptions.put(CompilerOptions.OPTION_ReportNullReference, CompilerOptions.IGNORE); > this.runConformTest( > new String[] { > "a/N1.java", >Index: src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java,v >retrieving revision 1.14 >diff -u -r1.14 ExternalizeStringLiteralsTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java 27 Jun 2008 16:04:45 -0000 1.14 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java 18 Dec 2009 19:42:19 -0000 >@@ -531,6 +531,7 @@ > public void test016() { > Map customOptions = getCompilerOptions(); > customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR); >+ customOptions.put(CompilerOptions.OPTION_ReportUnusedPrivateMember, CompilerOptions.IGNORE); > runNegativeTest( > // test directory preparation > true /* flush output directory */, >Index: src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java,v >retrieving revision 1.40 >diff -u -r1.40 FlowAnalysisTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java 16 Dec 2009 07:18:34 -0000 1.40 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java 18 Dec 2009 19:42:19 -0000 >@@ -669,6 +669,7 @@ > public void test022() { > Map options = getCompilerOptions(); > options.put(CompilerOptions.OPTION_ReportEmptyStatement, CompilerOptions.ERROR); >+ options.put(CompilerOptions.OPTION_ReportDeadCode, CompilerOptions.IGNORE); > runNegativeTest( > // test directory preparation > true /* flush output directory */, >Index: src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java,v >retrieving revision 1.67 >diff -u -r1.67 JavadocBugsTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 3 Nov 2009 15:12:45 -0000 1.67 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 18 Dec 2009 19:42:20 -0000 >@@ -8084,7 +8084,7 @@ > "X.java", > "class X {\n" + > " /** @see #o */\n" + >- " public Object foo(Object o) {}\n" + >+ " public Object foo(Object o) { return null; }\n" + > "}\n" > }, > "----------\n" + >Index: src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java,v >retrieving revision 1.21 >diff -u -r1.21 JavadocTestForClass.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java 6 Nov 2008 15:00:12 -0000 1.21 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java 18 Dec 2009 19:42:20 -0000 >@@ -1014,7 +1014,7 @@ > " * </ul>\n" + > " */\n" + > "public interface X extends Map {\n" + >- " int i;\n" + >+ " int i = 0;\n" + > "}\n", > }, > "----------\n" + >@@ -1086,7 +1086,7 @@ > " * </ul>\n" + > " */\n" + > "public interface X extends Map {\n" + >- " Entry e;\n" + >+ " Entry e = null;\n" + > "}\n", > }, > "----------\n" + >Index: src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java,v >retrieving revision 1.46 >diff -u -r1.46 JavadocTest_1_5.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java 8 Oct 2009 19:37:32 -0000 1.46 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java 18 Dec 2009 19:42:20 -0000 >@@ -71,6 +71,7 @@ > options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE); > options.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR); > options.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.ERROR); >+ options.put(CompilerOptions.OPTION_ReportUnusedPrivateMember, CompilerOptions.IGNORE); > return options; > } > /* (non-Javadoc) >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/AccessRestrictionsTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AccessRestrictionsTests.java,v >retrieving revision 1.14 >diff -u -r1.14 AccessRestrictionsTests.java >--- src/org/eclipse/jdt/core/tests/model/AccessRestrictionsTests.java 28 Apr 2009 17:49:28 -0000 1.14 >+++ src/org/eclipse/jdt/core/tests/model/AccessRestrictionsTests.java 18 Dec 2009 19:42:21 -0000 >@@ -230,9 +230,10 @@ > String src = > "package p;\n" + > "public class Y extends X2 {\n" + >- " void foobar() {\n" + >+ " int foobar() {\n" + > " int l1 = m1; // accesses X1.m1, should trigger an error\n" + > " char l2 = m2; // accesses X2.m2, OK\n" + >+ " return l1 + l2;\n" + > " }\n" + > "}"; > this.problemRequestor = new ProblemRequestor(src); >@@ -321,10 +322,11 @@ > " }\n" + > " }\n" + > " class C3c extends C2 implements I2 {}\n" + >- " void foobar() {\n" + >+ " String foobar() {\n" + > " C1 m1 = // error\n" + > " new C1(0); // error\n" + > " C2 m2 = new C2();\n" + >+ " return m1.toString() + m2.toString();\n" + > " }\n" + > "}"; > this.problemRequestor = new ProblemRequestor(src); >@@ -865,9 +867,10 @@ > String src = > "package p;\n" + > "public class Y extends X2 {\n" + >- " void foobar() {\n" + >+ " int foobar() {\n" + > " int l1 = m1; // accesses X1.m1, should trigger an error\n" + > " char l2 = m2; // accesses X2.m2, OK\n" + >+ " return l1 + l2;\n" + > " }\n" + > "}"; > this.problemRequestor = new ProblemRequestor(src); >@@ -963,10 +966,11 @@ > " }\n" + > " }\n" + > " class C3c extends C2 implements I2 {}\n" + >- " void foobar() {\n" + >+ " String foobar() {\n" + > " C1 m1 = // error\n" + > " new C1(0); // error\n" + > " C2 m2 = new C2();\n" + >+ " return m1.toString() + m2.toString();\n" + > " }\n" + > "}"; > this.problemRequestor = new ProblemRequestor(src);
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 296998
:
153947
|
154493
| 154812