Skip to content

Commit 50018ef

Browse files
authored
Document the purpose of containsNullnessAnnotation() (#7578)
1 parent ef615df commit 50018ef

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

checker/src/main/java/org/checkerframework/checker/nullness/NullnessAnnotatedTypeFactory.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,9 @@ protected AnnotationMirror greatestLowerBoundWithElements(
851851
* <p>This method ignores aliases of nullness annotations that are declaration annotations,
852852
* because they may apply to inner types.
853853
*
854+
* <p>This method is used only for issuing an error when a nullness annotation is written in a
855+
* place it should not be.
856+
*
854857
* @param annoTrees a list of annotations that the Java parser attached to the variable/method
855858
* declaration; null if this type is not from such a location. This is a list of extra
856859
* annotations to check, in addition to those on the type.
@@ -871,8 +874,9 @@ protected boolean containsNullnessAnnotation(
871874
* <p>This method ignores aliases of nullness annotations that are declaration annotations,
872875
* because they may apply to inner types.
873876
*
874-
* <p>Clients that are processing a field or variable definition, or a method return type, should
875-
* call {@link #containsNullnessAnnotation(List, Tree)} instead.
877+
* <p>This method is used only for issuing an error when a nullness annotation is written in a
878+
* place it should not be. Clients that are processing a field or variable definition, or a method
879+
* return type, should call {@link #containsNullnessAnnotation(List, Tree)} instead.
876880
*
877881
* @param annoTrees a list of annotations to check
878882
* @return true if some annotation is a nullness annotation

0 commit comments

Comments
 (0)