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 118989 Details for
Bug 256882
[compiler] Enable DeadCode detection by default
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
256882.txt (text/plain), 6.60 KB, created by
Philipe Mulet
on 2008-11-28 07:34:29 EST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2008-11-28 07:34:29 EST
Size:
6.60 KB
patch
obsolete
>### 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" >+</pre> >+</li> >+<li>Dead code detection warning also got enabled by default. >+<pre> >+* 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" > </pre> > </li> > </ul> > > <h3>Problem Reports Fixed</h3> >-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255970">255970</a> >+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256882">256882</a> >+[compiler] Enable DeadCode detection by default >+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255970">255970</a> > test tear down failed causing cascade of failures > <br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=207093">207093</a> > 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 @@ > * <dl> > * <dt>Option id:</dt><dd><code>"org.eclipse.jdt.core.compiler.problem.deadCode"</code></dd> > * <dt>Possible values:</dt><dd><code>{ "error", "warning", "ignore" }</code></dd> >- * <dt>Default:</dt><dd><code>"ignore"</code></dd> >+ * <dt>Default:</dt><dd><code>"warning"</code></dd> > * </dl> > * @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 @@ > " <option key=\"org.eclipse.jdt.core.compiler.problem.assertIdentifier\" value=\"warning\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.autoboxing\" value=\"ignore\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.comparingIdentical\" value=\"warning\"/>\n" + >- " <option key=\"org.eclipse.jdt.core.compiler.problem.deadCode\" value=\"ignore\"/>\n" + >+ " <option key=\"org.eclipse.jdt.core.compiler.problem.deadCode\" value=\"warning\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.deadCodeInTrivialIfStatement\" value=\"disabled\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.deprecation\" value=\"warning\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode\" value=\"disabled\"/>\n" +
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 256882
: 118989