aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLyubomir Marinov <lyubomir.marinov@jitsi.org>2008-08-23 22:10:29 +0000
committerLyubomir Marinov <lyubomir.marinov@jitsi.org>2008-08-23 22:10:29 +0000
commit843778525afbe46619b0b15962cfc025c8ddc7a6 (patch)
tree069c4db167de9e8612f296097e18f97549f677c7
parentf0c46adb22b1ca165ea26e6a3f9a5620ad77bb2f (diff)
downloadjitsi-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.
-rw-r--r--src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderFactoryGibberishImpl.java16
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java16
2 files changed, 16 insertions, 16 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderFactoryGibberishImpl.java b/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderFactoryGibberishImpl.java
index 0d9e68d..d6c7806 100644
--- a/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderFactoryGibberishImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderFactoryGibberishImpl.java
@@ -144,6 +144,14 @@ public class ProtocolProviderFactoryGibberishImpl
public void modifyAccount( ProtocolProviderService protocolProvider,
Map accountProperties)
{
+ // 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
= GibberishActivator.getBundleContext();
@@ -151,10 +159,6 @@ public class ProtocolProviderFactoryGibberishImpl
throw new NullPointerException(
"The specified BundleContext was null");
- if (protocolProvider == null)
- throw new NullPointerException(
- "The specified Protocol Provider was null");
-
GibberishAccountID accountID
= (GibberishAccountID) protocolProvider.getAccountID();
@@ -172,10 +176,6 @@ public class ProtocolProviderFactoryGibberishImpl
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.GIBBERISH);
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);