diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2008-08-23 22:10:29 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2008-08-23 22:10:29 +0000 |
commit | 843778525afbe46619b0b15962cfc025c8ddc7a6 (patch) | |
tree | 069c4db167de9e8612f296097e18f97549f677c7 /src/net/java/sip/communicator/impl/protocol/icq | |
parent | f0c46adb22b1ca165ea26e6a3f9a5620ad77bb2f (diff) | |
download | jitsi-843778525afbe46619b0b15962cfc025c8ddc7a6.zip jitsi-843778525afbe46619b0b15962cfc025c8ddc7a6.tar.gz jitsi-843778525afbe46619b0b15962cfc025c8ddc7a6.tar.bz2 |
Applies the patch contributed by Dai Zhiwei which fixes the throwing of NullPointerException with details on the parameter being the cause in the Gibberish and Icq ProtocolProviderFactory implementations.
Diffstat (limited to 'src/net/java/sip/communicator/impl/protocol/icq')
-rw-r--r-- | src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java index 6320497..8665b4c 100644 --- a/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java @@ -313,6 +313,14 @@ public class ProtocolProviderFactoryIcqImpl Map accountProperties) throws NullPointerException { + // Make sure the specified arguments are valid. + if (protocolProvider == null) + throw new NullPointerException( + "The specified Protocol Provider was null"); + if (accountProperties == null) + throw new NullPointerException( + "The specified property map was null"); + BundleContext context = IcqActivator.getBundleContext(); @@ -320,10 +328,6 @@ public class ProtocolProviderFactoryIcqImpl throw new NullPointerException( "The specified BundleContext was null"); - if (protocolProvider == null) - throw new NullPointerException( - "The specified Protocol Provider was null"); - IcqAccountID accountID = (IcqAccountID) protocolProvider.getAccountID(); // If the given accountID doesn't correspond to an existing account @@ -340,10 +344,6 @@ public class ProtocolProviderFactoryIcqImpl accountProperties.put(USER_ID, accountID.getUserID()); - if (accountProperties == null) - throw new NullPointerException( - "The specified property map was null"); - if (!accountProperties.containsKey(PROTOCOL)) accountProperties.put(PROTOCOL, ProtocolNames.ICQ); |