@@ -662,7 +662,8 @@ <h4 id="s4.8.4-switch">4.8.4 Switch statements</h4>
662
662
< p class ="terminology "> < strong > Terminology Note:</ strong > Inside the braces of a
663
663
< em > switch block</ em > are one or more < em > statement groups</ em > . Each statement group consists of
664
664
one or more < em > switch labels</ em > (either < code class ="prettyprint lang-java "> case FOO:</ code > or
665
- < code class ="prettyprint lang-java "> default:</ code > ), followed by one or more statements.</ p >
665
+ < code class ="prettyprint lang-java "> default:</ code > ), followed by one or more statements (or, for
666
+ the < em > last</ em > statement group, < em > zero</ em > or more statements).</ p >
666
667
667
668
< h5 id ="s4.8.4.1-switch-indentation "> 4.8.4.1 Indentation</ h5 >
668
669
@@ -705,6 +706,13 @@ <h5 id="s4.8.4.3-switch-default">4.8.4.3 The <code>default</code> case is presen
705
706
< p > Each switch statement includes a < code class ="prettyprint lang-java "> default</ code > statement
706
707
group, even if it contains no code.</ p >
707
708
709
+ < p > < strong > Exception:</ strong > A switch statement for an < code > enum</ code > type < em > may</ em > omit
710
+ the < code class ="prettyprint lang-java "> default</ code > statement group, < em > if</ em > it includes
711
+ explicit cases covering < em > all</ em > possible values of that type. This enables IDEs or other static
712
+ analysis tools to issue a warning if any cases were missed.
713
+
714
+ </ p >
715
+
708
716
< a name ="annotations "> </ a >
709
717
< h4 id ="s4.8.5-annotations "> 4.8.5 Annotations</ h4 >
710
718
@@ -1053,9 +1061,9 @@ <h3 id="s6.4-finalizers">6.4 Finalizers: not used</h3>
1053
1061
< p class ="tip "> < strong > Tip:</ strong > Don't do it. If you absolutely must, first read and understand
1054
1062
1055
1063
1056
- < a href ="http://books.google.com/books?isbn=8131726592 "> < em > Effective Java</ em > </ a >
1064
+ < a href ="http://books.google.com/books?isbn=8131726592 "> < em > Effective Java</ em > Item 7, </ a >
1057
1065
1058
- Item 7, "Avoid Finalizers," very carefully, and < em > then</ em > don't do it.</ p >
1066
+ "Avoid Finalizers," very carefully, and < em > then</ em > don't do it.</ p >
1059
1067
1060
1068
1061
1069
< a name ="javadoc "> </ a >
@@ -1081,22 +1089,24 @@ <h4 id="s7.1.1-javadoc-multi-line">7.1.1 General form</h4>
1081
1089
< pre class ="prettyprint lang-java "> /** An especially short bit of Javadoc. */
1082
1090
</ pre >
1083
1091
1084
- < p > The basic form is always acceptable. The single-line form may be substituted when there are no
1085
- at-clauses present, and the entirety of the Javadoc block (including comment markers) can fit on a
1086
- single line. </ p >
1092
+ < p > The basic form is always acceptable. The single-line form may be substituted when the entirety
1093
+ of the Javadoc block (including comment markers) can fit on a single line. Note that this only
1094
+ applies when there are no block tags such as < code > @return </ code > .
1087
1095
1088
- < h4 id ="s7.1.2-javadoc-paragraphs "> 7.1.2 Paragraphs</ h4 >
1096
+ </ p > < h4 id ="s7.1.2-javadoc-paragraphs "> 7.1.2 Paragraphs</ h4 >
1089
1097
1090
1098
< p > One blank line—that is, a line containing only the aligned leading asterisk
1091
- (< code > *</ code > )—appears between paragraphs, and before the group of "at-clauses" if
1099
+ (< code > *</ code > )—appears between paragraphs, and before the group of block tags if
1092
1100
present. Each paragraph but the first has < code > <p></ code > immediately before the first word,
1093
1101
with no space after.</ p >
1094
1102
1095
- < h4 id ="s7.1.3-javadoc-at-clauses "> 7.1.3 At-clauses</ h4 >
1103
+ < a name ="s7.1.3-javadoc-at-clauses "> </ a >
1104
+
1105
+ < h4 id ="s7.1.3-javadoc-block-tags "> 7.1.3 Block tags</ h4 >
1096
1106
1097
- < p > Any of the standard "at-clauses " that are used appear in the order < code > @param</ code > ,
1107
+ < p > Any of the standard "block tags " that are used appear in the order < code > @param</ code > ,
1098
1108
< code > @return</ code > , < code > @throws</ code > , < code > @deprecated</ code > , and these four types never
1099
- appear with an empty description. When an at-clause doesn't fit on a single line, continuation lines
1109
+ appear with an empty description. When a block tag doesn't fit on a single line, continuation lines
1100
1110
are indented four (or more) spaces from the position of the < code > @</ code > .
1101
1111
</ p >
1102
1112
0 commit comments