KEYCLOAK-1854
NPE in SystemInfoRepresentation if user.country or user.language not set
This commit is contained in:
parent
ca05455aa0
commit
2eaa03539c
1 changed files with 3 additions and 1 deletions
|
@ -46,7 +46,9 @@ public class SystemInfoRepresentation {
|
|||
rep.userName = System.getProperty("user.name");
|
||||
rep.userDir = System.getProperty("user.dir");
|
||||
rep.userTimezone = System.getProperty("user.timezone");
|
||||
rep.userLocale = (new Locale(System.getProperty("user.country"), System.getProperty("user.language")).toString());
|
||||
if (System.getProperty("user.country") != null && System.getProperty("user.language") != null) {
|
||||
rep.userLocale = (new Locale(System.getProperty("user.country"), System.getProperty("user.language")).toString());
|
||||
}
|
||||
return rep;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue