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
|
@Override
|
||||||
public String getFirstAttribute(String name) {
|
public String getFirstAttribute(String name) {
|
||||||
for (RoleAttributeEntity attribute : role.getAttributes()) {
|
return getAttributeStream(name).findFirst().orElse(null);
|
||||||
if (attribute.getName().equals(name)) {
|
|
||||||
return attribute.getValue();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue