Skip to content

Commit

Permalink
Return empty map if no properties in valueMap() (#1656)
Browse files Browse the repository at this point in the history
  • Loading branch information
shirly121 committed Jun 2, 2022
1 parent ce91b0c commit b5bb440
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ public Object parseFrom(IrResult.Results results) {
ParserUtils.parseElement(column.getEntry().getElement());
if (parseElement instanceof Map) {
Map projectTags = (Map) parseElement;
// return empty Map if none properties
Map tagEntry =
(Map)
projectResult.computeIfAbsent(
tag, k1 -> new HashMap<>());
projectTags.forEach(
(k, v) -> {
if (!(v instanceof EmptyValue)) {
Expand All @@ -97,11 +102,6 @@ public Object parseFrom(IrResult.Results results) {
+ " key");
}
String property = getPropertyName(nameOrId);
Map tagEntry =
(Map)
projectResult.computeIfAbsent(
tag,
k1 -> new HashMap<>());
tagEntry.put(
property, Collections.singletonList(v));
}
Expand Down

0 comments on commit b5bb440

Please sign in to comment.