diff options
author | Oluwatobi Bashir-Bello <nbashirbello@google.com> | 2014-08-21 09:33:49 -0400 |
---|---|---|
committer | Oluwatobi Bashir-Bello <nbashirbello@google.com> | 2014-08-21 09:41:04 -0400 |
commit | 5d3234a83db151db7f7f3b95ba9c48ae896f35b1 (patch) | |
tree | 4e14462371f62b3fe6fa20f553a32a5ad371da3e | |
parent | 04453f6a12c441447933595f2f18168e89660bca (diff) | |
download | cloud-5d3234a83db151db7f7f3b95ba9c48ae896f35b1.tar.gz |
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.
Change-Id: I11917a86cf52bfec439e50949edb08b5e3928e28
-rw-r--r-- | login/src/com/google/gct/login/GoogleLogin.java | 8 |
1 files changed, 7 insertions, 1 deletions
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 @@ public class GoogleLogin { 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(); + } } } } |