Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Thomann2010-01-04 15:14:24 +0000
committerOlivier Thomann2010-01-04 15:14:24 +0000
commit645b7eff21d5db2b90380f1d4478beb9fa33f107 (patch)
treefd55e180487ca39dce9bd248ceaa4f55e51e39b2
parent616a41b14ead174db92c630ec6ed7f1d666a9b67 (diff)
downloadeclipse.jdt.core-645b7eff21d5db2b90380f1d4478beb9fa33f107.tar.gz
eclipse.jdt.core-645b7eff21d5db2b90380f1d4478beb9fa33f107.tar.xz
eclipse.jdt.core-645b7eff21d5db2b90380f1d4478beb9fa33f107.zip
HEAD - Fix for 296998
-rw-r--r--org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolTests.java1
-rw-r--r--org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/Options.java1
-rw-r--r--org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java12
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java2
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java8
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated15Test.java1
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java3
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java1
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java1
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java2
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java4
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java1
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AccessRestrictionsTests.java12
-rw-r--r--org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java13
-rw-r--r--org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties4
-rw-r--r--org.eclipse.jdt.core/buildnotes_jdt-core.html4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java4
18 files changed, 57 insertions, 25 deletions
diff --git a/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolTests.java b/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolTests.java
index 15181eb0d7..96c1ee6835 100644
--- a/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolTests.java
+++ b/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolTests.java
@@ -109,6 +109,7 @@ public class CompilerToolTests extends TestCase {
"-X",
"-O",
"-proceedOnError",
+ "-proceedOnError:Fatal",
"-verbose",
"-referenceInfo",
"-progress",
diff --git a/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/Options.java b/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/Options.java
index 352095f28f..c6b7e31c64 100644
--- a/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/Options.java
+++ b/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/Options.java
@@ -25,6 +25,7 @@ public final class Options {
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$
diff --git a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java
index 101ae50c10..7f9867af00 100644
--- a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java
+++ b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java
@@ -991,7 +991,7 @@ public void testCycle7() throws JavaModelException {
);
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 @@ public void testCycle7() throws JavaModelException {
);
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 @@ public void testCycle7() throws JavaModelException {
);
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 @@ public void testCycle7() throws JavaModelException {
);
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 @@ public void testCycle7() throws JavaModelException {
);
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 @@ public void testCycle7() throws JavaModelException {
);
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
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java
index 5df20e7fab..b44f4cb41c 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java
@@ -1909,6 +1909,7 @@ public void test066() {
" if ((i = 3) != i) {\n" +
" System.out.println(\"The second warning is just.\");\n" +
" }\n" +
+ " return false;\n" +
" }\n" +
"}"
},
@@ -1939,6 +1940,7 @@ public void test067() {
" if ((s = \"\") != s) {\n" +
" System.out.println(\"The second warning is just.\");\n" +
" }\n" +
+ " return false;\n" +
" }\n" +
"}"
},
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java
index c66cb68cce..4fc57fa13d 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java
@@ -1584,8 +1584,10 @@ public void test012(){
" 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 @@ public void test012b(){
" <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" +
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated15Test.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated15Test.java
index 85480a86bc..d470213e14 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated15Test.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated15Test.java
@@ -110,6 +110,7 @@ public void test001() {
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[] {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java
index 0e0b93203e..66b05dc2ed 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DeprecatedTest.java
@@ -563,6 +563,7 @@ public void test014() {
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 test015() {
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 @@ public void test018() {
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",
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java
index eeae9ffec3..49b593e75c 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java
@@ -531,6 +531,7 @@ public void test015() {
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 */,
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java
index 20e1317ea3..aeb1c4083d 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java
@@ -669,6 +669,7 @@ public void test021() {
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 */,
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java
index 2bf321515c..d25b7d7939 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java
@@ -8084,7 +8084,7 @@ public void testBug254825b() {
"X.java",
"class X {\n" +
" /** @see #o */\n" +
- " public Object foo(Object o) {}\n" +
+ " public Object foo(Object o) { return null; }\n" +
"}\n"
},
"----------\n" +
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java
index 4fce037828..a6a74448ba 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java
@@ -1014,7 +1014,7 @@ public class JavadocTestForClass extends JavadocTest {
" * </ul>\n" +
" */\n" +
"public interface X extends Map {\n" +
- " int i;\n" +
+ " int i = 0;\n" +
"}\n",
},
"----------\n" +
@@ -1086,7 +1086,7 @@ public class JavadocTestForClass extends JavadocTest {
" * </ul>\n" +
" */\n" +
"public interface X extends Map {\n" +
- " Entry e;\n" +
+ " Entry e = null;\n" +
"}\n",
},
"----------\n" +
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java
index b7e6edc3e5..99f3a2e027 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java
@@ -71,6 +71,7 @@ public class JavadocTest_1_5 extends JavadocTest {
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)
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AccessRestrictionsTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AccessRestrictionsTests.java
index 06fab30a04..f9c685a628 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AccessRestrictionsTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AccessRestrictionsTests.java
@@ -230,9 +230,10 @@ public void test002() throws CoreException {
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 @@ public void test003() throws CoreException {
" }\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 @@ public void test009() throws CoreException {
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 @@ public void test010() throws CoreException {
" }\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);
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
index 6387f2b36d..3f5dfb3520 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
@@ -2023,8 +2023,19 @@ public void configure(String[] argv) {
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;
}
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
index 45bf1d7d52..191e232444 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
@@ -215,8 +215,10 @@ misc.usage = {1} {2}\n\
\ 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\
diff --git a/org.eclipse.jdt.core/buildnotes_jdt-core.html b/org.eclipse.jdt.core/buildnotes_jdt-core.html
index 89e19e807e..bd134bf400 100644
--- a/org.eclipse.jdt.core/buildnotes_jdt-core.html
+++ b/org.eclipse.jdt.core/buildnotes_jdt-core.html
@@ -50,7 +50,9 @@ Eclipse SDK 3.6M5 - %date% - 3.6.0 M5
<h2>What's new in this drop</h2>
<h3>Problem Reports Fixed</h3>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298243">298243</a>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296998">296998</a>
+Unused imports should not prevent execution
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298243">298243</a>
[formatter] Removing empty lines between import groups
<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297546">297546</a>
[formatter] Formatter removes blank after @see if reference is wrapped
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
index 9aad20180e..d55ad9412e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
@@ -4904,7 +4904,7 @@ public void ldc(String constant) {
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 @@ public void ldc(String constant) {
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 @@ public void ldc(String constant) {
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 @@ public void ldc2_w(long constant) {
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;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
index 6fa89987dc..6b8a6e305f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
@@ -1006,8 +1006,8 @@ public class CompilerOptions {
// 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;

Back to the top