Skip to content

Commit 76b32f9

Browse files
author
saxenakshitiz
committed
Address review comments
1 parent f70fd32 commit 76b32f9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

hypertrace-graphql-label-application-rules-schema/src/main/java/org/hypertrace/graphql/label/application/rules/dao/LabelApplicationRuleRequestConverter.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package org.hypertrace.graphql.label.application.rules.dao;
22

33
import java.util.List;
4-
import java.util.Objects;
4+
import java.util.Optional;
55
import java.util.stream.Collectors;
66
import org.hypertrace.graphql.label.application.rules.request.LabelApplicationRuleCreateRequest;
77
import org.hypertrace.graphql.label.application.rules.request.LabelApplicationRuleDeleteRequest;
@@ -54,9 +54,7 @@ private LabelApplicationRuleData convertLabelApplicationRuleData(
5454
.setMatchingCondition(convertConditionList(data.conditionList()))
5555
.setLabelAction(convertLabelAction(data.action()))
5656
.setEnabled(data.enabled());
57-
if (Objects.nonNull(data.description())) {
58-
convertedDataBuilder.setDescription(Objects.requireNonNull(data.description()));
59-
}
57+
Optional.ofNullable(data.description()).ifPresent(convertedDataBuilder::setDescription);
6058
return convertedDataBuilder.build();
6159
}
6260

0 commit comments

Comments
 (0)