Skip to content

Commit

Permalink
Issue checkstyle#3210: correct xdocs for AnnotationUseStyle elementSt…
Browse files Browse the repository at this point in the history
…yle property
  • Loading branch information
strkkk committed Jun 13, 2019
1 parent a9292c4 commit 7891410
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions src/xdocs/property_types.xml
Expand Up @@ -577,8 +577,11 @@
<td><code>expanded</code></td>
<td>
The expanded version is sometimes referred to as "named parameters"
in other languages. Example:
in other languages.
Example:
<pre>@SuppressWarnings(value={"unchecked","unused",})</pre>
Example of violation:
<pre>@SuppressWarnings({"unchecked","unused",})</pre>
</td>
</tr>

Expand All @@ -587,10 +590,17 @@
<td>
This style can only be used when there is an element called 'value'
which is either the sole element or all other elements have default
values. Examples:
<pre>@SuppressWarnings({"unchecked","unused",})</pre>
and:
<pre>@SuppressWarnings("unchecked")</pre>
values.
Example:
<pre>
@SuppressWarnings({"unchecked","unused",})
@SuppressWarnings("unchecked")
</pre>
Example of violation:
<pre>
@SuppressWarnings(value = {"unchecked","unused",})
@SuppressWarnings(value = "unchecked")
</pre>
</td>
</tr>

Expand All @@ -600,10 +610,16 @@
It is similar to the <code>compact</code> style but
single value arrays are flagged. With annotations a single value
array does not need to be placed in an array initializer.
This style can only be used when there is an element called 'value'
which is either the sole element or all other elements have
default values.
Example: <pre>@SuppressWarnings("unchecked")</pre>
Example:
<pre>
@SuppressWarnings("unchecked")
@MyAnnotation(someArray = "some value")
</pre>
Example of violation:
<pre>
@SuppressWarnings({"unchecked"})
@MyAnnotation(someArray = {"some value"})
</pre>
</td>
</tr>

Expand Down

0 comments on commit 7891410

Please sign in to comment.