File tree 2 files changed +10
-10
lines changed
2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -41,16 +41,8 @@ public Object() {
41
41
}
42
42
43
43
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 ));
54
46
}
55
47
56
48
public int hashCode () {
Original file line number Diff line number Diff line change @@ -314,4 +314,12 @@ public static int getMonitorCount(Object object)
314
314
{
315
315
return object .cproverMonitorCount ;
316
316
}
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
+ }
317
325
}
You can’t perform that action at this time.
0 commit comments