From 594d91bfbb8dfcbcac0f148af8175f2b7ec9857b Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Tue, 28 Feb 2017 19:06:53 -0800 Subject: [PATCH] Update Java style guide --- javaguide.html | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/javaguide.html b/javaguide.html index 789bdf446..59f03dc54 100644 --- a/javaguide.html +++ b/javaguide.html @@ -662,7 +662,8 @@

4.8.4 Switch statements

Terminology Note: Inside the braces of a switch block are one or more statement groups. Each statement group consists of one or more switch labels (either case FOO: or -default:), followed by one or more statements.

+default:), followed by one or more statements (or, for +the last statement group, zero or more statements).

4.8.4.1 Indentation
@@ -705,6 +706,13 @@
4.8.4.3 The default case is presen

Each switch statement includes a default statement group, even if it contains no code.

+

Exception: A switch statement for an enum type may omit +the default statement group, if it includes +explicit cases covering all possible values of that type. This enables IDEs or other static +analysis tools to issue a warning if any cases were missed. + +

+

4.8.5 Annotations

@@ -1053,9 +1061,9 @@

6.4 Finalizers: not used

Tip: Don't do it. If you absolutely must, first read and understand - Effective Java + Effective Java Item 7, -Item 7, "Avoid Finalizers," very carefully, and then don't do it.

+"Avoid Finalizers," very carefully, and then don't do it.

@@ -1081,22 +1089,24 @@

7.1.1 General form

/** An especially short bit of Javadoc. */
 
-

The basic form is always acceptable. The single-line form may be substituted when there are no -at-clauses present, and the entirety of the Javadoc block (including comment markers) can fit on a -single line.

+

The basic form is always acceptable. The single-line form may be substituted when the entirety +of the Javadoc block (including comment markers) can fit on a single line. Note that this only +applies when there are no block tags such as @return. -

7.1.2 Paragraphs

+

7.1.2 Paragraphs

One blank line—that is, a line containing only the aligned leading asterisk -(*)—appears between paragraphs, and before the group of "at-clauses" if +(*)—appears between paragraphs, and before the group of block tags if present. Each paragraph but the first has <p> immediately before the first word, with no space after.

-

7.1.3 At-clauses

+ + +

7.1.3 Block tags

-

Any of the standard "at-clauses" that are used appear in the order @param, +

Any of the standard "block tags" that are used appear in the order @param, @return, @throws, @deprecated, and these four types never -appear with an empty description. When an at-clause doesn't fit on a single line, continuation lines +appear with an empty description. When a block tag doesn't fit on a single line, continuation lines are indented four (or more) spaces from the position of the @.