diff --git a/src/main/java/net/labymod/intellij/singlehotswap/compiler/impl/BuiltInJavaCompiler.java b/src/main/java/net/labymod/intellij/singlehotswap/compiler/impl/BuiltInJavaCompiler.java index dfab029..0f50edc 100644 --- a/src/main/java/net/labymod/intellij/singlehotswap/compiler/impl/BuiltInJavaCompiler.java +++ b/src/main/java/net/labymod/intellij/singlehotswap/compiler/impl/BuiltInJavaCompiler.java @@ -89,8 +89,11 @@ public List compile(Module module, VirtualFile sourceFile, ClassFile File compiledFile = new File(classObject.getPath()); FileUtil.writeToFile(compiledFile, bytes); - // Add class file to list - classFiles.add(ClassFile.fromClassObject(project, classObject)); + // filter out any non-class-objects generated (e. g. files from annotation processing) + if (classObject.getClassName() != null) { + // Add class file to list + classFiles.add(ClassFile.fromClassObject(project, classObject)); + } } return classFiles; }