mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
22 lines
586 B
HTML
22 lines
586 B
HTML
<html>
|
|
<body>
|
|
Reports fields annotated as not-null that are not initialized in the constructor.
|
|
<p>Example:</p>
|
|
<pre><code>public class MyClass {
|
|
private @NotNull String value;
|
|
|
|
public void setValue(@NotNull String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
public @NotNull String getValue() {
|
|
return value;
|
|
}
|
|
}</code></pre>
|
|
<p>
|
|
Such fields may violate the not-null constraint. In the example above, the <code>setValue</code> parameter is annotated as not-null, but
|
|
<code>getValue</code> may return null if the setter was not called.
|
|
</p>
|
|
<!-- tooltip end -->
|
|
</body>
|
|
</html> |