You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by pa...@apache.org on 2022/02/15 09:46:40 UTC
[sling-org-apache-sling-commons-compiler] 01/01: SLING-11144: only don't write classes of a failed compilation unit
This is an automated email from the ASF dual-hosted git repository.
pauls pushed a commit to branch issus/SLING-11144
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git
commit 375e9f8a9be5f89de5dec3f759a39e2c3cadf90b
Author: Karl Pauls <ka...@gmail.com>
AuthorDate: Tue Feb 15 10:46:29 2022 +0100
SLING-11144: only don't write classes of a failed compilation unit
---
.../org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java b/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java
index 40e4cab..4a99c3d 100644
--- a/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java
+++ b/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java
@@ -303,7 +303,7 @@ public class EclipseJavaCompiler implements JavaCompiler {
}
}
}
- if ( this.errorHandler.getErrors() == null ) {
+ if (!result.hasErrors()) {
ClassFile[] classFiles = result.getClassFiles();
for (int i = 0; i < classFiles.length; i++) {
ClassFile classFile = classFiles[i];