Skip to content

Commit

Permalink
SHIBUI-2380
Browse files Browse the repository at this point in the history
Fixed NPE issue when viewing version history of entity descriptor
  • Loading branch information
chasegawa committed Oct 17, 2022
1 parent cd75731 commit c654f28
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ private void setupSecurityRepresentationFromEntityDescriptor(EntityDescriptor ed
keyDescriptorRep.setElementType(keyInfoType);
if (keyInfoType != KeyDescriptorRepresentation.ElementType.unsupported) {
List<XMLObject> children = keyInfo.getOrderedChildren().stream().filter(xmlObj -> {
boolean xmlWeDoNotWant = xmlObj instanceof KeyName || xmlObj instanceof KeyValue;
boolean xmlWeDoNotWant = xmlObj instanceof KeyName || xmlObj instanceof KeyValue || xmlObj == null;
return !xmlWeDoNotWant;
}).collect(Collectors.toList());
XMLObject obj = children.get(0);
Expand All @@ -533,7 +533,7 @@ private void setupSecurityRepresentationFromEntityDescriptor(EntityDescriptor ed

private KeyDescriptorRepresentation.ElementType determineKeyInfoType(KeyInfo keyInfo) {
List<XMLObject> children = keyInfo.getOrderedChildren().stream().filter(xmlObj -> {
boolean xmlWeDoNotWant = xmlObj instanceof KeyName || xmlObj instanceof KeyValue;
boolean xmlWeDoNotWant = xmlObj instanceof KeyName || xmlObj instanceof KeyValue || xmlObj == null;
return !xmlWeDoNotWant;
}).collect(Collectors.toList());
if (children.size() < 1) {
Expand Down

0 comments on commit c654f28

Please sign in to comment.