diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactList.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactList.java
index 4f41c54bb..43107439f 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactList.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactList.java
@@ -1289,16 +1289,7 @@ else if(isShowOffline && newListSize > 0)
// Try to set the previously selected object.
if (selectedObject != null)
{
- if (selectedObject instanceof MetaContact)
- {
- this.setSelectedIndex(
- listModel.indexOf(selectedObject));
- }
- else
- {
- this.setSelectedIndex(
- listModel.indexOf(selectedObject));
- }
+ this.setSelectedIndex(listModel.indexOf(selectedObject));
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/WhiteboardSessionJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/WhiteboardSessionJabberImpl.java
index eace78fa7..bbc2d2046 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/WhiteboardSessionJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/WhiteboardSessionJabberImpl.java
@@ -4,7 +4,6 @@
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
-
package net.java.sip.communicator.impl.protocol.jabber;
import java.util.*;
@@ -12,7 +11,9 @@
import net.java.sip.communicator.impl.protocol.jabber.extensions.version.*;
import net.java.sip.communicator.impl.protocol.jabber.extensions.whiteboard.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.service.protocol.whiteboardobjects.*;
+import net.java.sip.communicator.util.*;
import org.jivesoftware.smack.*;
import org.jivesoftware.smack.filter.*;
@@ -20,9 +21,6 @@
import org.jivesoftware.smack.util.*;
import org.jivesoftware.smackx.*;
-import net.java.sip.communicator.service.protocol.event.*;
-import net.java.sip.communicator.util.*;
-
/**
* A representation of a WhiteboardSession.
*
@@ -71,7 +69,8 @@ public class WhiteboardSessionJabberImpl
/**
* Stores all white board objects contained in this session.
*/
- private Vector whiteboardObjects = new Vector();
+ private final Vector whiteboardObjects
+ = new Vector();
/**
* The OperationSet charged with the whiteboarding.
@@ -602,8 +601,7 @@ public void deleteWhiteboardObject(WhiteboardObject obj)
int i = 0;
while (i < whiteboardObjects.size())
{
- WhiteboardObjectJabberImpl wbObj =
- (WhiteboardObjectJabberImpl) whiteboardObjects.get(i);
+ WhiteboardObjectJabberImpl wbObj = whiteboardObjects.get(i);
if (wbObj.getID().equals(obj.getID()))
whiteboardObjects.remove(i);
else
@@ -942,8 +940,7 @@ else if (evt instanceof WhiteboardObjectDeletedEvent)
int i = 0;
while (i < whiteboardObjects.size())
{
- WhiteboardObjectJabberImpl wbObj
- = (WhiteboardObjectJabberImpl) whiteboardObjects.get(i);
+ WhiteboardObjectJabberImpl wbObj = whiteboardObjects.get(i);
if (wbObj.getID().equals(wbObjID))
whiteboardObjects.remove(i);
else
@@ -953,13 +950,13 @@ else if (evt instanceof WhiteboardObjectDeletedEvent)
}
else if (evt instanceof WhiteboardObjectModifiedEvent)
{
+ WhiteboardObjectModifiedEvent womevt
+ = (WhiteboardObjectModifiedEvent) evt;
WhiteboardObjectJabberImpl wbObj
= (WhiteboardObjectJabberImpl)
- ((WhiteboardObjectReceivedEvent) evt)
- .getSourceWhiteboardObject();
+ womevt.getSourceWhiteboardObject();
- listener.whiteboardObjecModified(
- (WhiteboardObjectModifiedEvent) evt);
+ listener.whiteboardObjecModified(womevt);
whiteboardObjects.remove(wbObj);//remove the old id object
whiteboardObjects.add(wbObj); //add the new object for this id
@@ -978,8 +975,7 @@ private WhiteboardObject updateWhiteboardObjects(WhiteboardObject ws)
int i = 0;
while (i < whiteboardObjects.size())
{
- WhiteboardObjectJabberImpl wbObjTmp =
- (WhiteboardObjectJabberImpl) whiteboardObjects.get(i);
+ WhiteboardObjectJabberImpl wbObjTmp = whiteboardObjects.get(i);
if (wbObjTmp.getID().equals(ws.getID()))
{
wbObj = wbObjTmp;
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/SipStackProperties.java b/src/net/java/sip/communicator/impl/protocol/sip/SipStackProperties.java
index e963ed838..bab52216e 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/SipStackProperties.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/SipStackProperties.java
@@ -246,7 +246,7 @@ else if (logLevel.equals(Level.WARNING.getName())
{
jainSipTraceLevel = "ERROR";
}
- else if (logLevel.equals(Level.OFF))
+ else if (logLevel.equals(Level.OFF.getName()))
{
jainSipTraceLevel = "OFF";
}
diff --git a/src/net/java/sip/communicator/service/protocol/AccountID.java b/src/net/java/sip/communicator/service/protocol/AccountID.java
index b5097fc12..a41202d35 100644
--- a/src/net/java/sip/communicator/service/protocol/AccountID.java
+++ b/src/net/java/sip/communicator/service/protocol/AccountID.java
@@ -255,12 +255,9 @@ public boolean equals(Object obj)
if (this == obj)
return true;
- if( obj == null
- || ! (getClass().isInstance(obj))
- || ! (userID.equals(((AccountID)obj).userID)))
- return false;
-
- return true;
+ return (obj != null)
+ && getClass().isInstance(obj)
+ && userID.equals(((AccountID)obj).userID);
}
/**