Skip to content

Commit

Permalink
Update to isEmpty method and rename configuration field
Browse files Browse the repository at this point in the history
Signed-off-by: Keshav Carpenter <[email protected]>
  • Loading branch information
alpha951 authored and rohanKanojia committed May 18, 2024
1 parent 2652a6b commit d23c92c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,20 +408,20 @@ RunVolumeConfiguration getVolumeConfig() {
RunVolumeConfiguration.Builder builder = new RunVolumeConfiguration.Builder();
List<String> volumes = asList("volumes");
boolean added = false;
if (volumes.size() > 0) {
if (!volumes.isEmpty()) {
builder.bind(volumes);
added = true;
}
List<String> volumesFrom = asList("volumes_from");
if (volumesFrom.size() > 0) {
if (!volumesFrom.isEmpty()) {
builder.from(volumesFrom);
added = true;
}

if (added) {
RunVolumeConfiguration configuration = builder.build();
VolumeBindingUtil.resolveRelativeVolumeBindings(baseDir, configuration);
return configuration;
RunVolumeConfiguration runVolumeConfiguration = builder.build();
VolumeBindingUtil.resolveRelativeVolumeBindings(baseDir, runVolumeConfiguration);
return runVolumeConfiguration;
}

return null;
Expand Down

0 comments on commit d23c92c

Please sign in to comment.