diff --git a/src/main/java/me/pesekjak/hippo/classes/builder/DynamicClassLoader.java b/src/main/java/me/pesekjak/hippo/classes/builder/DynamicClassLoader.java index 9b39d3e..59fedbb 100644 --- a/src/main/java/me/pesekjak/hippo/classes/builder/DynamicClassLoader.java +++ b/src/main/java/me/pesekjak/hippo/classes/builder/DynamicClassLoader.java @@ -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);