fixes for javadoc problems that are found by java8

This commit is contained in:
Roman Ivanov 2014-09-07 21:35:24 -07:00
parent 0b513af497
commit 638dfe14bc
2 changed files with 17 additions and 15 deletions

View File

@ -29,11 +29,11 @@ import com.puppycrawl.tools.checkstyle.api.Utils;
* "&lt;" and "&gt;" are correct to the <i>typical</i> convention.
* The convention is not configurable.
* </p>
* <br/>
* <br>
* <p>
* Left angle bracket ("&lt;"):
* </p>
* <br/>
* <br>
* <ul>
* <li> should be preceded with whitespace only
* in generic methods definitions.</li>
@ -41,26 +41,26 @@ import com.puppycrawl.tools.checkstyle.api.Utils;
* when it is precede method name or following type name.</li>
* <li> should not be followed with whitespace in all cases.</li>
* </ul>
* <br/>
* <br>
* <p>
* Right angle bracket ("&gt;"):
* </p>
* <br/>
* <br>
* <ul>
* <li> should not be preceded with whitespace in all cases.</li>
* <li> should be followed with whitespace in almost all cases,
* except diamond operators and when preceding method name.</li></ul>
* <br/>
* <br>
* <p>
* Examples with correct spacing:
* </p>
* <br/>
* <br>
* <pre>
* public void &lt;K, V extends Number&gt; boolean foo(K, V) {} // Generic methods definitions
* class name&lt;T1, T2, ..., Tn&gt; {} // Generic type definition
* OrderedPair&lt;String, Box&lt;Integer&gt;&gt; p; // Generic type reference
* boolean same = Util.&lt;Integer, String&gt;compare(p1, p2); // Generic preceded method name
* Pair&lt;Integer, String> p1 = new Pair&lt;&gt;(1, "apple"); // Diamond operator
* public void &lt;K, V extends Number&gt; boolean foo(K, V) {} // Generic methods definitions
* class name&lt;T1, T2, ..., Tn&gt; {} // Generic type definition
* OrderedPair&lt;String, Box&lt;Integer&gt;&gt; p; // Generic type reference
* boolean same = Util.&lt;Integer, String&gt;compare(p1, p2); // Generic preceded method name
* Pair&lt;Integer, String&gt; p1 = new Pair&lt;&gt;(1, "apple");// Diamond operator
* </pre>
* @author Oliver Burn
*/

View File

@ -25,7 +25,7 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes;
/**
* <p>
* Checks that a token is surrounded by whitespace.
* </p>
*
* <p> By default the check will check the following operators:
* {@link TokenTypes#LITERAL_ASSERT ASSERT},
* {@link TokenTypes#ASSIGN ASSIGN},
@ -78,22 +78,24 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes;
* {@link TokenTypes#STAR_ASSIGN STAR_ASSIGN},
* {@link TokenTypes#LITERAL_ASSERT LITERAL_ASSERT},
* {@link TokenTypes#TYPE_EXTENSION_AND TYPE_EXTENSION_AND}.
* </p>
*
* <p>
* An example of how to configure the check is:
* </p>
*
* <pre>
* &lt;module name="WhitespaceAround"/&gt;
* </pre>
*
* <p> An example of how to configure the check for whitespace only around
* assignment operators is:
* </p>
*
* <pre>
* &lt;module name="WhitespaceAround"&gt;
* &lt;property name="tokens"
* value="ASSIGN,DIV_ASSIGN,PLUS_ASSIGN,MINUS_ASSIGN,STAR_ASSIGN,MOD_ASSIGN,SR_ASSIGN,BSR_ASSIGN,SL_ASSIGN,BXOR_ASSIGN,BOR_ASSIGN,BAND_ASSIGN"/&gt;
* &lt;/module&gt;
* </pre>
*
* <p>
* In addition, this check can be configured to allow empty methods, types,
* for, while, do-while loops and constructor bodies.