Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/main/java/org/spdx/storage/simple/StoredTypedItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,7 @@ public boolean addValueToList(PropertyDescriptor propertyDescriptor, Object valu
} else {
id = NO_ID_ID;
}
idValueMap.putIfAbsent(id, new ArrayList<>());
List<Object> list = idValueMap.get(id);
if (list == null) {
// handle the very small window where this may have gotten removed
list = new ArrayList<>();
idValueMap.putIfAbsent(id, list);
}
List<Object> list = idValueMap.computeIfAbsent(id, key -> new ArrayList<>());
return list.add(value);
} catch (Exception ex) {
throw new SpdxInvalidTypeException("Invalid list type for "+propertyDescriptor);
Expand Down
Loading