Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAyushman Jain2012-05-28 08:34:46 +0000
committerAyushman Jain2012-05-28 08:34:46 +0000
commitd24dde6b74338cbff7b303640a57a2ea3b1e5a2a (patch)
tree37c3b51336553b98af75688049cb8b1edee30e50
parentf34642c5440cef73e31a0cedcef117ef8a599423 (diff)
downloadeclipse.platform.common-d24dde6b74338cbff7b303640a57a2ea3b1e5a2a.tar.gz
eclipse.platform.common-d24dde6b74338cbff7b303640a57a2ea3b1e5a2a.tar.xz
eclipse.platform.common-d24dde6b74338cbff7b303640a57a2ea3b1e5a2a.zip
doc update for new 'switch-case' compiler options
-rw-r--r--bundles/org.eclipse.jdt.doc.user/reference/preferences/java/compiler/ref-preferences-errors-warnings.htm29
1 files changed, 27 insertions, 2 deletions
diff --git a/bundles/org.eclipse.jdt.doc.user/reference/preferences/java/compiler/ref-preferences-errors-warnings.htm b/bundles/org.eclipse.jdt.doc.user/reference/preferences/java/compiler/ref-preferences-errors-warnings.htm
index 366ebedbb..f14927a2e 100644
--- a/bundles/org.eclipse.jdt.doc.user/reference/preferences/java/compiler/ref-preferences-errors-warnings.htm
+++ b/bundles/org.eclipse.jdt.doc.user/reference/preferences/java/compiler/ref-preferences-errors-warnings.htm
@@ -260,14 +260,39 @@
</td>
<td valign="top">
<p>When enabled, the compiler will issue an error or a warning whenever it encounters a switch statement which does not contain case statements
- for every enum constant of the referenced enum nor a default case. A missing default case is reported even when all enum constants are covered
- by corresponding case labels; this warning is recommended by the Java Language Specification for the sake of binary compatibility.</p>
+ for every enum constant of the referenced enum nor a default case. A default case is assumed to cover missing case statements for any
+ enum constant, so the compiler is silent in the presence of default cases unless the option "Signal even if 'default' case exists" (see below) is enabled.</p>
</td>
<td valign="top">
<p>Warning</p>
</td>
</tr>
<tr>
+ <td valign="top" style="padding-left: 2em;">
+ <p>Signal even if 'default' case exists</p>
+ </td>
+ <td valign="top">
+ <p>When enabled, the compiler additionally will issue an error or a warning if an enum constant is not covered by a case,
+ even if a default case exists. This options is helpful in catching missing case statements when a new enum constant is added.</p>
+ </td>
+ <td valign="top">
+ <p>Disabled</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <p>'switch' is missing 'default' case</p>
+ </td>
+ <td valign="top">
+ <p>When enabled, the compiler will issue an error or a warning if a 'switch' statement lacks a default case.
+ Consequently, missing 'default' will be flagged even if all possible values are otherwise covered by 'case' statements.
+ This warning is recommended by the Java Language Specification for the sake of binary compatibility.</p>
+ </td>
+ <td valign="top">
+ <p>Ignore</p>
+ </td>
+ </tr>
+ <tr>
<td valign="top">
<p>'switch' case fall-through</p>
</td>

Back to the top