Skip to content

Commit

Permalink
[Improve] minor improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
benjobs committed Nov 17, 2023
1 parent 65666d2 commit 5db2356
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -468,16 +468,14 @@ private void prepareJars(Application app) throws IOException {
}

private File getAppDistJar(Application app) {
File userJar;
if (app.getApplicationType() == ApplicationType.STREAMPARK_FLINK) {
userJar = new File(app.getDistHome(), app.getModule().concat(".jar"));
} else if (app.getApplicationType() == ApplicationType.APACHE_FLINK) {
userJar = new File(app.getDistHome(), app.getJar());
} else {
throw new IllegalArgumentException(
"[StreamPark] unsupported ApplicationType of custom code: " + app.getApplicationType());
return new File(app.getDistHome(), app.getModule().concat(".jar"));
}
if (app.getApplicationType() == ApplicationType.APACHE_FLINK) {
return new File(app.getDistHome(), app.getJar());
}
return userJar;
throw new IllegalArgumentException(
"[StreamPark] unsupported ApplicationType of custom code: " + app.getApplicationType());
}

/** copy from {@link ApplicationServiceImpl#start(Application, boolean)} */
Expand Down

0 comments on commit 5db2356

Please sign in to comment.