From f8e06f4b7c965b915408703e3b53c2c7cda82c42 Mon Sep 17 00:00:00 2001 From: Yana Stamcheva Date: Thu, 15 Sep 2011 12:51:20 +0000 Subject: Fixes NullPointerException for previously stored google contacts accounts (reported by Emil Ivov). --- .../communicator/impl/googlecontacts/GoogleContactsServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/net/java/sip/communicator/impl/googlecontacts') diff --git a/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsServiceImpl.java b/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsServiceImpl.java index c744ced..9c5a0aa 100644 --- a/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsServiceImpl.java +++ b/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsServiceImpl.java @@ -114,8 +114,14 @@ public class GoogleContactsServiceImpl boolean enabled = Boolean.parseBoolean((String)oen); String login = (String)configService.getProperty(path + ".account"); + String prefix = (String)configService.getProperty(path + ".prefix"); + // If this property doesn't exist, like for old stored accounts, we + // just need to initialize it to the empty string. + if(prefix == null) + prefix = ""; + String password = credentialsService.loadPassword(path); GoogleContactsConnectionImpl cnx = (GoogleContactsConnectionImpl) -- cgit v1.1