Fixing a few bugs in the statistics printout.
[jpf-core.git] / src / main / gov / nasa / jpf / vm / ClassInfo.java
index 09d59ec4e1d412456e1b7d09e3dc37aeaaf1fbbf..3ff7ca6ca7c6d13a72e7dd1b551031168872f621 100644 (file)
@@ -1813,6 +1813,12 @@ public class ClassInfo extends InfoObject implements Iterable<MethodInfo>, Gener
   public static boolean isBuiltinClass (String cname) {
     char c = cname.charAt(0);
 
+    // TODO: Fix for Groovy's model-checking
+    // TODO: Handling impossible names in Groovy, e.g., [Ljava.lang.Object;BeanInfo
+    if (cname.indexOf(';') != -1 && cname.indexOf(';') != cname.length() - 1) {
+      return false;
+    }
+
     // array class
     if ((c == '[') || cname.endsWith("[]")) {
       return true;
@@ -2601,8 +2607,9 @@ public class ClassInfo extends InfoObject implements Iterable<MethodInfo>, Gener
 
   // TODO: Fix for Groovy's model-checking
   public String[] getGenericTypeVariableNames () {
-    // To accommodate methods that do not have generic types
-    if (genericSignature == null)
+    if (genericSignature == null || genericSignature.equals(""))
+      return new String[0];
+    if (!genericSignature.contains(":"))
       return new String[0];
     return Types.getGenericTypeVariableNames(genericSignature);
   }