Exception when file name has no .class extension is handled properly.
This commit is contained in:
parent
f2bfaee5d7
commit
87f4d08155
@ -138,7 +138,12 @@ public class XClassLoader {
|
|||||||
class_name = classfile.toString().substring(f.toString().length());
|
class_name = classfile.toString().substring(f.toString().length());
|
||||||
// in case we are under Windows, replace \ with /
|
// in case we are under Windows, replace \ with /
|
||||||
class_name = class_name.replace("\\", "/");
|
class_name = class_name.replace("\\", "/");
|
||||||
|
|
||||||
|
try{
|
||||||
class_name = class_name.substring(1, class_name.length() - 6).replace('/', '.');
|
class_name = class_name.substring(1, class_name.length() - 6).replace('/', '.');
|
||||||
|
}catch (Exception e){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Class c = XClassLoader.lClass(urllist, checks, class_name);
|
Class c = XClassLoader.lClass(urllist, checks, class_name);
|
||||||
if (null != c) {
|
if (null != c) {
|
||||||
|
Loading…
Reference in New Issue
Block a user