Skip to content

Commit

Permalink
[SHIBUI-999]
Browse files Browse the repository at this point in the history
Added a fix for dealing with ambiguous types stored in the relying party
overrides map.
  • Loading branch information
Bill Smith committed Nov 14, 2018
1 parent 836880d commit 7833ae1
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,20 @@ public List<Attribute> getAttributeListFromRelyingPartyOverridesRepresentation(M
case BOOLEAN:
if (overrideProperty.getPersistType() != null &&
!overrideProperty.getPersistType().equalsIgnoreCase("boolean") &&
(Boolean) entry.getValue()) {
Boolean.valueOf((String)entry.getValue())) {
list.add(attributeUtility.createAttributeWithStringValues(overrideProperty.getAttributeName(),
overrideProperty.getAttributeFriendlyName(),
overrideProperty.getPersistValue()));
} else {
list.add(attributeUtility.createAttributeWithBooleanValue(overrideProperty.getAttributeName(),
overrideProperty.getAttributeFriendlyName(),
(Boolean) entry.getValue()));
if (entry.getValue() instanceof String) {
list.add(attributeUtility.createAttributeWithBooleanValue(overrideProperty.getAttributeName(),
overrideProperty.getAttributeFriendlyName(),
Boolean.valueOf((String) entry.getValue())));
} else {
list.add(attributeUtility.createAttributeWithBooleanValue(overrideProperty.getAttributeName(),
overrideProperty.getAttributeFriendlyName(),
(Boolean) entry.getValue()));
}
}
break;
case INTEGER:
Expand Down

0 comments on commit 7833ae1

Please sign in to comment.