diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2009-02-10 13:47:41 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2009-02-10 13:47:41 +0000 |
commit | 0f475900c4fa0fc60f3a399caf8500ea0ba4ef67 (patch) | |
tree | 4dc435ebefb784905d2de26032e2902f38df9777 /src/net/java/sip/communicator | |
parent | 3780cb36d95961fbe5e32271dbfe6df04c75736d (diff) | |
download | jitsi-0f475900c4fa0fc60f3a399caf8500ea0ba4ef67.zip jitsi-0f475900c4fa0fc60f3a399caf8500ea0ba4ef67.tar.gz jitsi-0f475900c4fa0fc60f3a399caf8500ea0ba4ef67.tar.bz2 |
Removes unused fields, fixes raw-type warnings.
Diffstat (limited to 'src/net/java/sip/communicator')
37 files changed, 77 insertions, 251 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatTransportSelectorBox.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatTransportSelectorBox.java index 303442c..e025fc4 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatTransportSelectorBox.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatTransportSelectorBox.java @@ -35,20 +35,17 @@ public class ChatTransportSelectorBox private static final Logger logger = Logger.getLogger(ChatTransportSelectorBox.class); - private Hashtable transportMenuItems = new Hashtable(); + private final Map<ChatTransport, JMenuItem> transportMenuItems = + new Hashtable<ChatTransport, JMenuItem>(); - private SIPCommMenu menu = new SIPCommMenu(); + private final SIPCommMenu menu = new SIPCommMenu(); - private ChatPanel chatPanel; - - private ChatSession chatSession; + private final ChatSession chatSession; public ChatTransportSelectorBox(ChatPanel chatPanel, ChatSession chatSession, ChatTransport selectedChatTransport) { - this.chatPanel = chatPanel; - this.chatSession = chatSession; this.menu.setPreferredSize(new Dimension(28, 24)); @@ -95,7 +92,7 @@ public class ChatTransportSelectorBox */ public void removeChatTransport(ChatTransport chatTransport) { - this.menu.remove((JMenuItem)transportMenuItems.get(chatTransport)); + this.menu.remove(transportMenuItems.get(chatTransport)); this.transportMenuItems.remove(chatTransport); } @@ -106,12 +103,11 @@ public class ChatTransportSelectorBox { JMenuItem menuItem = (JMenuItem) e.getSource(); - Enumeration<ChatTransport> chatTransports = transportMenuItems.keys(); - while(chatTransports.hasMoreElements()) + for (Map.Entry<ChatTransport, JMenuItem> transportMenuItem : transportMenuItems.entrySet()) { - ChatTransport chatTransport = chatTransports.nextElement(); + ChatTransport chatTransport = transportMenuItem.getKey(); - if (transportMenuItems.get(chatTransport).equals(menuItem)) + if (transportMenuItem.getValue().equals(menuItem)) { this.setSelected(chatTransport, (ImageIcon) menuItem.getIcon()); @@ -190,7 +186,7 @@ public class ChatTransportSelectorBox this.setSelected(chatTransport); } - menuItem = (JMenuItem) transportMenuItems.get(chatTransport); + menuItem = transportMenuItems.get(chatTransport); icon = new ImageIcon(createTransportStatusImage(chatTransport)); menuItem.setIcon(icon); @@ -255,17 +251,12 @@ public class ChatTransportSelectorBox */ private boolean containsOtherOnlineContacts(ChatTransport chatTransport) { - Enumeration e = transportMenuItems.keys(); - - while(e.hasMoreElements()) + for (ChatTransport comboChatTransport : transportMenuItems.keySet()) { - ChatTransport comboChatTransport = (ChatTransport) e.nextElement(); - if(!comboChatTransport.equals(chatTransport) && comboChatTransport.getStatus().isOnline()) return true; } - return false; } } diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java index 028e375..4187be2 100755 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java @@ -551,11 +551,10 @@ public class ChatWindow private class SendMessageAction extends AbstractAction { - public void actionPerformed(ActionEvent e) + public void actionPerformed(ActionEvent e) { - ChatPanel chatPanel = getCurrentChatPanel(); // chatPanel.stopTypingNotifications(); - chatPanel.sendButtonDoClick(); + getCurrentChatPanel().sendButtonDoClick(); } } @@ -566,7 +565,7 @@ public class ChatWindow private class OpenSmileyAction extends AbstractAction { - public void actionPerformed(ActionEvent e) + public void actionPerformed(ActionEvent e) { getCurrentChatPanel().getChatWritePanel() .getEditTextToolBar().getSmiliesSelectorBox().open(); diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomMemberListPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomMemberListPanel.java index 2ed77bd..0b4e317 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomMemberListPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomMemberListPanel.java @@ -29,13 +29,11 @@ public class ChatRoomMemberListPanel extends JPanel implements MouseListener { - private ContactList memberList; + private final ContactList memberList; - private DefaultListModel memberListModel = new DefaultListModel(); + private final DefaultListModel memberListModel = new DefaultListModel(); - private JScrollPane contactsScrollPane = new JScrollPane(); - - private ChatPanel chatPanel; + // private final ChatPanel chatPanel; /** * Creates an instance of <tt>ChatContactListPanel</tt>. @@ -47,7 +45,7 @@ public class ChatRoomMemberListPanel this.memberList = new ContactList( GuiActivator.getUIService().getMainFrame()); - this.chatPanel = chat; + // this.chatPanel = chat; this.memberList.setModel(memberListModel); this.memberList.setCellRenderer(new ChatContactCellRenderer()); @@ -56,10 +54,11 @@ public class ChatRoomMemberListPanel this.memberList.setMouseMotionListener(null); this.memberList.setMouseListener(null); - this.contactsScrollPane.setHorizontalScrollBarPolicy( + JScrollPane contactsScrollPane = new JScrollPane(); + contactsScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); - this.contactsScrollPane.getViewport().add(memberList); + contactsScrollPane.getViewport().add(memberList); this.add(contactsScrollPane); } @@ -154,6 +153,4 @@ public class ChatRoomMemberListPanel // } // } // } - } - diff --git a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/createforms/CreateChatRoomWizardPage2.java b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/createforms/CreateChatRoomWizardPage2.java index 69f5b25..65cf92c 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/createforms/CreateChatRoomWizardPage2.java +++ b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/createforms/CreateChatRoomWizardPage2.java @@ -23,9 +23,7 @@ public class CreateChatRoomWizardPage2 public static final String IDENTIFIER = "NAME_PANEL"; private ChatRoomNamePanel namePanel; - - private WizardContainer wizard; - + private NewChatRoom newChatRoom; /** @@ -36,9 +34,7 @@ public class CreateChatRoomWizardPage2 */ public CreateChatRoomWizardPage2(WizardContainer wizard, NewChatRoom newChatRoom) - { - this.wizard = wizard; - + { this.newChatRoom = newChatRoom; namePanel = new ChatRoomNamePanel(wizard); diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/RenameContactDialog.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/RenameContactDialog.java index 38bb94d..dd46bea 100644 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/RenameContactDialog.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/RenameContactDialog.java @@ -44,8 +44,6 @@ public class RenameContactDialog private MetaContactListService clist; private MetaContact metaContact; - - private MainFrame mainFrame; /** * Creates an instance of <tt>RenameContactDialog</tt>. @@ -55,10 +53,7 @@ public class RenameContactDialog */ public RenameContactDialog(MainFrame mainFrame, MetaContact metaContact) { - super(mainFrame); - - this.mainFrame = mainFrame; this.setSize(new Dimension(520, 270)); diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/addgroup/CreateGroupDialog.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/addgroup/CreateGroupDialog.java index 42dfd72..f804ac4 100644 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/addgroup/CreateGroupDialog.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/addgroup/CreateGroupDialog.java @@ -27,7 +27,7 @@ public class CreateGroupDialog extends SIPCommDialog implements ActionListener { - private Logger logger = Logger.getLogger(CreateGroupDialog.class.getName()); + private final Logger logger = Logger.getLogger(CreateGroupDialog.class.getName()); private CreateGroupPanel groupPanel = new CreateGroupPanel(); @@ -44,8 +44,7 @@ public class CreateGroupDialog = new TransparentPanel(new BorderLayout()); private MetaContactListService clist; - - private MainFrame mainFrame; + /** * Creates an instance of <tt>CreateGroupDialog</tt> that represents a dialog * that creates a new contact group. @@ -56,7 +55,6 @@ public class CreateGroupDialog { super(mainFrame); - this.mainFrame = mainFrame; this.clist = mainFrame.getContactList(); this.setSize(520, 250); diff --git a/src/net/java/sip/communicator/impl/gui/main/menus/MoreButton.java b/src/net/java/sip/communicator/impl/gui/main/menus/MoreButton.java index 9ef12c8..2632159 100644 --- a/src/net/java/sip/communicator/impl/gui/main/menus/MoreButton.java +++ b/src/net/java/sip/communicator/impl/gui/main/menus/MoreButton.java @@ -24,13 +24,12 @@ public class MoreButton MouseListener, FocusListener { - private Image iconImage; - private boolean isMouseOver = false; private JPopupMenu menu = new JPopupMenu(); - private Hashtable menuItemsTable = new Hashtable(); + private final Map<String, Component> menuItemsTable = + new Hashtable<String, Component>(); public MoreButton() { @@ -178,7 +177,7 @@ public class MoreButton public void removeMenuItem(JComponent c) { String name = c.getToolTipText(); - Component item = (Component) this.menuItemsTable.get(name); + Component item = this.menuItemsTable.get(name); if (item != null) { diff --git a/src/net/java/sip/communicator/impl/protocol/dict/OperationSetPersistentPresenceDictImpl.java b/src/net/java/sip/communicator/impl/protocol/dict/OperationSetPersistentPresenceDictImpl.java index dacea1a..0c11444 100644 --- a/src/net/java/sip/communicator/impl/protocol/dict/OperationSetPersistentPresenceDictImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/dict/OperationSetPersistentPresenceDictImpl.java @@ -1162,7 +1162,6 @@ public class OperationSetPersistentPresenceDictImpl //if the parent volatile group is null then we create it if (theVolatileGroup == null) { - List emptyBuddies = new LinkedList(); theVolatileGroup = new ContactGroupDictImpl( "NotInContactList" , parentProvider); diff --git a/src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetBasicInstantMessagingGibberishImpl.java b/src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetBasicInstantMessagingGibberishImpl.java index dec82b8..7664c71 100644 --- a/src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetBasicInstantMessagingGibberishImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetBasicInstantMessagingGibberishImpl.java @@ -6,10 +6,7 @@ */ package net.java.sip.communicator.impl.protocol.gibberish; -import java.util.*; - import net.java.sip.communicator.service.protocol.*; -import net.java.sip.communicator.service.protocol.event.*; /** * Instant messaging functionalites for the Gibberish protocol. @@ -71,10 +68,6 @@ public class OperationSetBasicInstantMessagingGibberishImpl "The specified contact is not a Gibberish contact." + to); - MessageDeliveredEvent msgDeliveredEvt - = new MessageDeliveredEvent( - message, to, new Date()); - //first fire an event that we've delivered the message. //Note that in a real world protocol implementation we would first wait //for a delivery confirmation coming from the protocol stack. diff --git a/src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetPersistentPresenceGibberishImpl.java b/src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetPersistentPresenceGibberishImpl.java index 81c132d..6b8c49d 100644 --- a/src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetPersistentPresenceGibberishImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetPersistentPresenceGibberishImpl.java @@ -1198,7 +1198,6 @@ public class OperationSetPersistentPresenceGibberishImpl //if the parent volatile group is null then we create it if (theVolatileGroup == null) { - List emptyBuddies = new LinkedList(); theVolatileGroup = new ContactGroupGibberishImpl( "NotInContactList" , parentProvider); diff --git a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetMultiUserChatMsnImpl.java b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetMultiUserChatMsnImpl.java index f2b49fd..33579be 100644 --- a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetMultiUserChatMsnImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetMultiUserChatMsnImpl.java @@ -45,8 +45,6 @@ public class OperationSetMultiUserChatMsnImpl */ private Vector presenceListeners = new Vector(); - private OperationSetPersistentPresenceMsnImpl opSetPersPresence = null; - /** * A list of the rooms that are currently open by this account. Note that * this list only contains chat rooms where the user is not the initiator. @@ -564,10 +562,6 @@ public class OperationSetMultiUserChatMsnImpl { if (evt.getNewState() == RegistrationState.REGISTERED) { - opSetPersPresence = - (OperationSetPersistentPresenceMsnImpl) msnProvider - .getOperationSet(OperationSetPersistentPresence.class); - msnProvider.getMessenger().addSwitchboardListener( new MsnSwitchboardListener()); msnProvider.getMessenger().addMessageListener( diff --git a/src/net/java/sip/communicator/impl/protocol/ssh/OperationSetFileTransferSSHImpl.java b/src/net/java/sip/communicator/impl/protocol/ssh/OperationSetFileTransferSSHImpl.java index 7a4da04..69f2d76 100644 --- a/src/net/java/sip/communicator/impl/protocol/ssh/OperationSetFileTransferSSHImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/ssh/OperationSetFileTransferSSHImpl.java @@ -9,7 +9,6 @@ * SSH Suport in SIP Communicator - GSoC' 07 Project * */ - package net.java.sip.communicator.impl.protocol.ssh; import java.util.*; @@ -35,16 +34,6 @@ public class OperationSetFileTransferSSHImpl private Vector fileTransferListeners = new Vector(); /** - * The currently valid persistent presence operation set.. - */ - private OperationSetPersistentPresenceSSHImpl opSetPersPresence = null; - - /** - * The currently valid ssh instant messaging operation set - */ - private OperationSetBasicInstantMessagingSSHImpl instantMessaging = null; - - /** * The protocol provider that created us. */ private ProtocolProviderServiceSSHImpl parentProvider = null; @@ -55,10 +44,6 @@ public class OperationSetFileTransferSSHImpl ProtocolProviderServiceSSHImpl parentProvider) { this.parentProvider = parentProvider; - this.opSetPersPresence = (OperationSetPersistentPresenceSSHImpl) - parentProvider.getOperationSet(OperationSetPersistentPresence.class); - this.instantMessaging = (OperationSetBasicInstantMessagingSSHImpl) - parentProvider.getOperationSet(OperationSetBasicInstantMessaging.class); } /** diff --git a/src/net/java/sip/communicator/impl/protocol/ssh/OperationSetPersistentPresenceSSHImpl.java b/src/net/java/sip/communicator/impl/protocol/ssh/OperationSetPersistentPresenceSSHImpl.java index 50a834b..1b0d2cd 100644 --- a/src/net/java/sip/communicator/impl/protocol/ssh/OperationSetPersistentPresenceSSHImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/ssh/OperationSetPersistentPresenceSSHImpl.java @@ -732,8 +732,6 @@ public class OperationSetPersistentPresenceSSHImpl IllegalStateException, OperationFailedException { - BundleContext context = SSHActivator.getBundleContext(); - ContactSSH sshContact = new ContactSSHImpl(contactIdentifier, parentProvider); @@ -1158,7 +1156,6 @@ public class OperationSetPersistentPresenceSSHImpl //if the parent volatile group is null then we create it if (theVolatileGroup == null) { - List emptyBuddies = new LinkedList(); theVolatileGroup = new ContactGroupSSHImpl( "NotInContactList" , parentProvider); diff --git a/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderServiceSSHImpl.java b/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderServiceSSHImpl.java index 981b64f..f493424 100644 --- a/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderServiceSSHImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderServiceSSHImpl.java @@ -50,8 +50,8 @@ public class ProtocolProviderServiceSSHImpl * The test command given after each command to determine the reply length * of the command */ - private final String testCommand = - Resources.getString("testCommand"); + //private final String testCommand = + // Resources.getString("testCommand"); /** * A reference to the protocol provider of UIService @@ -237,9 +237,7 @@ public class ProtocolProviderServiceSSHImpl final Message firstMessage) { sshContact.setConnectionInProgress(true); - - final UIService uiService = this.uiService; - + final Thread newConnection = new Thread((new Runnable() { public void run() @@ -259,7 +257,7 @@ public class ProtocolProviderServiceSSHImpl createShellChannel(sshContact); - //initalizing the reader and writers of ssh contact + //initializing the reader and writers of ssh contact persistentPresence.changeContactPresenceStatus( sshContact, @@ -267,7 +265,7 @@ public class ProtocolProviderServiceSSHImpl showWelcomeMessage(sshContact); - sshContact.setMessageType(sshContact + sshContact.setMessageType(ContactSSH .CONVERSATION_MESSAGE_RECEIVED); sshContact.setConnectionInProgress(false); @@ -280,7 +278,7 @@ public class ProtocolProviderServiceSSHImpl sshContact, firstMessage); } - // rigoruos Exception Checking in future + // rigorous Exception Checking in future catch (Exception ex) { persistentPresence.changeContactPresenceStatus( diff --git a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetMultiUserChatYahooImpl.java b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetMultiUserChatYahooImpl.java index e049e4f..3439560 100644 --- a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetMultiUserChatYahooImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetMultiUserChatYahooImpl.java @@ -38,8 +38,6 @@ public class OperationSetMultiUserChatYahooImpl */ private Vector presenceListeners = new Vector(); - private OperationSetPersistentPresenceYahooImpl opSetPersPresence = null; - /** * A list of the rooms that are currently open by this account. */ @@ -582,10 +580,6 @@ public class OperationSetMultiUserChatYahooImpl { if (evt.getNewState() == RegistrationState.REGISTERED) { - opSetPersPresence = - (OperationSetPersistentPresenceYahooImpl) yahooProvider - .getOperationSet(OperationSetPersistentPresence.class); - yahooProvider.getYahooSession().addSessionListener( new YahooMessageListener()); } diff --git a/src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetBasicInstantMessagingZeroconfImpl.java b/src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetBasicInstantMessagingZeroconfImpl.java index ae66024..a73ed70 100644 --- a/src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetBasicInstantMessagingZeroconfImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetBasicInstantMessagingZeroconfImpl.java @@ -8,14 +8,12 @@ package net.java.sip.communicator.impl.protocol.zeroconf; import java.io.*; import java.net.*; -import java.util.*; import net.java.sip.communicator.service.protocol.*; -import net.java.sip.communicator.service.protocol.event.*; import net.java.sip.communicator.util.*; /** - * Instant messaging functionalites for the Zeroconf protocol. + * Instant messaging functionalities for the Zeroconf protocol. * * @author Christian Vincenot * @@ -23,7 +21,7 @@ import net.java.sip.communicator.util.*; public class OperationSetBasicInstantMessagingZeroconfImpl extends AbstractOperationSetBasicInstantMessaging { - private static final Logger logger + private static final Logger logger = Logger.getLogger(OperationSetBasicInstantMessagingZeroconfImpl.class); /** @@ -80,13 +78,8 @@ public class OperationSetBasicInstantMessagingZeroconfImpl MessageZeroconfImpl msg = (MessageZeroconfImpl)createMessage(message.getContent()); - - MessageDeliveredEvent msgDeliveredEvt - = new MessageDeliveredEvent( - msg, to, new Date()); deliverMessage(msg, (ContactZeroconfImpl)to); - } /** @@ -96,10 +89,6 @@ public class OperationSetBasicInstantMessagingZeroconfImpl * fire a <tt>MessageReceivedEvent</tt>, and if <tt>to</tt> is simply * a contact in our contact list, then we simply echo the message. * - * - * - * - * * @param message the <tt>Message</tt> the message to deliver. * @param to the <tt>Contact</tt> that we should deliver the message to. */ @@ -142,7 +131,6 @@ public class OperationSetBasicInstantMessagingZeroconfImpl { logger.error(ex); } - } /** @@ -158,7 +146,7 @@ public class OperationSetBasicInstantMessagingZeroconfImpl } /** - * Determines wheter the protocol provider (or the protocol itself) support + * Determines whether the protocol provider (or the protocol itself) support * sending and receiving offline messages. Most often this method would * return true for protocols that support offline messages and false for * those that don't. It is however possible for a protocol to support these @@ -177,7 +165,7 @@ public class OperationSetBasicInstantMessagingZeroconfImpl } /** - * Determines wheter the protocol supports the supplied content type + * Determines whether the protocol supports the supplied content type * * @param contentType the type we want to check * @return <tt>true</tt> if the protocol supports it and @@ -185,9 +173,6 @@ public class OperationSetBasicInstantMessagingZeroconfImpl */ public boolean isContentTypeSupported(String contentType) { - if(contentType.equals(DEFAULT_MIME_TYPE)) - return true; - else - return false; + return contentType.equals(DEFAULT_MIME_TYPE); } } diff --git a/src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetPersistentPresenceZeroconfImpl.java b/src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetPersistentPresenceZeroconfImpl.java index 2fb12a4..73d12e0 100644 --- a/src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetPersistentPresenceZeroconfImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetPersistentPresenceZeroconfImpl.java @@ -1024,7 +1024,6 @@ public class OperationSetPersistentPresenceZeroconfImpl //if the parent volatile group is null then we create it if (theVolatileGroup == null) { - List emptyBuddies = new LinkedList(); theVolatileGroup = new ContactGroupZeroconfImpl( "Bonjour" , parentProvider); diff --git a/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolProviderServiceZeroconfImpl.java b/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolProviderServiceZeroconfImpl.java index ef76386..8cff76c 100644 --- a/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolProviderServiceZeroconfImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolProviderServiceZeroconfImpl.java @@ -25,7 +25,7 @@ public class ProtocolProviderServiceZeroconfImpl /** * We use this to lock access to initialization. */ - private Object initializationLock = new Object(); + private final Object initializationLock = new Object(); /** * The id of the account that this protocol provider represents. @@ -40,7 +40,7 @@ public class ProtocolProviderServiceZeroconfImpl /** * The logo corresponding to the zeroconf protocol. */ - private ProtocolIconZeroconfImpl zeroconfIcon + private final ProtocolIconZeroconfImpl zeroconfIcon = new ProtocolIconZeroconfImpl(); /** @@ -105,7 +105,7 @@ public class ProtocolProviderServiceZeroconfImpl { synchronized(initializationLock) { - this.accountID = accountID; + this.accountID = (ZeroconfAccountID) accountID; //initialize the presence operationset @@ -193,7 +193,6 @@ public class ProtocolProviderServiceZeroconfImpl //ICI : creer le service Zeroconf !! logger.info("ZEROCONF: Starting the service"); - ZeroconfAccountID acc = (ZeroconfAccountID)accountID; this.bonjourService = new BonjourService(5298, this); //bonjourService.changeStatus(ZeroconfStatusEnum.ONLINE); diff --git a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccRegWizzActivator.java b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccRegWizzActivator.java index b06d190..88752ae 100644 --- a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccRegWizzActivator.java +++ b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccRegWizzActivator.java @@ -10,7 +10,6 @@ import java.util.*; import org.osgi.framework.*; -import net.java.sip.communicator.service.configuration.*; import net.java.sip.communicator.service.gui.*; import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.util.*; @@ -23,19 +22,14 @@ import net.java.sip.communicator.util.*; public class GibberishAccRegWizzActivator implements BundleActivator { - private static Logger logger = Logger.getLogger( - GibberishAccRegWizzActivator.class.getName()); + private static final Logger logger = + Logger.getLogger(GibberishAccRegWizzActivator.class); /** * A currently valid bundle context. */ public static BundleContext bundleContext; - /** - * A currently valid reference to the configuration service. - */ - private static ConfigurationService configService; - private static WizardContainer wizardContainer; private static GibberishAccountRegistrationWizard gibberishWizard; diff --git a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccountRegistrationWizard.java index cb28d6b..f5d59ac 100644 --- a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccountRegistrationWizard.java @@ -40,13 +40,10 @@ public class GibberishAccountRegistrationWizard private GibberishAccountRegistration registration = new GibberishAccountRegistration(); - private WizardContainer wizardContainer; + private final WizardContainer wizardContainer; private ProtocolProviderService protocolProvider; - private String propertiesPackage - = "net.java.sip.communicator.plugin.gibberishaccregwizz"; - private boolean isModification; /** diff --git a/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccRegWizzActivator.java b/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccRegWizzActivator.java index f62c934..43a104b 100644 --- a/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccRegWizzActivator.java +++ b/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccRegWizzActivator.java @@ -11,7 +11,6 @@ import java.util.*; import org.osgi.framework.*; import net.java.sip.communicator.service.browserlauncher.*; -import net.java.sip.communicator.service.configuration.*; import net.java.sip.communicator.service.gui.*; import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.util.*; @@ -27,13 +26,11 @@ public class JabberAccRegWizzActivator public static BundleContext bundleContext; - private static Logger logger = Logger.getLogger( - JabberAccRegWizzActivator.class.getName()); + private static final Logger logger = + Logger.getLogger(JabberAccRegWizzActivator.class); private static BrowserLauncherService browserLauncherService; - private static ConfigurationService configService; - private static WizardContainer wizardContainer; private static JabberAccountRegistrationWizard jabberWizard; diff --git a/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java index 8b1fbdb..478598c 100644 --- a/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java @@ -37,13 +37,10 @@ public class JabberAccountRegistrationWizard private JabberAccountRegistration registration = new JabberAccountRegistration(); - private WizardContainer wizardContainer; + private final WizardContainer wizardContainer; private ProtocolProviderService protocolProvider; - private String propertiesPackage = - "net.java.sip.communicator.plugin.jabberaccregwizz"; - private boolean isModification; /** diff --git a/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccRegWizzActivator.java b/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccRegWizzActivator.java index c910b4d..11878d8 100644 --- a/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccRegWizzActivator.java +++ b/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccRegWizzActivator.java @@ -11,7 +11,6 @@ import java.util.*; import org.osgi.framework.*; import net.java.sip.communicator.service.browserlauncher.*; -import net.java.sip.communicator.service.configuration.*; import net.java.sip.communicator.service.gui.*; import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.util.*; @@ -21,14 +20,13 @@ import net.java.sip.communicator.util.*; * * @author Yana Stamcheva */ -public class MsnAccRegWizzActivator implements BundleActivator { - +public class MsnAccRegWizzActivator + implements BundleActivator +{ public static BundleContext bundleContext; - private static Logger logger = Logger.getLogger( - MsnAccRegWizzActivator.class.getName()); - - private static ConfigurationService configService; + private static final Logger logger = + Logger.getLogger(MsnAccRegWizzActivator.class); private static BrowserLauncherService browserLauncherService; diff --git a/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccountRegistrationWizard.java index 4a23470..2b5af8c 100644 --- a/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccountRegistrationWizard.java @@ -31,13 +31,10 @@ public class MsnAccountRegistrationWizard private MsnAccountRegistration registration = new MsnAccountRegistration(); - private WizardContainer wizardContainer; + private final WizardContainer wizardContainer; private ProtocolProviderService protocolProvider; - private String propertiesPackage = - "net.java.sip.communicator.plugin.msnaccregwizz"; - private boolean isModification; /** diff --git a/src/net/java/sip/communicator/plugin/rssaccregwizz/RssAccRegWizzActivator.java b/src/net/java/sip/communicator/plugin/rssaccregwizz/RssAccRegWizzActivator.java index be0bc56..acdffe6 100644 --- a/src/net/java/sip/communicator/plugin/rssaccregwizz/RssAccRegWizzActivator.java +++ b/src/net/java/sip/communicator/plugin/rssaccregwizz/RssAccRegWizzActivator.java @@ -9,7 +9,7 @@ package net.java.sip.communicator.plugin.rssaccregwizz; import java.util.*; import org.osgi.framework.*; -import net.java.sip.communicator.service.configuration.*; + import net.java.sip.communicator.service.gui.*; import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.util.*; @@ -29,11 +29,6 @@ public class RssAccRegWizzActivator * A currently valid bundle context. */ public static BundleContext bundleContext; - - /** - * A currently valid reference to the configuration service. - */ - private static ConfigurationService configService; private static UIService uiService; diff --git a/src/net/java/sip/communicator/plugin/rssaccregwizz/RssAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/rssaccregwizz/RssAccountRegistrationWizard.java index b119d84..e1783c1 100644 --- a/src/net/java/sip/communicator/plugin/rssaccregwizz/RssAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/rssaccregwizz/RssAccountRegistrationWizard.java @@ -40,13 +40,10 @@ public class RssAccountRegistrationWizard private RssAccountRegistration registration = new RssAccountRegistration(); - private WizardContainer wizardContainer; + private final WizardContainer wizardContainer; private ProtocolProviderService protocolProvider; - private String propertiesPackage - = "net.java.sip.communicator.plugin.rssaccregwizz"; - private boolean isModification; /** diff --git a/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccRegWizzActivator.java b/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccRegWizzActivator.java index bbd1e65..af7b391 100644 --- a/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccRegWizzActivator.java +++ b/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccRegWizzActivator.java @@ -10,7 +10,6 @@ import java.util.*; import org.osgi.framework.*; import net.java.sip.communicator.service.browserlauncher.*; -import net.java.sip.communicator.service.configuration.*; import net.java.sip.communicator.service.gui.*; import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.util.*; @@ -26,10 +25,8 @@ public class SIPAccRegWizzActivator public static BundleContext bundleContext; - private static Logger logger = - Logger.getLogger(SIPAccRegWizzActivator.class.getName()); - - private static ConfigurationService configService; + private static final Logger logger = + Logger.getLogger(SIPAccRegWizzActivator.class); private static WizardContainer wizardContainer; diff --git a/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationWizard.java index e5648a9..0148a5f 100644 --- a/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationWizard.java @@ -30,13 +30,10 @@ public class SIPAccountRegistrationWizard private SIPAccountRegistration registration = new SIPAccountRegistration(); - private WizardContainer wizardContainer; + private final WizardContainer wizardContainer; private ProtocolProviderService protocolProvider; - private String propertiesPackage - = "net.java.sip.communicator.plugin.sipaccregwizz"; - private boolean isModification; private static final Logger logger diff --git a/src/net/java/sip/communicator/plugin/sshaccregwizz/SSHAccRegWizzActivator.java b/src/net/java/sip/communicator/plugin/sshaccregwizz/SSHAccRegWizzActivator.java index b218373..70e05a0 100644 --- a/src/net/java/sip/communicator/plugin/sshaccregwizz/SSHAccRegWizzActivator.java +++ b/src/net/java/sip/communicator/plugin/sshaccregwizz/SSHAccRegWizzActivator.java @@ -10,14 +10,12 @@ * * SSH Suport in SIP Communicator - GSoC' 07 Project */ - package net.java.sip.communicator.plugin.sshaccregwizz; import java.util.*; import org.osgi.framework.*; -import net.java.sip.communicator.service.configuration.*; import net.java.sip.communicator.service.gui.*; import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.util.*; @@ -30,19 +28,14 @@ import net.java.sip.communicator.util.*; public class SSHAccRegWizzActivator implements BundleActivator { - private static Logger logger = Logger.getLogger( - SSHAccRegWizzActivator.class.getName()); + private static final Logger logger = + Logger.getLogger(SSHAccRegWizzActivator.class); /** * A currently valid bundle context. */ public static BundleContext bundleContext; - /** - * A currently valid reference to the configuration service. - */ - private static ConfigurationService configService; - private static WizardContainer wizardContainer; private static SSHAccountRegistrationWizard sshWizard; diff --git a/src/net/java/sip/communicator/plugin/sshaccregwizz/SSHAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/sshaccregwizz/SSHAccountRegistrationWizard.java index 0771963..efbdf00 100644 --- a/src/net/java/sip/communicator/plugin/sshaccregwizz/SSHAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/sshaccregwizz/SSHAccountRegistrationWizard.java @@ -49,13 +49,10 @@ public class SSHAccountRegistrationWizard private SSHAccountRegistration registration = new SSHAccountRegistration(); - private WizardContainer wizardContainer; + private final WizardContainer wizardContainer; private ProtocolProviderService protocolProvider; - private String propertiesPackage - = "net.java.sip.communicator.plugin.sshaccregwizz"; - private boolean isModification; /** diff --git a/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardSessionManager.java b/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardSessionManager.java index 51cbebb..21f60ee 100644 --- a/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardSessionManager.java +++ b/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardSessionManager.java @@ -26,27 +26,13 @@ public class WhiteboardSessionManager implements WhiteboardObjectListener { private static final Logger logger = - Logger.getLogger (WhiteboardSessionManager.class); - - /** - * A protocol provider map. - */ - private Map protocolProviderTable = new LinkedHashMap (); - - /** - * The default start WhiteboardSession. - */ - private WhiteboardSession wbTmpSession; + Logger.getLogger (WhiteboardSessionManager.class); /** * List active WhitboarFrame started. */ - private Vector wbFrames = new Vector (); - - /** - * List active WhitboarSession started. - */ - private Vector wbSessions; + private final java.util.List<WhiteboardFrame> wbFrames = + new Vector<WhiteboardFrame>(); private OperationSetWhiteboarding opSetWb; @@ -456,12 +442,8 @@ public class WhiteboardSessionManager */ private WhiteboardFrame getWhiteboardFrame (WhiteboardSession session) { - WhiteboardFrame whiteboardFrame = null; - - for(int i =0; i < wbFrames.size (); i++) + for (WhiteboardFrame whiteboardFrame : wbFrames) { - whiteboardFrame = (WhiteboardFrame) wbFrames.get (i); - if (whiteboardFrame.getWhiteboardSession().equals (session)) return whiteboardFrame; } diff --git a/src/net/java/sip/communicator/plugin/whiteboard/gui/WhiteboardFrame.java b/src/net/java/sip/communicator/plugin/whiteboard/gui/WhiteboardFrame.java index c08c583..43c61c6 100644 --- a/src/net/java/sip/communicator/plugin/whiteboard/gui/WhiteboardFrame.java +++ b/src/net/java/sip/communicator/plugin/whiteboard/gui/WhiteboardFrame.java @@ -807,7 +807,6 @@ public class WhiteboardFrame modifButton = new JToggleButton(); jPanel2 = new TransparentPanel(); jLabelThickness = new JLabel(); - jLabel1 = new JLabel(); jSpinnerThickness = new JSpinner(); menuBar = new JMenuBar(); fileMenu = new JMenu(); @@ -1490,8 +1489,6 @@ public class WhiteboardFrame private javax.swing.JButton jButtonSave; - private javax.swing.JLabel jLabel1; - private javax.swing.JLabel jLabelColor; private javax.swing.JLabel jLabelStatus; diff --git a/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccRegWizzActivator.java b/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccRegWizzActivator.java index ef2a226..44fa182 100644 --- a/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccRegWizzActivator.java +++ b/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccRegWizzActivator.java @@ -9,7 +9,6 @@ package net.java.sip.communicator.plugin.yahooaccregwizz; import java.util.*; import net.java.sip.communicator.service.browserlauncher.*; -import net.java.sip.communicator.service.configuration.*; import net.java.sip.communicator.service.gui.*; import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.util.*; @@ -25,10 +24,8 @@ public class YahooAccRegWizzActivator implements BundleActivator { public static BundleContext bundleContext; - private static Logger logger = Logger.getLogger( - YahooAccRegWizzActivator.class.getName()); - - private static ConfigurationService configService; + private static final Logger logger = + Logger.getLogger(YahooAccRegWizzActivator.class); private static BrowserLauncherService browserLauncherService; diff --git a/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistrationWizard.java index 35f31b8..478a96e 100644 --- a/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistrationWizard.java @@ -32,13 +32,10 @@ public class YahooAccountRegistrationWizard private YahooAccountRegistration registration = new YahooAccountRegistration(); - private WizardContainer wizardContainer; + private final WizardContainer wizardContainer; private ProtocolProviderService protocolProvider; - private String propertiesPackage = - "net.java.sip.communicator.plugin.yahooaccregwizz"; - private boolean isModification; /** diff --git a/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/ZeroconfAccRegWizzActivator.java b/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/ZeroconfAccRegWizzActivator.java index 3cdb3b7..17c7058 100644 --- a/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/ZeroconfAccRegWizzActivator.java +++ b/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/ZeroconfAccRegWizzActivator.java @@ -9,7 +9,6 @@ package net.java.sip.communicator.plugin.zeroconfaccregwizz; import java.util.*; import org.osgi.framework.*; -import net.java.sip.communicator.service.configuration.*; import net.java.sip.communicator.service.gui.*; import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.util.*; @@ -23,19 +22,14 @@ import net.java.sip.communicator.util.*; public class ZeroconfAccRegWizzActivator implements BundleActivator { - private static Logger logger = Logger.getLogger( - ZeroconfAccRegWizzActivator.class.getName()); + private static final Logger logger = + Logger.getLogger(ZeroconfAccRegWizzActivator.class); /** * A currently valid bundle context. */ public static BundleContext bundleContext; - /** - * A currently valid reference to the configuration service. - */ - private static ConfigurationService configService; - private static UIService uiService; /** diff --git a/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/ZeroconfAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/ZeroconfAccountRegistrationWizard.java index 36e645a..a80202d 100644 --- a/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/ZeroconfAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/ZeroconfAccountRegistrationWizard.java @@ -41,13 +41,10 @@ public class ZeroconfAccountRegistrationWizard private ZeroconfAccountRegistration registration = new ZeroconfAccountRegistration(); - private WizardContainer wizardContainer; + private final WizardContainer wizardContainer; private ProtocolProviderService protocolProvider; - private String propertiesPackage - = "net.java.sip.communicator.plugin.zeroconfaccregwizz"; - private boolean isModification; /** diff --git a/src/net/java/sip/communicator/service/protocol/event/ChatRoomPropertyChangeFailedEvent.java b/src/net/java/sip/communicator/service/protocol/event/ChatRoomPropertyChangeFailedEvent.java index 0bcdb7f..e6a2140 100644 --- a/src/net/java/sip/communicator/service/protocol/event/ChatRoomPropertyChangeFailedEvent.java +++ b/src/net/java/sip/communicator/service/protocol/event/ChatRoomPropertyChangeFailedEvent.java @@ -24,27 +24,17 @@ public class ChatRoomPropertyChangeFailedEvent * Indicates that the current implementation doesn't support the given * property. */ - public static int PROPERTY_NOT_SUPPORTED = 0; - - /** - * The value of the property. - */ - private Object propertyValue; - - /** - * The value of the propertythat was expected after the change. - */ - private Object expectedValue; + public static final int PROPERTY_NOT_SUPPORTED = 0; /** * The reason of the failure. */ - private String reason; + private final String reason; /** - * Indicates why the failure occured. + * Indicates why the failure occurred. */ - private int reasonCode; + private final int reasonCode; /** * Creates a <tt>ChatRoomPropertyChangeEvent</tt> indicating that a change @@ -52,10 +42,10 @@ public class ChatRoomPropertyChangeFailedEvent * chat room and that its value has changed from <tt>oldValue</tt> to * <tt>newValue</tt>. * <p> - * @param source the <tt>ChatRoom</tt>, to which the propery belongs + * @param source the <tt>ChatRoom</tt>, to which the property belongs * @param propertyName the name of the property * @param propertyValue the value of the property - * @param expectedValue the extected after the change value of the property + * @param expectedValue the expected after the change value of the property * @param reasonCode the code indicating the reason for the failure * @param reason more detailed explanation of the failure */ @@ -69,7 +59,6 @@ public class ChatRoomPropertyChangeFailedEvent super(source, propertyName, propertyValue, expectedValue); this.reasonCode = reasonCode; - this.reason = reason; } |