[KEYCLOAK-3135] - Tests and typos

This commit is contained in:
Pedro Igor committed 2017-04-12 00:52:13 -03:00
1 parent 0b8fc3d6e1
commit cf1e8d1dd8
5 files changed
+268 -6

No files matched your search

@@ -133,16 +133,16 @@ public class UserPolicyProviderFactory implements PolicyProviderFactory {
}
static String[] getUsers(Policy policy) {
String roles = policy.getConfig().get("users");
String users = policy.getConfig().get("users");
if (roles != null) {
if (users != null) {
try {
return JsonSerialization.readValue(roles.getBytes(), String[].class);
return JsonSerialization.readValue(users.getBytes(), String[].class);
} catch (IOException e) {
throw new RuntimeException("Could not parse roles [" + roles + "] from policy config [" + policy.getName() + ".", e);
throw new RuntimeException("Could not parse users [" + users + "] from policy config [" + policy.getName() + ".", e);
}
}
return new String[]{};
return new String[0];
}
}