@@ -115,7 +115,7 @@ protected Slot getOrCreateDeclBound(AnnotatedDeclaredType type) {
115115 AnnotationMirror declSlot = getClassDeclVarAnnot (classDecl );
116116 if (declSlot == null ) {
117117 // if a explicit annotation presents on the class DECL, use that directly
118- if (type .isDeclaration () && type .isAnnotatedInHierarchy (READONLY ) && !type .hasAnnotation (READONLY )) {
118+ if (type .isDeclaration () && type .hasAnnotationInHierarchy (READONLY ) && !type .hasAnnotation (READONLY )) {
119119 Slot constantSlot = slotManager .getSlot (type .getAnnotationInHierarchy (READONLY ));
120120// TypeElement classDecl = (TypeElement) type.getUnderlyingType().asElement();
121121 super .getOrCreateDeclBound (type );
@@ -163,7 +163,7 @@ public void storeElementType(Element element, AnnotatedTypeMirror atm) {
163163 // If an explicit bound exists, the annotator will still place a constant slot on the bound,
164164 // which will considered invalid by CF.
165165 // Maybe not putting an anno at all during bound slot generation would be better?
166- if (atm .hasAnnotation (VarAnnot .class ) && atm .isAnnotatedInHierarchy (READONLY )) {
166+ if (atm .hasAnnotation (VarAnnot .class ) && atm .hasAnnotationInHierarchy (READONLY )) {
167167 atm .removeAnnotationInHierarchy (READONLY );
168168 }
169169 super .storeElementType (element , atm );
@@ -288,7 +288,7 @@ protected boolean handleWasRawDeclaredTypes(AnnotatedDeclaredType adt) {
288288
289289 @ Override
290290 public void handleBinaryTree (AnnotatedTypeMirror atm , BinaryTree binaryTree ) {
291- if (atm .isAnnotatedInHierarchy (inferenceTypeFactory .getVarAnnot ())) {
291+ if (atm .hasAnnotationInHierarchy (inferenceTypeFactory .getVarAnnot ())) {
292292 // Happens for binary trees whose atm is implicitly immutable and already handled by
293293 // PICOInferencePropagationTreeAnnotator
294294 return ;
0 commit comments