From c30857d052fc06d62623593659637520906fa0ab Mon Sep 17 00:00:00 2001 From: Danny van Heumen Date: Mon, 20 Jul 2015 21:48:36 +0200 Subject: Throw IllegalStateException in case client ID or client secret is missing. --- .../java/sip/communicator/impl/googlecontacts/OAuth2TokenStore.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/net/java/sip/communicator/impl/googlecontacts/OAuth2TokenStore.java b/src/net/java/sip/communicator/impl/googlecontacts/OAuth2TokenStore.java index 9a503f4..bd64bb7 100644 --- a/src/net/java/sip/communicator/impl/googlecontacts/OAuth2TokenStore.java +++ b/src/net/java/sip/communicator/impl/googlecontacts/OAuth2TokenStore.java @@ -149,6 +149,12 @@ public class OAuth2TokenStore public synchronized Credential get(final String identity) throws FailedAcquireCredentialException { + if (GOOGLE_API_CLIENT_ID == null || GOOGLE_API_CLIENT_SECRET == null) + { + throw new IllegalStateException("Missing client ID or client " + + "secret. It is not possible to use Google Contacts API " + + "without it."); + } if (this.store.get() == null) { try -- cgit v1.1