Skip to content

Commit b9a0139

Browse files
committed
Change handling of legacy docker volumes
1 parent 4c56e4d commit b9a0139

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/pipeline/SequenceJob.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,16 +188,11 @@ public void setFolderFileRoot(PipeRoot folderFileRoot)
188188
}
189189

190190
public Collection<String> getDockerVolumes()
191-
{
192-
return _dockerVolumes == null ? Collections.emptySet() : Collections.unmodifiableCollection(_dockerVolumes);
193-
}
194-
195-
public void setDockerVolumes(Collection<String> dockerVolumes)
196191
{
197192
// TODO: this is for legacy jobs that included the -v arg. Eventually remove:
198-
if (dockerVolumes.stream().anyMatch(x -> x.startsWith("-v")))
193+
if (_dockerVolumes != null && _dockerVolumes.stream().anyMatch(x -> x.startsWith("-v")))
199194
{
200-
dockerVolumes = dockerVolumes.stream().map(x -> {
195+
_dockerVolumes = _dockerVolumes.stream().map(x -> {
201196
if (x.startsWith("-v"))
202197
{
203198
x = x.split(":")[1];
@@ -208,6 +203,11 @@ public void setDockerVolumes(Collection<String> dockerVolumes)
208203
}).collect(Collectors.toSet());
209204
}
210205

206+
return _dockerVolumes == null ? Collections.emptySet() : Collections.unmodifiableCollection(_dockerVolumes);
207+
}
208+
209+
public void setDockerVolumes(Collection<String> dockerVolumes)
210+
{
211211
_dockerVolumes = dockerVolumes;
212212
}
213213

0 commit comments

Comments
 (0)