Fixes warnings from the Potential Programming Problems category of Eclipse SDK: access to references known to be null and assignments with no effect.

cusax-fix
Lyubomir Marinov 17 years ago
parent 504fa02ae9
commit 3eaed2f557

@ -225,8 +225,8 @@ public void stop(BundleContext bc)
if(opSetPresence != null)
{
opSetPersPresence .removeSubscriptionListener(
clSubscriptionEventHandler);
opSetPresence
.removeSubscriptionListener(clSubscriptionEventHandler);
}
}
}

@ -119,10 +119,11 @@ public File getPrivatePersistentFile(String fileName)
String fullPath = getFullPath(fileName);
file = this.accessibleFile(fullPath, fileName);
if (file == null) {
if (file == null)
{
throw new SecurityException("Insufficient rights to access "
+ "this file in current user's home directory: "
+ file.getAbsolutePath());
+ "this file in current user's home directory: "
+ new File(fullPath, fileName).getPath());
}
}
finally

@ -39,7 +39,6 @@ public class ContactIcqImpl
boolean isResolved)
{
this.joustSimBuddy = buddy;
this.isLocal = isLocal;
this.ssclCallback = ssclCallback;
this.isPersistent = isPersistent;
this.isResolved = isResolved;

@ -48,7 +48,6 @@ public class ContactJabberImpl
boolean isResolved)
{
this.rosterEntry = rosterEntry;
this.isLocal = isLocal;
this.ssclCallback = ssclCallback;
this.isPersistent = isPersistent;
this.isResolved = isResolved;
@ -63,7 +62,6 @@ public class ContactJabberImpl
boolean isPersistent)
{
this.tempId = id;
this.isLocal = isLocal;
this.ssclCallback = ssclCallback;
this.isPersistent = isPersistent;
this.isResolved = false;

@ -112,7 +112,7 @@ public void setUp()
assertTrue(
"Failed to find a provider factory service for protocol Gibberish",
serRefs != null || serRefs.length > 0);
(serRefs != null) && (serRefs.length > 0));
//Keep the reference for later usage.
providerFactory = (ProtocolProviderFactory)bc.getService(serRefs[0]);

@ -87,7 +87,7 @@ public void setUp() throws Exception
assertTrue(
"Failed to find a provider factory service for protocol ICQ",
serRefs != null || serRefs.length > 0);
(serRefs != null) && (serRefs.length > 0));
//Keep the reference for later usage.
providerFactory = (ProtocolProviderFactory)

@ -102,7 +102,7 @@ public void testRegisterWrongUsername()
assertTrue(
"Failed to find a provider factory service for protocol ICQ",
serRefs != null || serRefs.length > 0);
(serRefs != null) && (serRefs.length > 0));
//Keep the reference for later usage.
ProtocolProviderFactory icqProviderFactory =
@ -232,7 +232,7 @@ public void testRegisterWrongPassword()
assertTrue(
"Failed to find a provider factory service for protocol ICQ",
serRefs != null || serRefs.length > 0);
(serRefs != null) && (serRefs.length > 0));
//Keep the reference for later usage.
ProtocolProviderFactory icqProviderFactory =
@ -351,7 +351,7 @@ public void testInstallAccount()
assertTrue(
"Failed to find a provider factory service for protocol ICQ",
serRefs != null || serRefs.length > 0);
(serRefs != null) && (serRefs.length > 0));
//Keep the reference for later usage.
icqProviderFactory = (ProtocolProviderFactory)

@ -121,7 +121,7 @@ public void setUp()
assertTrue(
"Failed to find a provider factory service for protocol Jabber",
serRefs != null || serRefs.length > 0);
(serRefs != null) && (serRefs.length > 0));
//Keep the reference for later usage.
providerFactory = (ProtocolProviderFactory)bc.getService(serRefs[0]);

@ -112,7 +112,7 @@ public void setUp()
assertTrue(
"Failed to find a provider factory service for protocol msn",
serRefs != null || serRefs.length > 0);
(serRefs != null) && (serRefs.length > 0));
//Keep the reference for later usage.
providerFactory = (ProtocolProviderFactory)bc.getService(serRefs[0]);

@ -109,7 +109,7 @@ public void setUp()
assertTrue(
"Failed to find a provider factory service for protocol SIP",
serRefs != null || serRefs.length > 0);
(serRefs != null) && (serRefs.length > 0));
//Keep the reference for later usage.
providerFactory = (ProtocolProviderFactory)bc.getService(serRefs[0]);

@ -112,7 +112,7 @@ public void setUp()
assertTrue(
"Failed to find a provider factory service for protocol yahoo",
serRefs != null || serRefs.length > 0);
(serRefs != null) && (serRefs.length > 0));
//Keep the reference for later usage.
providerFactory = (ProtocolProviderFactory)bc.getService(serRefs[0]);

Loading…
Cancel
Save