Skip to content

Commit

Permalink
SHIBUI-2380
Browse files Browse the repository at this point in the history
fixing NPE issue
  • Loading branch information
chasegawa committed Oct 7, 2022
1 parent 0145004 commit 6dff6c8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class JsonSchemaBuilderService {
void addRelyingPartyOverridesToJson(Object json, String protocol) {
def properties = [:]
customPropertiesConfiguration.getOverrides().stream().filter {
it -> it.protocol.contains(protocol)
it -> it.getProtocol().contains(protocol)
}.each {
if (it.protocol)
def property
Expand All @@ -73,7 +73,7 @@ class JsonSchemaBuilderService {

void addRelyingPartyOverridesCollectionDefinitionsToJson(Object json, String protocol) {
customPropertiesConfiguration.getOverrides().stream().filter {
it -> it.protocol.contains(protocol) && it['displayType'] && (it['displayType'] == 'list' || it['displayType'] == 'set' || it['displayType'] == 'selection_list')
it -> it.getProtocol().contains(protocol) && it['displayType'] && (it['displayType'] == 'list' || it['displayType'] == 'set' || it['displayType'] == 'selection_list')
}.each {
def definition = [title : it['displayName'],
description: it['helpText'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import javax.persistence.JoinColumn;
import javax.persistence.Transient;

import liquibase.pro.packaged.O;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
Expand Down Expand Up @@ -94,7 +95,12 @@ public String getTypeForUI() {
return "string";
}
}


@Override
public String getProtocol() {
return protocol == null ? "saml, oidc" : protocol;
}

@Override
public void setDefaultValues(Set<String> defaultValues) {
// This is here to comply with the interface only and should not be used to change the set of values in this implementation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public CustomAttributeType getAttributeType() {
}
}

@Override
public String getProtocol() {
return protocol == null ? "saml, oidc" : protocol;
}
Expand Down

0 comments on commit 6dff6c8

Please sign in to comment.