The problem was these errors coming from ClassLoader.defineClassImpl
when the generated class name contained two '/' characters in a row:
java.lang.ClassFormatError: JVMCFRE068 class name is invalid;
class=scl/http_58_//Projects/Development_37_20Project/Model/SCLMain,
offset=0
More escaping was added to fix this.
gitlab #159
Change-Id: I01f8b17b1230cbf06051848b23c805e8d2d61c96
b.append('_').append((int)c).append('_');
}
//System.out.println("m2c " + moduleName + " -> " + b.toString());
- return b.toString().replace("..", "._.");
+ return b.toString().replace("..", "._.").replace("//", "/_/");
}
public static String classNameToModuleName(String className) {
- className = className.replace("._.", "..");
+ className = className.replace("/_/", "//").replace("._.", "..");
StringBuilder b = new StringBuilder(className.length());
int length = className.length();
for(int i=0;i<length;++i) {