File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
common/src/main/java/org/jetbrains/annotations Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 23
23
* Apart from documentation purposes this annotation is intended to be used by static analysis tools
24
24
* to validate against element contract violations.
25
25
* <p>
26
- * This annotation should be used only as a last resort.
26
+ * This annotation means that the annotated element exposes internal data and breaks encapsulation
27
+ * of the containing class; the annotation won't prevent its use from production code, developers
28
+ * even won't see warnings if their IDE doesn't support the annotation. It's better to provide
29
+ * proper API which can be used in production as well as in tests.
27
30
*/
28
31
@ Documented
29
32
@ Retention (RetentionPolicy .CLASS )
Original file line number Diff line number Diff line change 32
32
* <li>It's illegal to annotate private member/type as VisibleForTesting.</li>
33
33
* </ul>
34
34
* <p>
35
- * This annotation should be used only as a last resort.
35
+ * This annotation means that the annotated element exposes internal data and breaks encapsulation
36
+ * of the containing class; the annotation won't prevent its use from production code, developers
37
+ * even won't see warnings if their IDE doesn't support the annotation. It's better to provide
38
+ * proper API which can be used in production as well as in tests.
36
39
*
37
40
* @since 20.0.0
38
41
*/
You can’t perform that action at this time.
0 commit comments