From bf7287e98bb7ddaca1f430476e462f6ddf63fd3d Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Tue, 17 May 2016 07:47:55 -0700 Subject: [PATCH] add model of locks inside the Object class Summary: To be used by monitorenter() and friends. Reviewed By: peterogithub Differential Revision: D3310720 fbshipit-source-id: 40823ca --- infer/models/java/src/java/lang/Object.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/infer/models/java/src/java/lang/Object.java b/infer/models/java/src/java/lang/Object.java index b85a6b401..8c885749d 100644 --- a/infer/models/java/src/java/lang/Object.java +++ b/infer/models/java/src/java/lang/Object.java @@ -12,6 +12,15 @@ package java.lang; import com.facebook.infer.models.InferUndefined; public class Object { + private boolean __inferIsLocked; + + public void __inferLock() { + __inferIsLocked = true; + } + + public void __inferUnlock() { + __inferIsLocked = false; + } public Class getClass() { Class c = new Class();