KEYCLOAK-15199 Use stream variant method in jpa/RoleAdapter.getFirstAttribute
This commit is contained in:
parent
3fd6f0ce10
commit
f037dabdc1
1 changed files with 1 additions and 7 deletions
|
@ -158,13 +158,7 @@ public class RoleAdapter implements RoleModel, JpaModel<RoleEntity> {
|
|||
|
||||
@Override
|
||||
public String getFirstAttribute(String name) {
|
||||
for (RoleAttributeEntity attribute : role.getAttributes()) {
|
||||
if (attribute.getName().equals(name)) {
|
||||
return attribute.getValue();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
return getAttributeStream(name).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue