Fixing a bug: There is a non-generic class with genericSignature present inside.
[jpf-core.git] / src / main / gov / nasa / jpf / vm / ClassInfo.java
index 2cb50ad51094a43cb9712bbb5a48442bc90294c4..eaaa3d01b2fddab8291709213d92452469d40636 100644 (file)
@@ -2601,9 +2601,12 @@ 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
+    // TODO: We need to double check but for some reason Groovy has a type of generic signature with "<*>"
+    // TODO: in the class file.
     if (genericSignature == null || genericSignature.equals("") || genericSignature.contains("<*>"))
       return new String[0];
+    if (!genericSignature.contains(":"))
+      return new String[0];
     return Types.getGenericTypeVariableNames(genericSignature);
   }
 }