From c3d993a8eaa5c458b505a3cb0fe924875bc2254d Mon Sep 17 00:00:00 2001 From: foghost Date: Mon, 27 Nov 2023 19:18:54 +0800 Subject: [PATCH] fix native image build error when mainClass is null,add an empty string placeholder --- .../org/apache/dubbo/maven/plugin/aot/DubboProcessAotMojo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/DubboProcessAotMojo.java b/dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/DubboProcessAotMojo.java index c871e3f19a6..e4451d9582c 100644 --- a/dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/DubboProcessAotMojo.java +++ b/dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/DubboProcessAotMojo.java @@ -85,7 +85,7 @@ protected void executeAot() throws Exception { private String[] getAotArguments(String applicationClass) { List aotArguments = new ArrayList<>(); - aotArguments.add(applicationClass); + aotArguments.add(applicationClass != null ? applicationClass : ""); aotArguments.add(this.generatedSources.toString()); aotArguments.add(this.generatedResources.toString()); aotArguments.add(this.generatedClasses.toString());