core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/ImmutableChecker.java
private Type immutableSupertype(Symbol sym, VisitorState state) {
    for (Type superType : state.getTypes().closure(sym.type)) {
      if (superType.tsym.equals(sym.type.tsym)) {
        continue;
      }
      // Don't use getImmutableAnnotation here: subtypes of trusted types are
      // also trusted, only check for explicitly annotated supertypes.
      if (hasImmutableAnnotation(superType.tsym, state)) {
        return superType;
      }
      // We currently trust that @interface annotations are immutable, but don't enforce that
      // custom interface implementations are also immutable. That means the check can be
      // defeated by writing a custom mutable annotation implementation, and passing it around
      // using the superclass type.
      //
      // TODO(b/25630189): fix this
      //
      // if (superType.tsym.getKind() == ElementKind.ANNOTATION_TYPE) {
      //   return superType;
      // }
    }
    return null;
  }
/**
   * Returns the type of the first superclass or superinterface in the hierarchy annotated with
   * {@code @Immutable}, or {@code null} if no such super type exists.
   */
Returns the type of the first superclass or superinterface in the hierarchy annotated with
, or  null if no such super type exists.
Returns the type of the first superclass or superinterface in the hierarchy annotated with or null if no such super type exists .
private Type immutableSupertype(Symbol sym, VisitorState state) {
    for (Type superType : state.getTypes().closure(sym.type)) {
      if (superType.tsym.equals(sym.type.tsym)) {
        continue;
      }
      if (hasImmutableAnnotation(superType.tsym, state)) {
        return superType;
      }
       TODO(b/25630189): fix this
       if (superType.tsym.getKind() == ElementKind.ANNOTATION_TYPE) {
         return superType;
       }
    }
    return null;
  }
private Type immutableSupertype ( Symbol sym , VisitorState state ) { for ( Type superType : state . getTypes ( ) . closure ( sym . type ) ) { if ( superType . tsym . equals ( sym . type . tsym ) ) { continue ; } if ( hasImmutableAnnotation ( superType . tsym , state ) ) { return superType ; } } return null ; }
Returns the type of the first superclass or superinterface in the hierarchy annotated with
 {@code @Immutable}, or {@code null} if no such super type exists.
Returns the type of the first superclass or superinterface in the hierarchy annotated with { @code @Immutable } or { @code null } if no such super type exists .
// Don't use getImmutableAnnotation here: subtypes of trusted types are // also trusted, only check for explicitly annotated supertypes. // We currently trust that @interface annotations are immutable, but don't enforce that // custom interface implementations are also immutable. That means the check can be // defeated by writing a custom mutable annotation implementation, and passing it around // using the superclass type. // // TODO(b/25630189): fix this // // if (superType.tsym.getKind() == ElementKind.ANNOTATION_TYPE) { //   return superType; // }