Skip to content

Commit

Permalink
SHIBUI-2380
Browse files Browse the repository at this point in the history
Bug fxing
  • Loading branch information
chasegawa committed Oct 25, 2022
1 parent 1eb26cc commit 622f3df
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ public static List<org.opensaml.saml.saml2.core.Attribute> getAttributeListFromA
return (List<org.opensaml.saml.saml2.core.Attribute>) (List<? extends org.opensaml.saml.saml2.core.Attribute>) attributeList;
}

public static List<org.opensaml.saml.saml2.core.Attribute> getAttributeListFromRelyingPartyOverridesRepresentation
(Map<String, Object> relyingPartyOverridesRepresentation) {
public static List<org.opensaml.saml.saml2.core.Attribute> getAttributeListFromRelyingPartyOverridesRepresentation(Map<String, Object> relyingPartyOverridesRepresentation) {
List<IRelyingPartyOverrideProperty> overridePropertyList = customPropertiesConfiguration.getOverrides();
List<edu.internet2.tier.shibboleth.admin.ui.domain.Attribute> list = new ArrayList<>();

Expand All @@ -176,10 +175,8 @@ public static List<org.opensaml.saml.saml2.core.Attribute> getAttributeListFromA
public static Attribute getAttributeFromObjectAndRelyingPartyOverrideProperty(Object o, IRelyingPartyOverrideProperty overrideProperty) {
switch (ModelRepresentationConversions.AttributeTypes.valueOf(overrideProperty.getDisplayType().toUpperCase())) {
case BOOLEAN:
if ((o instanceof Boolean && ((Boolean) o)) ||
(o instanceof String) && Boolean.valueOf((String) o)) {
if (overrideProperty.getPersistType() != null &&
!overrideProperty.getPersistType().equalsIgnoreCase("boolean")) {
if ((o instanceof Boolean && ((Boolean) o)) || (o instanceof String) && Boolean.valueOf((String) o)) {
if (overrideProperty.getPersistType() != null && !overrideProperty.getPersistType().equalsIgnoreCase("boolean")) {
return ATTRIBUTE_UTILITY.createAttributeWithStringValues(overrideProperty.getAttributeName(),
overrideProperty.getAttributeFriendlyName(),
overrideProperty.getPersistValue());
Expand All @@ -200,7 +197,7 @@ public static Attribute getAttributeFromObjectAndRelyingPartyOverrideProperty(Ob
case INTEGER:
return ATTRIBUTE_UTILITY.createAttributeWithIntegerValue(overrideProperty.getAttributeName(),
overrideProperty.getAttributeFriendlyName(),
Integer.valueOf((String) o));
(Integer) o);
case STRING:
case LONG:
case DOUBLE:
Expand Down Expand Up @@ -236,4 +233,4 @@ public enum AttributeTypes {
SELECTION_LIST, // another name for LIST
SPRING_BEAN_ID // treat as STRING
}
}
}

0 comments on commit 622f3df

Please sign in to comment.