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 2aa3691..19c62a4 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 @@ -6877,7 +6877,7 @@ "3. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 13)\n" + " } catch (E1 e1) {\n" + " ^^\n" + - "Unreachable catch block for E1. Only more specific exceptions are thrown and handled by previous catch block(s).\n" + + "Unreachable catch block for E1. Only more specific exceptions are thrown and they are handled by previous catch block(s).\n" + "----------\n" + "3 problems (3 warnings)", true); @@ -6945,7 +6945,7 @@ "4. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 13)\n" + " } catch (E1 e1) {\n" + " ^^\n" + - "Unreachable catch block for E1. Only more specific exceptions are thrown and handled by previous catch block(s).\n" + + "Unreachable catch block for E1. Only more specific exceptions are thrown and they are handled by previous catch block(s).\n" + "----------\n" + "4 problems (4 warnings)", true); @@ -7080,7 +7080,7 @@ "1. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 13)\n" + " } catch (E1 e1) {\n" + " ^^\n" + - "Unreachable catch block for E1. Only more specific exceptions are thrown and handled by previous catch block(s).\n" + + "Unreachable catch block for E1. Only more specific exceptions are thrown and they are handled by previous catch block(s).\n" + "----------\n" + "1 problem (1 warning)", true); @@ -7180,7 +7180,7 @@ "3. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 13)\n" + " } catch (E1 e1) {\n" + " ^^\n" + - "Unreachable catch block for E1. Only more specific exceptions are thrown and handled by previous catch block(s).\n" + + "Unreachable catch block for E1. Only more specific exceptions are thrown and they are handled by previous catch block(s).\n" + "----------\n" + "3 problems (3 warnings)", true); @@ -7235,7 +7235,7 @@ "3. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 13)\n" + " } catch (E1 e1) {\n" + " ^^\n" + - "Unreachable catch block for E1. Only more specific exceptions are thrown and handled by previous catch block(s).\n" + + "Unreachable catch block for E1. Only more specific exceptions are thrown and they are handled by previous catch block(s).\n" + "----------\n" + "3 problems (3 warnings)", true); @@ -7345,7 +7345,7 @@ "3. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 13)\n" + " } catch (E1 e1) {\n" + " ^^\n" + - "Unreachable catch block for E1. Only more specific exceptions are thrown and handled by previous catch block(s).\n" + + "Unreachable catch block for E1. Only more specific exceptions are thrown and they are handled by previous catch block(s).\n" + "----------\n" + "3 problems (3 warnings)", true); diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryStatementTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryStatementTest.java index 78b5aa4..49dced1 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryStatementTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryStatementTest.java @@ -758,7 +758,7 @@ "1. ERROR in X.java (at line 6)\n" + " } catch(AX e) {\n" + " ^^\n" + - "Unreachable catch block for AX. Only more specific exceptions are thrown and handled by previous catch block(s).\n" + + "Unreachable catch block for AX. Only more specific exceptions are thrown and they are handled by previous catch block(s).\n" + "----------\n" + "2. WARNING in X.java (at line 10)\n" + " class AX extends Exception {}\n" + diff --git a/org.eclipse.jdt.core/buildnotes_jdt-core.html b/org.eclipse.jdt.core/buildnotes_jdt-core.html index 4a0fe46..a6597ef 100644 --- a/org.eclipse.jdt.core/buildnotes_jdt-core.html +++ b/org.eclipse.jdt.core/buildnotes_jdt-core.html @@ -52,7 +52,9 @@

What's new in this drop

Problem Reports Fixed

-355838 +348186 +[compiler] Improve wording for the warning for masked/hidden catch block +
355838 [compiler] ecj compiles the code that javac6 rejects
349326 [1.7] new warning for missing try-with-resources diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties index 7a2e983..d62074b 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties @@ -145,7 +145,7 @@ 162 = Cannot return from within an initializer 163 = Initializer does not complete normally 164 = Expression must return a value -165 = Unreachable catch block for {0}. Only more specific exceptions are thrown and handled by previous catch block(s). +165 = Unreachable catch block for {0}. Only more specific exceptions are thrown and they are handled by previous catch block(s). 166 = The default case is already defined 167 = Unreachable catch block for {0}. This exception is never thrown from the try statement body 168 = Unhandled exception type {0}