diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2009-04-27 11:33:33 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2009-04-27 11:33:33 +0000 |
commit | 7967be434b5dc254e0e934382424f507fa984cd0 (patch) | |
tree | 02b31483e3d37d971bd83236f0ade500d5dbcbb3 /src/net/java/sip | |
parent | 66a5e4f5d75892fe5e3bdcd39beadc77644f44b9 (diff) | |
download | jitsi-7967be434b5dc254e0e934382424f507fa984cd0.zip jitsi-7967be434b5dc254e0e934382424f507fa984cd0.tar.gz jitsi-7967be434b5dc254e0e934382424f507fa984cd0.tar.bz2 |
Minor clean-up - fixes raw-type and unused-import warnings, simplifies a few for loops, adds final to a field.
Diffstat (limited to 'src/net/java/sip')
3 files changed, 11 insertions, 18 deletions
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 c5329aa..4f41c54 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 @@ -13,7 +13,6 @@ import java.util.*; import javax.swing.*; import javax.swing.event.*; -import javax.swing.text.*; import net.java.sip.communicator.impl.gui.*; import net.java.sip.communicator.impl.gui.customcontrols.*; diff --git a/src/net/java/sip/communicator/impl/protocol/SingleCallInProgressPolicy.java b/src/net/java/sip/communicator/impl/protocol/SingleCallInProgressPolicy.java index 3d98846..31fc265 100644 --- a/src/net/java/sip/communicator/impl/protocol/SingleCallInProgressPolicy.java +++ b/src/net/java/sip/communicator/impl/protocol/SingleCallInProgressPolicy.java @@ -240,18 +240,11 @@ public class SingleCallInProgressPolicy {
synchronized (calls)
{
- for (Iterator<Call> callIter = calls.iterator(); callIter
- .hasNext();)
- {
- Call otherCall = callIter.next();
-
+ for (Call otherCall : calls)
if (!call.equals(otherCall)
- && CallState.CALL_IN_PROGRESS.equals(otherCall
- .getCallState()))
- {
+ && CallState.CALL_IN_PROGRESS
+ .equals(otherCall.getCallState()))
putOnHold(otherCall);
- }
- }
}
}
}
diff --git a/src/net/java/sip/communicator/util/Logger.java b/src/net/java/sip/communicator/util/Logger.java index be30d2d..bc92ddc 100644 --- a/src/net/java/sip/communicator/util/Logger.java +++ b/src/net/java/sip/communicator/util/Logger.java @@ -3,7 +3,9 @@ * * Distributable under LGPL license. * See terms of license at gnu.org. - */package net.java.sip.communicator.util; + */ +package net.java.sip.communicator.util; + import java.util.logging.*; /** @@ -13,7 +15,7 @@ import java.util.logging.*; */ public class Logger { - private java.util.logging.Logger loggerDelegate = null; + private final java.util.logging.Logger loggerDelegate; /** * Base constructor @@ -40,7 +42,7 @@ public class Logger * @return a suitable Logger * @throws NullPointerException if the name is null. */ - public static Logger getLogger(Class clazz) + public static Logger getLogger(Class<?> clazz) throws NullPointerException { return getLogger(clazz.getName()); @@ -346,10 +348,9 @@ public class Logger private void setLevel(java.util.logging.Level level) { Handler[] handlers = loggerDelegate.getHandlers(); - for (int i = 0; i < handlers.length; i++) - { - handlers[i].setLevel(level); - } + for (Handler handler : handlers) + handler.setLevel(level); + loggerDelegate.setLevel(level); } } |