mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
29 lines
801 B
HTML
29 lines
801 B
HTML
<html>
|
|
<body>
|
|
Reports annotations that can be simplified to their single-element or marker shorthand form.
|
|
<p>
|
|
Problems reported:
|
|
<ul>
|
|
<li>Redundant <code>value=</code> in annotation name-value pairs
|
|
<li>Redundant braces around array values that contain only a single value
|
|
<li>Redundant whitespace between the @-sign and the name of annotations
|
|
<li>Redundant whitespace between annotation names and parameter lists
|
|
<li>Redundant parentheses in annotations without any parameters
|
|
</ul>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
@interface Foo { String[] value(); }
|
|
|
|
@ Foo({"foo"})
|
|
public String name;
|
|
</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<pre><code>
|
|
@interface Foo { String[] value(); }
|
|
|
|
@Foo("foo")
|
|
public String name;
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
</body>
|
|
</html> |