Skip to content

Commit

Permalink
Use isEmpty() to check whether collection is empty or not in SourceM…
Browse files Browse the repository at this point in the history
…ojo.java

Signed-off-by: Mohamed Abdullah <[email protected]>
  • Loading branch information
mdxabu authored and rohanKanojia committed Feb 4, 2024
1 parent e8207b9 commit 68d31d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/io/fabric8/maven/docker/SourceMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected void executeInternal(ServiceHub hub) throws DockerAccessException, Moj
}
}
}
if (sourceMode == BuildImageSelectMode.first && imageConfigs.size() > 0) {
if (sourceMode == BuildImageSelectMode.first && !imageConfigs.isEmpty()) {
ImageConfiguration imageConfig = imageConfigs.get(0);
File dockerTar = hub.getArchiveService().createDockerBuildArchive(imageConfig, params);
projectHelper.attachArtifact(project, getArchiveType(imageConfig),
Expand Down

0 comments on commit 68d31d0

Please sign in to comment.