diff options
author | Ayushman Jain | 2012-05-28 08:34:46 +0000 |
---|---|---|
committer | Ayushman Jain | 2012-05-28 08:34:46 +0000 |
commit | d24dde6b74338cbff7b303640a57a2ea3b1e5a2a (patch) | |
tree | 37c3b51336553b98af75688049cb8b1edee30e50 | |
parent | f34642c5440cef73e31a0cedcef117ef8a599423 (diff) | |
download | eclipse.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.htm | 29 |
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> |