@ -371,7 +371,8 @@ let is_exception tenv typename =
let is_throwable tenv typename =
is_subtype_of_str tenv typename " java.lang.Throwable "
(* * tests whether any class attributes ( e.g., @ThreadSafe ) pass check of first argument *)
(* * tests whether any class attributes ( e.g., @ThreadSafe ) pass check of first argument,
including for supertypes * )
let check_class_attributes check tenv = function
| Procname . Java java_pname ->
let check_class_annots _ { StructTyp . annots ; } = check annots in
@ -380,6 +381,17 @@ let check_class_attributes check tenv = function
( Procname . java_get_class_type_name java_pname )
| _ -> false
(* * tests whether any class attributes ( e.g., @ThreadSafe ) pass check of first argument,
for the current class only * )
let check_current_class_attributes check tenv = function
| Procname . Java java_pname ->
( match Tenv . lookup tenv ( Procname . java_get_class_type_name java_pname ) with
| Some ( struct_typ ) -> check struct_typ . annots
| _ -> false
)
| _ -> false
(* * find superclasss with attributes ( e.g., @ThreadSafe ) , including current class *)
let rec find_superclasses_with_attributes check tenv tname =
match Tenv . lookup tenv tname with