added extra catch block for alternate exception
@@ -226,13 +226,19 @@ private void checkUpperLevelClassStructure(Class upperLevelClass, Element elemen
.replace("/", ".");
returnType = Class.forName(k);
}
+ catch (ClassNotFoundException ncdf) // Java 8
+ {
+ // Look for all caps version of class name, eg UINT16 etc
+ String k = (upperLevelClass.getPackage().getName().replace("template.", "") + "." + returnTypeName.toUpperCase())
+ .replace("/", ".");
+ returnType = Class.forName(k);
+ }
catch (NoClassDefFoundError ncdf)
{
// Look for all caps version of class name, eg UINT16 etc
String k = (upperLevelClass.getPackage().getName().replace("template.", "") + "." + returnTypeName.toUpperCase())
.replace("/", ".");
returnType = Class.forName(k);
-
}
}
