Skip to content

Commit

Permalink
ResourceServiceImpl code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
ChengJie1053 committed Aug 14, 2023
1 parent c039b86 commit d3edfe5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import org.apache.streampark.flink.packer.maven.MavenTool;

import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.flink.configuration.ConfigOption;
import org.apache.flink.table.factories.Factory;
import org.apache.hadoop.shaded.org.apache.commons.codec.digest.DigestUtils;
Expand Down Expand Up @@ -284,7 +285,7 @@ public RestResponse checkResource(Resource resourceParam) throws JsonProcessingE
Manifest manifest = Utils.getJarManifest(jarFile);
String mainClass = manifest.getMainAttributes().getValue("Main-Class");

if (mainClass == null) {
if (mainClass == null && StringUtils.isBlank(resourceParam.getMainClass())) {
// main class is null
resp.put("state", 2);
return RestResponse.success().data(resp);
Expand Down

0 comments on commit d3edfe5

Please sign in to comment.