Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Bill Burke 2014-06-02 09:37:30 -04:00
commit a180c6b896
2 changed files with 9 additions and 7 deletions

View file

@ -173,7 +173,7 @@ public class KeycloakInstalled {
}
public String getTokenString(long minValidity, TimeUnit unit) throws VerificationException, IOException, ServerRequest.HttpFailure {
long expires = token.getExpiration() * 1000 - unit.toMillis(minValidity);
long expires = ((long) token.getExpiration()) * 1000 - unit.toMillis(minValidity);
if (expires < System.currentTimeMillis()) {
refreshToken();
}

View file

@ -34,6 +34,7 @@ public class SocialUser {
}
public void setName(String name) {
if (name != null) {
int i = name.lastIndexOf(' ');
if (i != -1) {
firstName = name.substring(0, i);
@ -42,6 +43,7 @@ public class SocialUser {
firstName = name;
}
}
}
public void setName(String firstName, String lastName) {
this.firstName = firstName;