Skip to content

Commit 9689594

Browse files
committed
handle empty values collection in setValues
1 parent 93aa6f7 commit 9689594

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

logicaldoc-core/src/main/java/com/logicaldoc/core/metadata/ExtensibleObject.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,11 @@ public List<Attribute> setValues(String name, List<Object> values) {
177177
removeAttribute(n);
178178
}
179179

180+
List<Attribute> attrs = new ArrayList<>();
181+
180182
if (CollectionUtils.isEmpty(values))
181-
throw new IllegalArgumentException("no values have been specified");
183+
return attrs;
182184

183-
List<Attribute> attrs = new ArrayList<>();
184185
Attribute master = setValue(name, values.get(0));
185186
attrs.add(master);
186187

0 commit comments

Comments
 (0)