File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -41,16 +41,8 @@ public Object() {
4141 }
4242
4343 public final Class <?> getClass () {
44- /*
45- * MODELS LIBRARY {
46- * We make this call to Class.forName to ensure it is loaded
47- * by CBMC even with --lazy-methods on. We have to do this
48- * because the internal support for getClass use the model of
49- * Class.forName.
50- * }
51- */
52- Class c = Class .forName ("" );
53- return CProver .nondetWithoutNullForNotModelled ();
44+ // DIFFBLUE MODEL LIBRARY
45+ return Class .forName (CProver .classIdentifier (this ));
5446 }
5547
5648 public int hashCode () {
Original file line number Diff line number Diff line change @@ -314,4 +314,12 @@ public static int getMonitorCount(Object object)
314314 {
315315 return object .cproverMonitorCount ;
316316 }
317+
318+ /**
319+ * Class identifier of an Object. For instance "java.lang.String", "java.lang.Interger".
320+ */
321+ public static String classIdentifier (Object object )
322+ {
323+ return object .getClass ().getCanonicalName ();
324+ }
317325}
You can’t perform that action at this time.
0 commit comments