Skip to content
Snippets Groups Projects
Commit 665b28a1 authored by Zhibin Mai's avatar Zhibin Mai
Browse files

Use map getOrDefault method to simplify the codes

parent bd5a73db
Branches
Tags
1 merge request!601Augmenter performance enhancement
Pipeline #207080 failed
......@@ -195,7 +195,7 @@ public class PropertyConfigurationsServiceImpl implements PropertyConfigurations
for (String relatedObjectId : relatedObjectIds) {
String id = PropertyUtil.removeIdPostfix(relatedObjectId);
Map<String, Object> relatedObject = idObjectDataMap.containsKey(id)? idObjectDataMap.get(id) : null;
Map<String, Object> relatedObject = idObjectDataMap.getOrDefault(id, new HashMap<>());
Map<String, Object> propertyValues = getExtendedPropertyValues(extendedPropertyName, relatedObject, path.getValueExtraction(), configuration.isExtractFirstMatch());
if (allPropertyValues.isEmpty() && configuration.isExtractFirstMatch()) {
allPropertyValues = propertyValues;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment