Skip to content

Commit

Permalink
Fixed importing of non-existing classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pesekjak committed Jun 10, 2022
1 parent cdfedc7 commit 7f69b3d
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@ public Class<?> loadClass(String name, byte[] bytes) {
}

@Override
protected Class<?> findClass(String name) {
protected Class<?> findClass(String name) throws ClassNotFoundException {
byte[] bytecode = bytecodeMap.get(name);
if(bytecode.length < 1) {
try { return super.findClass(name);
} catch (ClassNotFoundException ignored) {
return null;
}
if(bytecode == null || bytecode.length < 1) {
return super.findClass(name);
}
bytecodeMap.remove(name);
return defineClass(name, bytecode, 0, bytecode.length);
Expand Down

0 comments on commit 7f69b3d

Please sign in to comment.