|
|
@ -634,10 +634,12 @@ let add_guarded_by_constraints prop lexp pdesc =
|
|
|
|
(* programmers write @GuardedBy("MyClass.class") when the field is guarded by the class *)
|
|
|
|
(* programmers write @GuardedBy("MyClass.class") when the field is guarded by the class *)
|
|
|
|
guarded_by_str_is_class guarded_by_str (Procname.java_get_class_name java_pname)
|
|
|
|
guarded_by_str_is_class guarded_by_str (Procname.java_get_class_name java_pname)
|
|
|
|
| _ -> false in
|
|
|
|
| _ -> false in
|
|
|
|
(** return true if [guarded_by_str] is "<name_of_current_proc>.this" *)
|
|
|
|
(** return true if [guarded_by_str] is as suffix of "<name_of_current_proc>.this" *)
|
|
|
|
let guarded_by_str_is_current_class_this guarded_by_str = function
|
|
|
|
let guarded_by_str_is_current_class_this guarded_by_str = function
|
|
|
|
| Procname.Java java_pname ->
|
|
|
|
| Procname.Java java_pname ->
|
|
|
|
guarded_by_str = (Printf.sprintf "%s.this" (Procname.java_get_class_name java_pname))
|
|
|
|
let fully_qualified_this =
|
|
|
|
|
|
|
|
Printf.sprintf "%s.this" (Procname.java_get_class_name java_pname) in
|
|
|
|
|
|
|
|
string_is_suffix guarded_by_str fully_qualified_this
|
|
|
|
| _ -> false in
|
|
|
|
| _ -> false in
|
|
|
|
let extract_guarded_by_str item_annot =
|
|
|
|
let extract_guarded_by_str item_annot =
|
|
|
|
let annot_extract_guarded_by_str (annot, _) =
|
|
|
|
let annot_extract_guarded_by_str (annot, _) =
|
|
|
|