From f9347e1e9d79aee9cde0802fe178d72c8f87926c Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Tue, 22 May 2018 16:39:27 -0700 Subject: [PATCH] Update Java style guide --- javaguide.html | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/javaguide.html b/javaguide.html index b171426..bbdbc1c 100644 --- a/javaguide.html +++ b/javaguide.html @@ -459,7 +459,7 @@ previous lines.

4.6.1 Vertical Whitespace

-

A single blank line appears:

+

A single blank line always appears:

  1. Between consecutive members or initializers of a class: fields, constructors, @@ -473,17 +473,17 @@ previous lines.

  2. -
  3. Between statements, as needed to organize the code into logical subsections. - -
  4. Optionally before the first member or initializer, or after the last member or - initializer of the class (neither encouraged nor discouraged).
  5. -
  6. As required by other sections of this document (such as Section 3, Source file structure, and Section 3.3, Import statements).
-

Multiple consecutive blank lines are permitted, but never required (or encouraged).

+

A single blank line may also appear anywhere it improves readability, for example between +statements to organize the code into logical subsections. A blank line before the first member or +initializer, or after the last member or initializer of the class, is neither encouraged nor +discouraged. + +

Multiple consecutive blank lines are permitted, but never required (or encouraged).

4.6.2 Horizontal whitespace

@@ -553,10 +553,13 @@ Javadoc, a single ASCII space also appears in the following places only< new int[] { 5, 6 } are both valid + +
  • Between a type annotation and [] or + ....
  • -This rule is never interpreted as requiring or forbidding additional space at the start or -end of a line; it addresses only interior space. +

    This rule is never interpreted as requiring or forbidding additional space at the start or +end of a line; it addresses only interior space.

    4.6.3 Horizontal alignment: never required

    @@ -809,10 +812,9 @@ rather than 3000000000l.

    underscores. Thus each valid identifier name is matched by the regular expression \w+ .

    -

    In Google Style special prefixes or -suffixes, like those seen in the examples name_, -mName, s_name and -kName, are not used.

    +

    In Google Style, special prefixes or suffixes are not used. For example, these +names are not Google Style: name_, mName, +s_name and kName.

    5.2 Rules by identifier type