Skip to content

Commit

Permalink
pool: Fix -sticky option in migration module
Browse files Browse the repository at this point in the history
Addresses a regression that causes the -sticky option when
used without a value to not match any files.

The issue was that the empty value of a multi-valued option
was translated to an array with the empty string rather than
the empty array.

Target: trunk
Request: 2.7
Request: 2.6
Ticket: http://rt.dcache.org/Ticket/Display.html?id=8108
Require-notes: yes
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6247/
  • Loading branch information
gbehrmann committed Nov 14, 2013
1 parent 893e167 commit 7c34310
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -588,7 +588,9 @@ protected Object getValue(Args args)
if (!values.isEmpty()) {
List<String> fragments = Lists.newArrayList();
for (String value: values) {
addAll(fragments, _splitter.split(value));
if (!value.isEmpty()) {
addAll(fragments, _splitter.split(value));
}
}
return toArray(transform(fragments, _typeConverter),
(Class) _field.getType().getComponentType());
Expand Down

0 comments on commit 7c34310

Please sign in to comment.