This is an automated email from the ASF dual-hosted git repository.

crazyhzm pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.1 by this push:
     new 92420d1f1a fix diagnostics log message errors (#11103)
92420d1f1a is described below

commit 92420d1f1af5c29998d76a2fa709eca490e4472a
Author: huazhongming <[email protected]>
AuthorDate: Sun Dec 11 11:25:45 2022 +0800

    fix diagnostics log message errors (#11103)
    
    Signed-off-by: crazyhzm <[email protected]>
    
    Signed-off-by: crazyhzm <[email protected]>
---
 .../java/org/apache/dubbo/common/compiler/support/JdkCompiler.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/JdkCompiler.java
 
b/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/JdkCompiler.java
index cebeaf7033..55daa1b8ba 100644
--- 
a/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/JdkCompiler.java
+++ 
b/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/JdkCompiler.java
@@ -120,7 +120,8 @@ public class JdkCompiler extends AbstractCompiler {
         Boolean result = compiler.getTask(null, javaFileManager, 
diagnosticCollector, options,
                 null, Collections.singletonList(javaFileObject)).call();
         if (result == null || !result) {
-            throw new IllegalStateException("Compilation failed. class: " + 
name + ", diagnostics: " + diagnosticCollector);
+            throw new IllegalStateException("Compilation failed. class: " + 
name + ", diagnostics: "
+                + diagnosticCollector.getDiagnostics());
         }
         return classLoader.loadClass(name);
     }

Reply via email to