Merge "Google Login - when the datastore is corrupt (i.e when the set active user is not a logged in user), an exception is thrown. Fix this by properly logging the error and setting no active user." into idea133 automerge: 507028e * commit '507028e964c7cbc448cc7273daf5017a3d2fad9f': Google Login - when the datastore is corrupt (i.e when the set active user is not a logged in user), an exception is thrown. Fix this by properly logging the error and setting no active user.
diff --git a/login/src/com/google/gct/login/GoogleLogin.java b/login/src/com/google/gct/login/GoogleLogin.java index 50d6c67..2537799 100644 --- a/login/src/com/google/gct/login/GoogleLogin.java +++ b/login/src/com/google/gct/login/GoogleLogin.java
@@ -695,7 +695,13 @@ if(activeUserString == null) { users.removeActiveUser(); } else { - users.setActiveUser(activeUserString); + try { + users.setActiveUser(activeUserString); + } catch (IllegalArgumentException ex) { + GOOGLE_LOGIN_LOG.error("Error while initiating users", ex); + // Set no active user + users.removeActiveUser(); + } } } }