Skip to content

Commit

Permalink
Updated Schema.getAttributeNames(), changed the type of isRequired fr…
Browse files Browse the repository at this point in the history
…om Boolean to primitive boolean to avoid NPE
  • Loading branch information
Zaid Siryani committed Jun 18, 2022
1 parent b451197 commit 07aedd8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.springframework.util.CollectionUtils;
Expand Down Expand Up @@ -120,7 +121,7 @@ public Set<String> getRequiredAttributeNames() {
StringJoiner stringJoiner = new StringJoiner(".");
pieces.subList(0, i + 1).forEach(stringJoiner::add);
String attrToSearchFor = stringJoiner.toString();
Boolean isRequired = attributeRequiredMap.get(attrToSearchFor);
boolean isRequired = BooleanUtils.toBoolean(attributeRequiredMap.get(attrToSearchFor));
if (!isRequired) {
hierarchicallyNotRequired = true;
break;
Expand Down

0 comments on commit 07aedd8

Please sign in to comment.