Skip to content
Snippets Groups Projects
Commit e96f023f authored by srosse's avatar srosse
Browse files

OO-1382: hardened against null values

parent fbfd534b
No related branches found
No related tags found
No related merge requests found
......@@ -37,8 +37,11 @@ public class ShibbolethHelper {
*/
public static String getFirstValueOf(String attributeName, Map<String, String> shibbolethAttributesMap) {
String attrVal = shibbolethAttributesMap.get(attributeName);
ShibbolethAttribute multivalueShibbAttributeEmail = new ShibbolethAttribute(attributeName, attrVal);
return multivalueShibbAttributeEmail.getFirstValue();
if (attrVal != null) {
ShibbolethAttribute multivalueShibbAttributeEmail = new ShibbolethAttribute(attributeName, attrVal);
return multivalueShibbAttributeEmail.getFirstValue();
}
else return null;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment