See gh-20192
This commit is contained in:
zhangt2333
2020-02-15 12:14:40 +08:00
committed by Stephane Nicoll
parent ff4de95b3e
commit e2d87a89d0
5 changed files with 6 additions and 18 deletions

View File

@@ -74,10 +74,7 @@ class ProjectGenerator {
return true;
}
// explicit name hasn't been provided for an archive and there is no extension
if (isZipArchive(response) && request.getOutput() != null && !request.getOutput().contains(".")) {
return true;
}
return false;
return isZipArchive(response) && request.getOutput() != null && !request.getOutput().contains(".");
}
private boolean isZipArchive(ProjectGenerationResponse entity) {

View File

@@ -140,10 +140,7 @@ public class DependencyCustomizer {
protected boolean canAdd() {
for (String path : paths) {
try {
if (DependencyCustomizer.this.loader.getResource(path) == null) {
return false;
}
return true;
return DependencyCustomizer.this.loader.getResource(path) != null;
}
catch (Exception ex) {
// swallow exception and continue
@@ -166,10 +163,7 @@ public class DependencyCustomizer {
protected boolean canAdd() {
for (String path : paths) {
try {
if (DependencyCustomizer.this.loader.getResource(path) != null) {
return true;
}
return false;
return DependencyCustomizer.this.loader.getResource(path) != null;
}
catch (Exception ex) {
// swallow exception and continue