[keycloak-user] Possible bug in GroupModel implementations
Ilya Korol
llivezking at gmail.com
Thu Aug 3 04:34:05 EDT 2017
Hi. i'm working on some extensions for keycloak for our team purposes.
Today i note that some instance of GroupModel(retrieved from keycloak)
returned for me null from method getAttribute(String attrName). But
javadoc from GroupModel states that this method never return null:
/**
* @param name
* @return list of all attribute values or empty list if there are
not any values. Never return null
*/
List<String> getAttribute(String name);
I checked implementations in keycloak-parent and found this in
org.keycloak.models.cache.infinispan.GroupAdapter:
@Override
public List<String> getAttribute(String name) {
List<String> values = cached.getAttributes().get(name);
if (values == null) return null; <---- Attention
return values;
}
Is it bug?
More information about the keycloak-user
mailing list