Files
openide/java/java-impl/resources/inspectionDescriptions/MetaAnnotationWithoutRuntimeRetention.html
2025-02-05 04:43:28 +00:00

20 lines
721 B
HTML

<html>
<body>
Reports annotations with a <code>SOURCE</code> or <code>CLASS</code> retention policy that are supposed to be used by JUnit 5.
Such annotations are not available at runtime and most probably their retention policy should be fixed to be accessible through reflection.
<p>Note that if the retention policy is not specified, then the default retention policy <code>CLASS</code> is used.</p>
<p><b>Example:</b></p>
<pre><code>
@Testable
public @interface UnitTest {}
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
@Retention(RetentionPolicy.RUNTIME)
@Testable
public @interface UnitTest {}
</code></pre>
<!-- tooltip end -->
<!--<p><small>New in 2017.2</small></p>-->
</body>
</html>