### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: buildnotes_jdt-core.html =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/buildnotes_jdt-core.html,v retrieving revision 1.6775 diff -u -r1.6775 buildnotes_jdt-core.html --- buildnotes_jdt-core.html 27 Nov 2008 23:07:33 -0000 1.6775 +++ buildnotes_jdt-core.html 28 Nov 2008 12:23:49 -0000 @@ -59,13 +59,26 @@ * * Option id:"org.eclipse.jdt.core.compiler.problem.deadCodeInTrivialIfStatement" * Possible values:{ "enabled", "disabled" } -* Default:"disabled" +* Default:"warning" + + +
  • Dead code detection warning also got enabled by default. +
    +* Compiler option ID: Reporting Dead Code.
    +* When enabled, the compiler will issue an error or a warning if some non fatal dead code is detected. For instance, if (false) foo();
    +* is not reported as truly unreachable code by the Java Language Specification. If this diagnostic is enabled, then the invocation of foo() is
    +* going to be signaled as being dead code.
    +* Option id:"org.eclipse.jdt.core.compiler.problem.deadCode"
    +* Possible values:{ "error", "warning", "ignore" }
    +* Default:"warning"
     
  • Problem Reports Fixed

    -255970 +256882 +[compiler] Enable DeadCode detection by default +
    255970 test tear down failed causing cascade of failures
    207093 Perf: adding a new top-level package is slow if many source files exist 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.783 diff -u -r1.783 messages.properties --- batch/org/eclipse/jdt/internal/compiler/batch/messages.properties 26 Nov 2008 17:56:56 -0000 1.783 +++ batch/org/eclipse/jdt/internal/compiler/batch/messages.properties 28 Nov 2008 12:23:53 -0000 @@ -242,7 +242,7 @@ \ compareIdentical + comparing identical expressions\n\ \ conditionAssign possible accidental boolean assignment\n\ \ constructorName + method with constructor name\n\ -\ deadCode dead code excluding trivial if (DEBUG) check\n\ +\ deadCode + dead code excluding trivial if (DEBUG) check\n\ \ dep-ann missing @Deprecated annotation\n\ \ deprecation + deprecation outside deprecated code\n\ \ discouraged + use of types matching a discouraged access rule\n\ Index: model/org/eclipse/jdt/core/JavaCore.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java,v retrieving revision 1.632 diff -u -r1.632 JavaCore.java --- model/org/eclipse/jdt/core/JavaCore.java 26 Nov 2008 17:56:55 -0000 1.632 +++ model/org/eclipse/jdt/core/JavaCore.java 28 Nov 2008 12:23:54 -0000 @@ -1006,7 +1006,7 @@ *
    *
    Option id:
    "org.eclipse.jdt.core.compiler.problem.deadCode"
    *
    Possible values:
    { "error", "warning", "ignore" }
    - *
    Default:
    "ignore"
    + *
    Default:
    "warning"
    *
    * @since 3.5 * @category CompilerOptionID Index: compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java,v retrieving revision 1.2 diff -u -r1.2 IrritantSet.java --- compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java 3 Oct 2008 08:39:30 -0000 1.2 +++ compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java 28 Nov 2008 12:23:53 -0000 @@ -117,9 +117,9 @@ | CompilerOptions.UnusedLabel | CompilerOptions.UnusedTypeArguments | CompilerOptions.UnusedWarningToken - | CompilerOptions.ComparingIdentical); + | CompilerOptions.ComparingIdentical) // group-2 warnings enabled by default - // next irritant goes here (group-1 is complete) + .set(CompilerOptions.DeadCode); ALL.setAll(); HIDING #P org.eclipse.jdt.core.tests.compiler 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.183 diff -u -r1.183 BatchCompilerTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 26 Nov 2008 17:57:03 -0000 1.183 +++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 28 Nov 2008 12:25:22 -0000 @@ -1645,7 +1645,7 @@ " compareIdentical + comparing identical expressions\n" + " conditionAssign possible accidental boolean assignment\n" + " constructorName + method with constructor name\n" + - " deadCode dead code excluding trivial if (DEBUG) check\n" + + " deadCode + dead code excluding trivial if (DEBUG) check\n" + " dep-ann missing @Deprecated annotation\n" + " deprecation + deprecation outside deprecated code\n" + " discouraged + use of types matching a discouraged access rule\n" + @@ -1778,7 +1778,7 @@ "