diff options
author | Sebastien Vincent <seb@jitsi.org> | 2010-09-11 08:50:46 +0000 |
---|---|---|
committer | Sebastien Vincent <seb@jitsi.org> | 2010-09-11 08:50:46 +0000 |
commit | bb0b2297c77e6f1aa10a68db157b25016de09ae6 (patch) | |
tree | 4226959de63fb78422d3333e8daa783d3352ea75 /src | |
parent | 2d711b828b0447fe0195325bd6a6bec8945120a9 (diff) | |
download | jitsi-bb0b2297c77e6f1aa10a68db157b25016de09ae6.zip jitsi-bb0b2297c77e6f1aa10a68db157b25016de09ae6.tar.gz jitsi-bb0b2297c77e6f1aa10a68db157b25016de09ae6.tar.bz2 |
Add javadoc, fix warnings and typos.
Diffstat (limited to 'src')
58 files changed, 594 insertions, 342 deletions
diff --git a/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java b/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java index 489b7ab..972c9fe 100644 --- a/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java +++ b/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java @@ -719,7 +719,7 @@ public class CallHistoryServiceImpl logger.debug("Adding protocol provider " + provider.getProtocolName()); // check whether the provider has a basic telephony operation set - OperationSetBasicTelephony opSetTelephony + OperationSetBasicTelephony<?> opSetTelephony = provider.getOperationSet(OperationSetBasicTelephony.class); if (opSetTelephony != null) @@ -741,7 +741,7 @@ public class CallHistoryServiceImpl */ private void handleProviderRemoved(ProtocolProviderService provider) { - OperationSetBasicTelephony opSetTelephony + OperationSetBasicTelephony<?> opSetTelephony = provider.getOperationSet(OperationSetBasicTelephony.class); if (opSetTelephony != null) diff --git a/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java b/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java index 1a18747..c9fc8a5 100644 --- a/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java +++ b/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java @@ -803,7 +803,7 @@ public class MclStorageManager String name = e.getAttribute(DETAIL_NAME_ATTR_NAME); String value = e.getAttribute(DETAIL_VALUE_ATTR_NAME); - + List<String> detailsObj = details.get(name); if (detailsObj == null) { @@ -1044,7 +1044,7 @@ public class MclStorageManager * Creates a new XML <code>Element</code> corresponding to * <tt>protoGroup</tt> or <tt>null</tt> if <tt>protoGroup</tt> is not * eligible for serialization in its current state. - * + * * @param protoGroup * the <code>ContactGroup</code> which a corresponding XML * <code>Element</code> is to be created for @@ -1618,9 +1618,9 @@ public class MclStorageManager else if (oldValue != null && newValue == null) { // indicates remove - if (oldValue instanceof List) + if (oldValue instanceof List<?>) { - List valuesToRemove = (List) oldValue; + List<?> valuesToRemove = (List<?>) oldValue; // indicates removing multiple values at one time List<Element> nodes = XMLUtils.locateElements(metaContactNode, diff --git a/src/net/java/sip/communicator/impl/gui/main/MainFrame.java b/src/net/java/sip/communicator/impl/gui/main/MainFrame.java index d37a4b8..16322b2 100644 --- a/src/net/java/sip/communicator/impl/gui/main/MainFrame.java +++ b/src/net/java/sip/communicator/impl/gui/main/MainFrame.java @@ -427,8 +427,8 @@ public class MainFrame if (supportedOperationSets.containsKey(telOpSetClassName)) { - OperationSetBasicTelephony telephony - = (OperationSetBasicTelephony) + OperationSetBasicTelephony<?> telephony + = (OperationSetBasicTelephony<?>) supportedOperationSets.get(telOpSetClassName); telephony.addCallListener(new CallManager.GuiCallListener()); @@ -642,14 +642,14 @@ public class MainFrame * @return OperationSetBasicTelephony The telephony operation * set for the given protocol provider. */ - public OperationSetBasicTelephony getTelephonyOpSet( + public OperationSetBasicTelephony<?> getTelephonyOpSet( ProtocolProviderService protocolProvider) { OperationSet opSet = protocolProvider.getOperationSet(OperationSetBasicTelephony.class); - return (opSet instanceof OperationSetBasicTelephony) - ? (OperationSetBasicTelephony) opSet + return (opSet instanceof OperationSetBasicTelephony<?>) + ? (OperationSetBasicTelephony<?>) opSet : null; } diff --git a/src/net/java/sip/communicator/impl/gui/main/account/EmptyAccountRegistrationWizardPage.java b/src/net/java/sip/communicator/impl/gui/main/account/EmptyAccountRegistrationWizardPage.java index 7eb04b6..c759931 100644 --- a/src/net/java/sip/communicator/impl/gui/main/account/EmptyAccountRegistrationWizardPage.java +++ b/src/net/java/sip/communicator/impl/gui/main/account/EmptyAccountRegistrationWizardPage.java @@ -76,7 +76,7 @@ public class EmptyAccountRegistrationWizardPage /** * Returns the <tt>JPanel</tt> that contains the message prompting the user * to select a protocol. - * + * * @return the <tt>JPanel</tt> that contains the message prompting the user * to select a protocol. */ @@ -84,7 +84,7 @@ public class EmptyAccountRegistrationWizardPage { return mainPanel; } - + /** * Implements the <code>WizardPage.getIdentifier</code> to return this * page identifier. diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallDialog.java b/src/net/java/sip/communicator/impl/gui/main/call/CallDialog.java index 0da2ab6..50ce185 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallDialog.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallDialog.java @@ -88,7 +88,7 @@ public class CallDialog /**
* The button which allows starting and stopping the recording of the
- * {@link #call}.
+ * {@link #call}.
*/
private RecordButton recordButton;
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/HoldButton.java b/src/net/java/sip/communicator/impl/gui/main/call/HoldButton.java index 2f96696..88fdecf 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/HoldButton.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/HoldButton.java @@ -83,7 +83,7 @@ public class HoldButton { Iterator<? extends CallPeer> peers = call.getCallPeers(); boolean on = isSelected(); - OperationSetBasicTelephony telephony + OperationSetBasicTelephony<?> telephony = call.getProtocolProvider().getOperationSet( OperationSetBasicTelephony.class); diff --git a/src/net/java/sip/communicator/impl/gui/main/call/MuteButton.java b/src/net/java/sip/communicator/impl/gui/main/call/MuteButton.java index e81e074..d8c4840 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/MuteButton.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/MuteButton.java @@ -73,7 +73,7 @@ public class MuteButton { if (call != null) { - OperationSetBasicTelephony telephony + OperationSetBasicTelephony<?> telephony = call.getProtocolProvider().getOperationSet( OperationSetBasicTelephony.class); diff --git a/src/net/java/sip/communicator/impl/gui/main/call/ReceivedCallDialog.java b/src/net/java/sip/communicator/impl/gui/main/call/ReceivedCallDialog.java index d1e3f35..efeaee9 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/ReceivedCallDialog.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/ReceivedCallDialog.java @@ -56,7 +56,7 @@ public class ReceivedCallDialog this.initComponents(); - OperationSetBasicTelephony telephonyOpSet + OperationSetBasicTelephony<?> telephonyOpSet = call.getProtocolProvider() .getOperationSet(OperationSetBasicTelephony.class); diff --git a/src/net/java/sip/communicator/impl/gui/main/call/TransferCallButton.java b/src/net/java/sip/communicator/impl/gui/main/call/TransferCallButton.java index 7d223b4..a95243e 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/TransferCallButton.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/TransferCallButton.java @@ -47,7 +47,7 @@ public class TransferCallButton setToolTipText(GuiActivator.getResources().getI18NString( "service.gui.TRANSFER_BUTTON_TOOL_TIP")); - OperationSetAdvancedTelephony telephony = + OperationSetAdvancedTelephony<?> telephony = call.getProtocolProvider() .getOperationSet(OperationSetAdvancedTelephony.class); @@ -75,7 +75,7 @@ public class TransferCallButton */ private void transferCall() { - OperationSetAdvancedTelephony telephony + OperationSetAdvancedTelephony<?> telephony = call.getProtocolProvider() .getOperationSet(OperationSetAdvancedTelephony.class); diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatContactRightButtonMenu.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatContactRightButtonMenu.java index 972230a..2b32d42 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatContactRightButtonMenu.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatContactRightButtonMenu.java @@ -85,7 +85,7 @@ public class ChatContactRightButtonMenu /** * The contact associated with this menu */ - private final ChatContact chatContact; + private final ChatContact<?> chatContact; /** * The Chatroom in which the chatContact is currently participating. @@ -95,10 +95,10 @@ public class ChatContactRightButtonMenu /** * Creates an instance of <tt>ChatRoomsListRightButtonMenu</tt>. * @param chatPanel the chat panel containing this menu - * @param chatContact the contact + * @param chatContact the contact */ public ChatContactRightButtonMenu( ChatPanel chatPanel, - ChatContact chatContact) + ChatContact<?> chatContact) { this.chatPanel = chatPanel; this.chatContact = chatContact; @@ -191,7 +191,7 @@ public class ChatContactRightButtonMenu this.revokeModeratorItem.setName("revokeModeratorItem"); this.revokeOwnershipItem.setName("revokeOwnershipItem"); this.revokeVoiceItem.setName("revokeVoiceItem"); - + this.grantOwnershipItem.setIcon(ImageUtils.getScaledRoundedIcon( ImageLoader.getImage(ImageLoader.CHATROOM_MEMBER_OWNER), 16, 16)); this.grantAdminItem.setIcon(ImageUtils.getScaledRoundedIcon( @@ -310,7 +310,7 @@ public class ChatContactRightButtonMenu public void actionPerformed(ActionEvent e) { String menuItemName = ((JMenuItem) e.getSource()).getName(); - + if (menuItemName.equals("kickItem")) { ChatOperationReasonDialog reasonDialog @@ -341,14 +341,14 @@ public class ChatContactRightButtonMenu GuiActivator.getResources().getI18NString( "service.gui.CHANGE_ROOM_SUBJECT"), GuiActivator.getResources().getI18NString( - "service.gui.CHANGE_ROOM_SUBJECT_LABEL"), + "service.gui.CHANGE_ROOM_SUBJECT_LABEL"), "Ok", false); //reasonDialog.setIconImage( //ImageLoader.getImage(ImageLoader.CHANGE_ROOM_SUBJECT_ICON_16x16)); reasonDialog.setReasonFieldText(room.getSubject()); - + int result = reasonDialog.showDialog(); if (result == 0) @@ -378,7 +378,7 @@ public class ChatContactRightButtonMenu // reasonDialog.setIconImage(ImageLoader.getImage( // ImageLoader.CHANGE_NICKNAME_ICON_16x16)); reasonDialog.setReasonFieldText(chatContact.getName()); - + int result = reasonDialog.showDialog(); if (result == 0) @@ -505,7 +505,7 @@ public class ChatContactRightButtonMenu } else if (e.getErrorCode() == OperationFailedException.FORBIDDEN) - { + { new ErrorDialog(chatPanel.getChatWindow(), GuiActivator.getResources() .getI18NString("service.gui.KICK_FAILED"), @@ -527,7 +527,7 @@ public class ChatContactRightButtonMenu } } } - + /** * Bans the the selected chat room participant or shows a message to the * user that he/she has not enough permissions to do a ban. @@ -535,15 +535,15 @@ public class ChatContactRightButtonMenu private class BanParticipantThread extends Thread { private final ChatRoom chatRoom; - + private final String reason; - + BanParticipantThread(ChatRoom chatRoom, String reason) { this.chatRoom = chatRoom; this.reason = reason; } - + public void run() { try @@ -562,7 +562,7 @@ public class ChatContactRightButtonMenu switch (e.getErrorCode()) { case OperationFailedException.NOT_ENOUGH_PRIVILEGES: - errorMessageKey = + errorMessageKey = "service.gui.BAN_FAILED_NOT_ENOUGH_PERMISSIONS"; break; case OperationFailedException.FORBIDDEN: diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java index 60d5e56..da260fa 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java @@ -280,7 +280,7 @@ public class ChatPanel if (chatContactListPanel != null) { // Initialize chat participants' panel. - Iterator<ChatContact> chatParticipants + Iterator<ChatContact<?>> chatParticipants = chatSession.getParticipants(); while (chatParticipants.hasNext()) @@ -302,7 +302,7 @@ public class ChatPanel /** * Shows or hides the Stylebar depending on the value of parameter b. - * + * * @param b if true, makes the Stylebar visible, otherwise hides the * Stylebar */ @@ -438,7 +438,7 @@ public class ChatPanel this.conversationPanel.appendMessageToEnd( "<DIV identifier=\"message\" style=\"color:#707070;\">" + GuiActivator.getResources().getI18NString("service.gui.IS_NOW", - new String[]{evt.getSourceMember().getName(), + new String[]{evt.getSourceMember().getName(), getRoleDescription(evt.getNewRole())}) +"</DIV>"); } @@ -677,7 +677,7 @@ public class ChatPanel * Passes the message to the contained <code>ChatConversationPanel</code> * for processing and appends it at the end of the conversationPanel * document. - * + * * @param chatMessage the chat message to add */ private void addChatMessage(ChatMessage chatMessage) @@ -700,7 +700,7 @@ public class ChatPanel /** * Adds the given error message to the chat window conversation area. - * + * * @param contactName the name of the contact, for which the error occured * @param message the error message */ @@ -708,7 +708,7 @@ public class ChatPanel String message) { this.addMessage(contactName, System.currentTimeMillis(), - Chat.ERROR_MESSAGE, + Chat.ERROR_MESSAGE, GuiActivator.getResources() .getI18NString("service.gui.MSG_DELIVERY_FAILURE"), message, "text"); @@ -716,7 +716,7 @@ public class ChatPanel /** * Adds the given error message to the chat window conversation area. - * + * * @param contactName the name of the contact, for which the error occurred * @param title the title of the error * @param message the error message @@ -726,7 +726,7 @@ public class ChatPanel String message) { this.addMessage(contactName, System.currentTimeMillis(), - Chat.ERROR_MESSAGE, + Chat.ERROR_MESSAGE, title, message, "text"); } @@ -735,7 +735,7 @@ public class ChatPanel * Passes the message to the contained <code>ChatConversationPanel</code> * for processing and appends it at the end of the conversationPanel * document. - * + * * @param chatMessage the message to append */ private void appendChatMessage(ChatMessage chatMessage) @@ -888,7 +888,7 @@ public class ChatPanel /** * Brings the <tt>ChatWindow</tt> containing this <tt>ChatPanel</tt> to the * front if <tt>isVisble</tt> is <tt>true</tt>; hides it, otherwise. - * + * * @param isVisible <tt>true</tt> to bring the <tt>ChatWindow</tt> of this * <tt>ChatPanel</tt> to the front; <tt>false</tt> to close this * <tt>ChatPanel</tt> @@ -996,7 +996,7 @@ public class ChatPanel * Sends the given file through the currently selected chat transport by * using the given fileComponent to visualize the transfer process in the * chat conversation panel. - * + * * @param file the file to send * @param fileComponent the file component to use for visualization */ @@ -1079,7 +1079,7 @@ public class ChatPanel /** * Sends the given file through the currently selected chat transport. - * + * * @param file the file to send */ public void sendFile(final File file) @@ -1348,7 +1348,7 @@ public class ChatPanel private class SmsMessageListener implements MessageListener { /** - * @param chatTransport Currently unused + * @param chatTransport Currently unused */ public SmsMessageListener(ChatTransport chatTransport) { @@ -1461,7 +1461,7 @@ public class ChatPanel /** * Loads history messages ignoring the message with the specified id. - * + * * @param escapedMessageID the id of the message to be ignored; * <tt>null</tt> if no message is to be ignored */ @@ -1559,11 +1559,11 @@ public class ChatPanel /** * Renames all occurrences of the given <tt>chatContact</tt> in this chat * panel. - * + * * @param chatContact the contact to rename * @param name the new name */ - public void setContactName(ChatContact chatContact, String name) + public void setContactName(ChatContact<?> chatContact, String name) { if (chatContactListPanel != null) { @@ -1581,7 +1581,7 @@ public class ChatPanel /** * Adds the given chatTransport to the given send via selector box. - * + * * @param chatTransport the transport to add */ public void addChatTransport(ChatTransport chatTransport) @@ -1593,7 +1593,7 @@ public class ChatPanel /** * Removes the given chat status state from the send via selector box. - * + * * @param chatTransport the transport to remove */ public void removeChatTransport(ChatTransport chatTransport) @@ -1605,7 +1605,7 @@ public class ChatPanel /** * Selects the given chat transport in the send via box. - * + * * @param chatTransport the chat transport to be selected */ public void setSelectedChatTransport(ChatTransport chatTransport) @@ -1751,7 +1751,7 @@ public class ChatPanel * participating in the corresponding to this chat panel chat. * @param chatContact the contact to add */ - public void addChatContact(ChatContact chatContact) + public void addChatContact(ChatContact<?> chatContact) { if (chatContactListPanel != null) chatContactListPanel.addContact(chatContact); @@ -1762,7 +1762,7 @@ public class ChatPanel * participating in the corresponding to this chat panel chat. * @param chatContact the contact to remove */ - public void removeChatContact(ChatContact chatContact) + public void removeChatContact(ChatContact<?> chatContact) { if (chatContactListPanel != null) chatContactListPanel.removeContact(chatContact); @@ -1773,7 +1773,7 @@ public class ChatPanel * @param chatContact the chat contact to update * @param statusMessage the status message to show */ - public void updateChatContactStatus(ChatContact chatContact, + public void updateChatContactStatus(ChatContact<?> chatContact, String statusMessage) { this.addMessage( @@ -1820,7 +1820,7 @@ public class ChatPanel /** * Adds the given <tt>IncomingFileTransferRequest</tt> to the conversation * panel in order to notify the user of the incoming file. - * + * * @param fileTransferOpSet the file transfer operation set * @param request the request to display in the conversation panel * @param date the date on which the request has been received @@ -1984,7 +1984,7 @@ public class ChatPanel { ChatRoomWrapper chatRoomWrapper = conferenceChatManager.createChatRoom( - inviteChatTransport.getProtocolProvider(), + inviteChatTransport.getProtocolProvider(), chatContacts, reason); @@ -2161,7 +2161,7 @@ public class ChatPanel /** * Adds the given file transfer <tt>id</tt> to the list of active file * transfers. - * + * * @param id the identifier of the file transfer to add * @param descriptor the descriptor of the file transfer */ diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatSession.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatSession.java index 5734b7e..f08d02d 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatSession.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatSession.java @@ -30,8 +30,8 @@ public abstract class ChatSession /** * The list of <tt>ChatContact</tt>s contained in this chat session. */ - protected final List<ChatContact> chatParticipants - = new ArrayList<ChatContact>(); + protected final List<ChatContact<?>> chatParticipants + = new ArrayList<ChatContact<?>>(); /** * The list of <tt>ChatTransport</tt>s available in this session. @@ -41,7 +41,7 @@ public abstract class ChatSession /** * Returns the descriptor of this chat session. - * + * * @return the descriptor of this chat session. */ public abstract Object getDescriptor(); @@ -61,7 +61,7 @@ public abstract class ChatSession * @return an iterator to the list of all participants contained in this * chat session. */ - public Iterator<ChatContact> getParticipants() + public Iterator<ChatContact<?>> getParticipants() { return chatParticipants.iterator(); } @@ -241,7 +241,7 @@ public abstract class ChatSession public abstract boolean isContactListSupported(); /** - * Adds the given {@link ChatSessionChangeListener} to this + * Adds the given {@link ChatSessionChangeListener} to this * <tt>ChatSession</tt>. * * @param l the <tt>ChatSessionChangeListener</tt> to add @@ -250,7 +250,7 @@ public abstract class ChatSession ChatSessionChangeListener l); /** - * Removes the given {@link ChatSessionChangeListener} to this + * Removes the given {@link ChatSessionChangeListener} to this * <tt>ChatSession</tt>. * * @param l the <tt>ChatSessionChangeListener</tt> to add diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatSessionRenderer.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatSessionRenderer.java index 5c54315..7a71a51 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatSessionRenderer.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatSessionRenderer.java @@ -10,66 +10,66 @@ package net.java.sip.communicator.impl.gui.main.chat; * The <tt>ChatSessionRenderer</tt> is the connector between the * <tt>ChatSession</tt> and the <tt>ChatPanel</tt>, which represents the UI * part of the chat. - * + * * @author Yana Stamcheva */ public interface ChatSessionRenderer { /** * Sets the name of the given chat contact. - * + * * @param chatContact the chat contact to be modified. * @param name the new name. */ - public void setContactName(ChatContact chatContact, String name); + public void setContactName(ChatContact<?> chatContact, String name); /** * Adds the given chat transport to the UI. - * + * * @param chatTransport the chat transport to add. */ public void addChatTransport(ChatTransport chatTransport); /** * Removes the given chat transport from the UI. - * + * * @param chatTransport the chat transport to remove. */ public void removeChatTransport(ChatTransport chatTransport); /** * Adds the given chat contact to the UI. - * + * * @param chatContact the chat contact to add. */ - public void addChatContact(ChatContact chatContact); + public void addChatContact(ChatContact<?> chatContact); /** * Removes the given chat contact from the UI. - * + * * @param chatContact the chat contact to remove. */ - public void removeChatContact(ChatContact chatContact); + public void removeChatContact(ChatContact<?> chatContact); /** * Updates the status of the given chat transport. - * + * * @param chatTransport the chat transport to update. */ public void updateChatTransportStatus(ChatTransport chatTransport); /** * Updates the status of the given chat contact. - * + * * @param chatContact the chat contact to update. * @param statusMessage the status message to show to the user. */ - public void updateChatContactStatus(ChatContact chatContact, + public void updateChatContactStatus(ChatContact<?> chatContact, String statusMessage); /** * Sets the chat subject. - * + * * @param subject the new subject to set. */ public void setChatSubject(String subject); diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatSession.java b/src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatSession.java index 4b3a74e..9c497b1 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatSession.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatSession.java @@ -25,7 +25,7 @@ import net.java.sip.communicator.service.protocol.event.*; * * @author Yana Stamcheva * @author Lubomir Marinov - * + * */ public class MetaContactChatSession extends ChatSession @@ -62,7 +62,7 @@ public class MetaContactChatSession this.sessionRenderer = sessionRenderer; this.metaContact = metaContact; - ChatContact chatContact = new MetaContactChatContact(metaContact); + ChatContact<?> chatContact = new MetaContactChatContact(metaContact); chatParticipants.add(chatContact); @@ -386,7 +386,7 @@ public class MetaContactChatSession if(evt.getSourceMetaContact().equals(metaContact)) { - ChatContact chatContact + ChatContact<?> chatContact = findChatContactByMetaContact(evt.getSourceMetaContact()); sessionRenderer.setContactName(chatContact, newName); @@ -461,9 +461,9 @@ public class MetaContactChatSession * @return the <tt>ChatContact</tt> corresponding to the given * <tt>MetaContact</tt>. */ - private ChatContact findChatContactByMetaContact(MetaContact metaContact) + private ChatContact<?> findChatContactByMetaContact(MetaContact metaContact) { - for (ChatContact chatContact : chatParticipants) + for (ChatContact<?> chatContact : chatParticipants) { Object chatSourceContact = chatContact.getDescriptor(); if (chatSourceContact instanceof MetaContact) @@ -475,7 +475,8 @@ public class MetaContactChatSession else { assert chatSourceContact instanceof ChatRoomMember; - ChatRoomMember metaChatContact = (ChatRoomMember) chatSourceContact; + ChatRoomMember metaChatContact = + (ChatRoomMember)chatSourceContact; Contact contact = metaChatContact.getContact(); MetaContact parentMetaContact = GuiActivator.getContactListService() diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/conference/AdHocConferenceChatSession.java b/src/net/java/sip/communicator/impl/gui/main/chat/conference/AdHocConferenceChatSession.java index 20d3d6d..6005a89 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/conference/AdHocConferenceChatSession.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/conference/AdHocConferenceChatSession.java @@ -19,7 +19,7 @@ import net.java.sip.communicator.service.protocol.event.*; /** * An implementation of <tt>ChatSession</tt> for ad-hoc conference chatting. - * + * * @author Valentin Martinet */ public class AdHocConferenceChatSession @@ -34,12 +34,12 @@ public class AdHocConferenceChatSession /** * Creates an instance of <tt>AdHocConferenceChatSession</tt>, by specifying - * the sessionRenderer to be used for communication with the UI and the + * the sessionRenderer to be used for communication with the UI and the * ad-hoc chat room corresponding to this conference session. - * + * * @param sessionRenderer the renderer to be used for communication with the * UI. - * @param chatRoomWrapper the ad-hoc chat room corresponding to this + * @param chatRoomWrapper the ad-hoc chat room corresponding to this * conference session. */ public AdHocConferenceChatSession( ChatSessionRenderer sessionRenderer, @@ -61,7 +61,7 @@ public class AdHocConferenceChatSession /** * Returns the descriptor of this chat session. - * + * * @return the descriptor of this chat session. */ public Object getDescriptor() @@ -80,7 +80,7 @@ public class AdHocConferenceChatSession /** * Returns the name of the ad-hoc chat room. - * + * * @return the name of the ad-hoc chat room. */ public String getChatName() @@ -90,7 +90,7 @@ public class AdHocConferenceChatSession /** * Returns the configuration form corresponding to the chat room. - * + * * @return the configuration form corresponding to the chat room. * @throws OperationFailedException if no configuration form is available * for the chat room. @@ -104,7 +104,7 @@ public class AdHocConferenceChatSession /** * Returns the currently used transport for all operation within this chat * session. - * + * * @return the currently used transport for all operation within this chat * session. */ @@ -116,7 +116,7 @@ public class AdHocConferenceChatSession /** * Returns the default mobile number used to send sms-es in this session. In * the case of conference this is for now null. - * + * * @return the default mobile number used to send sms-es in this session. */ public String getDefaultSmsNumber() @@ -126,7 +126,7 @@ public class AdHocConferenceChatSession /** * Returns a collection of the last N number of messages given by count. - * + * * @param count The number of messages from history to return. * @return a collection of the last N number of messages given by count. */ @@ -149,7 +149,7 @@ public class AdHocConferenceChatSession /** * Returns a collection of the last N number of messages given by count. - * + * * @param date The date up to which we're looking for messages. * @param count The number of messages from history to return. * @return a collection of the last N number of messages given by count. @@ -174,7 +174,7 @@ public class AdHocConferenceChatSession /** * Returns a collection of the last N number of messages given by count. - * + * * @param date The date from which we're looking for messages. * @param count The number of messages from history to return. * @return a collection of the last N number of messages given by count. @@ -199,7 +199,7 @@ public class AdHocConferenceChatSession /** * Returns the start date of the history of this chat session. - * + * * @return the start date of the history of this chat session. */ public long getHistoryStartDate() @@ -248,7 +248,7 @@ public class AdHocConferenceChatSession /** * Returns the end date of the history of this chat session. - * + * * @return the end date of the history of this chat session. */ public long getHistoryEndDate() @@ -297,7 +297,7 @@ public class AdHocConferenceChatSession /** * Sets the transport that will be used for all operations within this chat * session. - * + * * @param chatTransport The transport to set as a default transport for this * session. */ @@ -308,7 +308,7 @@ public class AdHocConferenceChatSession /** * Sets the default mobile number used to send sms-es in this session. - * + * * @param smsPhoneNumber The default mobile number used to send sms-es in * this session. */ @@ -318,7 +318,7 @@ public class AdHocConferenceChatSession /** * Returns the <tt>ChatSessionRenderer</tt> that provides the connection * between this chat session and its UI. - * + * * @return The <tt>ChatSessionRenderer</tt>. */ public ChatSessionRenderer getChatSessionRenderer() @@ -340,7 +340,7 @@ public class AdHocConferenceChatSession /** * Loads the given chat room in the this chat conference panel. Loads all * members and adds all corresponding listeners. - * + * * @param chatRoom the <tt>ChatRoom</tt> to load */ public void loadChatRoom(AdHocChatRoom chatRoom) @@ -400,8 +400,8 @@ public class AdHocConferenceChatSession } /** - * Invoked when <tt>AdHocChatRoomParticipantPresenceChangeEvent</tt> are - * received. When a new participant (<tt>Contact</tt>) has joined the chat + * Invoked when <tt>AdHocChatRoomParticipantPresenceChangeEvent</tt> are + * received. When a new participant (<tt>Contact</tt>) has joined the chat * adds it to the list of chat participants on the right of the chat window. * When a participant has left or quit it's removed from the chat window. */ @@ -447,7 +447,7 @@ public class AdHocConferenceChatSession } else if (eventType.equals( AdHocChatRoomParticipantPresenceChangeEvent.CONTACT_LEFT) - || + || eventType.equals( AdHocChatRoomParticipantPresenceChangeEvent.CONTACT_QUIT)) { @@ -466,7 +466,7 @@ public class AdHocConferenceChatSession new String[] {sourceChatRoom.getName()}); } - for (ChatContact chatContact : chatParticipants) + for (ChatContact<?> chatContact : chatParticipants) { if(chatContact.getDescriptor().equals(participant)) { diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatContactCellRenderer.java b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatContactCellRenderer.java index 58b953f..0da22e7 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatContactCellRenderer.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatContactCellRenderer.java @@ -39,7 +39,7 @@ public class ChatContactCellRenderer * @param index the index of the current cell in the source list * @param isSelected indicates if this cell is selected * @param cellHasFocus indicates if this cell is focused - * + * * @return this panel */ @Override @@ -53,13 +53,13 @@ public class ChatContactCellRenderer this.rightLabel.setIcon(null); - final ChatContact chatContact = (ChatContact) value; + final ChatContact<?> chatContact = (ChatContact<?>) value; if(chatContact == null) return this; ChatRoomMember member = null; - + if (chatContact.getDescriptor() instanceof ChatRoomMember) member = (ChatRoomMember) chatContact.getDescriptor(); @@ -138,12 +138,12 @@ public class ChatContactCellRenderer while(itr.hasNext()) { GenericDetail detail = itr.next(); - + if(detail instanceof BinaryDetail) { BinaryDetail bin = (BinaryDetail)detail; byte[] binBytes = bin.getBytes(); - + if(binBytes != null) this.rightLabel.setIcon( ImageUtils.getScaledRoundedIcon( diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatContactListModel.java b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatContactListModel.java index e109316..5516f03 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatContactListModel.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatContactListModel.java @@ -29,17 +29,20 @@ public class ChatContactListModel * The backing store of this <tt>AbstractListModel</tt> listing the
* <tt>ChatContact</tt>s.
*/
- private final List<ChatContact> chatContacts = new ArrayList<ChatContact>();
+ private final List<ChatContact<?>> chatContacts =
+ new ArrayList<ChatContact<?>>();
/**
* The implementation of the sorting rules - the <tt>ChatContact</tt>s are
* first sorted according to their roles in decreasing order of their
* privileges and then they are sorted according to their names in
- * alphabetical order.
+ * alphabetical order.
*/
- private final Comparator<ChatContact> sorter = new Comparator<ChatContact>()
+ private final Comparator<ChatContact<?>> sorter =
+ new Comparator<ChatContact<?>>()
{
- public int compare(ChatContact chatContact0, ChatContact chatContact1)
+ public int compare(ChatContact<?> chatContact0,
+ ChatContact<?> chatContact1)
{
/*
@@ -98,7 +101,7 @@ public class ChatContactListModel for (int i = 0; i < chatContactCount; i++)
{
- ChatContact containedChatContact = chatContacts.get(i);
+ ChatContact<?> containedChatContact = chatContacts.get(i);
if(containedChatContact.getDescriptor().equals(
event.getSourceChatRoomMember()))
@@ -116,11 +119,11 @@ public class ChatContactListModel /**
* Adds a specific <tt>ChatContact</tt> to this <tt>AbstractListModel</tt>
* implementation and preserves the sorting it applies.
- *
+ *
* @param chatContact a <tt>ChatContact</tt> to be added to this
* <tt>AbstractListModel</tt>
*/
- public void addElement(ChatContact chatContact)
+ public void addElement(ChatContact<?> chatContact)
{
if (chatContact == null)
throw new IllegalArgumentException("chatContact");
@@ -129,11 +132,11 @@ public class ChatContactListModel synchronized(chatContacts)
{
- int chatContactCount = chatContacts.size();
+ int chatContactCount = chatContacts.size();
for (int i = 0; i < chatContactCount; i++)
{
- ChatContact containedChatContact = chatContacts.get(i);
+ ChatContact<?> containedChatContact = chatContacts.get(i);
// We don't want duplicates.
if (chatContact.equals(containedChatContact))
@@ -174,11 +177,11 @@ public class ChatContactListModel /**
* Removes a specific <tt>ChatContact</tt> from this
* <tt>AbstractListModel</tt> implementation.
- *
+ *
* @param chatContact a <tt>ChatContact</tt> to be removed from this
* <tt>AbstractListModel</tt> if it's already contained
*/
- public void removeElement(ChatContact chatContact)
+ public void removeElement(ChatContact<?> chatContact)
{
synchronized(chatContacts)
{
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 31188c3..7efeee7 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 @@ -65,8 +65,8 @@ public class ChatRoomMemberListPanel this.memberList.setModel(memberListModel); this.memberList.addKeyListener(new CListKeySearchListener(memberList)); this.memberList.setCellRenderer(new ChatContactCellRenderer()); - - // It's pertinent to add the ChatContactRightButtonMenu only we aren't + + // It's pertinent to add the ChatContactRightButtonMenu only we aren't // in an ad-hoc multi user chat (which support roles) if(this.chatPanel.getChatSession().getCurrentChatTransport() .getProtocolProvider().getSupportedOperationSets().containsKey( @@ -82,8 +82,8 @@ public class ChatRoomMemberListPanel memberList.setSelectedIndex( memberList.locationToIndex(e.getPoint())); - ChatContact chatContact - = (ChatContact) memberList.getSelectedValue(); + ChatContact<?> chatContact + = (ChatContact<?>) memberList.getSelectedValue(); if (chatContact != null) new ChatContactRightButtonMenu( @@ -94,7 +94,7 @@ public class ChatRoomMemberListPanel } }); } - + JScrollPane contactsScrollPane = new SCScrollPane(); contactsScrollPane.setHorizontalScrollBarPolicy( @@ -114,7 +114,7 @@ public class ChatRoomMemberListPanel * * @param chatContact the <tt>ChatContact</tt> to add */ - public void addContact(ChatContact chatContact) + public void addContact(ChatContact<?> chatContact) { memberListModel.addElement(chatContact); } @@ -124,7 +124,7 @@ public class ChatRoomMemberListPanel * * @param chatContact the <tt>ChatContact</tt> to remove */ - public void removeContact(ChatContact chatContact) + public void removeContact(ChatContact<?> chatContact) { memberListModel.removeElement(chatContact); } @@ -135,7 +135,7 @@ public class ChatRoomMemberListPanel * * @param chatContact the <tt>ChatContact</tt> to be renamed */ - public void renameContact(ChatContact chatContact) + public void renameContact(ChatContact<?> chatContact) { } diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatSession.java b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatSession.java index b80c153..f2d7cbd 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatSession.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatSession.java @@ -19,7 +19,7 @@ import net.java.sip.communicator.service.protocol.event.*; /** * An implementation of <tt>ChatSession</tt> for conference chatting. - * + * * @author Yana Stamcheva * @author Lubomir Marinov * @author Valentin Martinet @@ -56,7 +56,7 @@ public class ConferenceChatSession * Creates an instance of <tt>ConferenceChatSession</tt>, by specifying the * sessionRenderer to be used for communication with the UI and the chatRoom * corresponding to this conference session. - * + * * @param sessionRenderer the renderer to be used for communication with the * UI. * @param chatRoomWrapper the chat room corresponding to this conference @@ -82,7 +82,7 @@ public class ConferenceChatSession /** * Returns the descriptor of this chat session. - * + * * @return the descriptor of this chat session. */ public Object getDescriptor() @@ -106,7 +106,7 @@ public class ConferenceChatSession /** * Returns the name of the chat room. - * + * * @return the name of the chat room. */ public String getChatName() @@ -116,7 +116,7 @@ public class ConferenceChatSession /** * Returns the subject of the chat room. - * + * * @return the subject of the chat room. */ public String getChatSubject() @@ -126,7 +126,7 @@ public class ConferenceChatSession /** * Returns the configuration form corresponding to the chat room. - * + * * @return the configuration form corresponding to the chat room. * @throws OperationFailedException if no configuration form is available * for the chat room. @@ -140,7 +140,7 @@ public class ConferenceChatSession /** * Returns the currently used transport for all operation within this chat * session. - * + * * @return the currently used transport for all operation within this chat * session. */ @@ -152,7 +152,7 @@ public class ConferenceChatSession /** * Returns the default mobile number used to send sms-es in this session. In * the case of conference this is for now null. - * + * * @return the default mobile number used to send sms-es in this session. */ public String getDefaultSmsNumber() @@ -162,7 +162,7 @@ public class ConferenceChatSession /** * Returns a collection of the last N number of messages given by count. - * + * * @param count The number of messages from history to return. * @return a collection of the last N number of messages given by count. */ @@ -185,7 +185,7 @@ public class ConferenceChatSession /** * Returns a collection of the last N number of messages given by count. - * + * * @param date The date up to which we're looking for messages. * @param count The number of messages from history to return. * @return a collection of the last N number of messages given by count. @@ -210,7 +210,7 @@ public class ConferenceChatSession /** * Returns a collection of the last N number of messages given by count. - * + * * @param date The date from which we're looking for messages. * @param count The number of messages from history to return. * @return a collection of the last N number of messages given by count. @@ -235,7 +235,7 @@ public class ConferenceChatSession /** * Returns the start date of the history of this chat session. - * + * * @return the start date of the history of this chat session. */ public long getHistoryStartDate() @@ -284,7 +284,7 @@ public class ConferenceChatSession /** * Returns the end date of the history of this chat session. - * + * * @return the end date of the history of this chat session. */ public long getHistoryEndDate() @@ -333,7 +333,7 @@ public class ConferenceChatSession /** * Sets the transport that will be used for all operations within this chat * session. - * + * * @param chatTransport The transport to set as a default transport for this * session. */ @@ -348,7 +348,7 @@ public class ConferenceChatSession /** * Sets the default mobile number used to send sms-es in this session. - * + * * @param smsPhoneNumber The default mobile number used to send sms-es in * this session. */ @@ -357,7 +357,7 @@ public class ConferenceChatSession /** * Returns the <tt>ChatSessionRenderer</tt> that provides the connection * between this chat session and its UI. - * + * * @return The <tt>ChatSessionRenderer</tt>. */ public ChatSessionRenderer getChatSessionRenderer() @@ -390,7 +390,7 @@ public class ConferenceChatSession { ConferenceChatContact chatContact = new ConferenceChatContact(chatRoomMember); - + // Check if not ever present in the chat room. In some cases, the // considered chatroom member may appear twice in the chat contact // list panel. @@ -400,7 +400,7 @@ public class ConferenceChatSession chatParticipants.add(chatContact); sessionRenderer.addChatContact(chatContact); } - + /* * When the whole list of members of a given chat room is reported, * it doesn't make sense to see "ChatContact has joined #ChatRoom" @@ -444,7 +444,7 @@ public class ConferenceChatSession new String[] {sourceChatRoom.getName()}); } - for (ChatContact chatContact : chatParticipants) + for (ChatContact<?> chatContact : chatParticipants) { if(chatContact.getDescriptor().equals(chatRoomMember)) { @@ -463,7 +463,7 @@ public class ConferenceChatSession /** * Updates the chat panel when a property of the chat room has been modified. - * + * * @param evt the event containing information about the property change */ public void chatRoomPropertyChanged(ChatRoomPropertyChangeEvent evt) @@ -489,7 +489,7 @@ public class ConferenceChatSession /** * Loads the given chat room in the this chat conference panel. Loads all * members and adds all corresponding listeners. - * + * * @param chatRoom the <tt>ChatRoom</tt> to load */ public void loadChatRoom(ChatRoom chatRoom) diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultContactList.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultContactList.java index db7355f..8f968e8 100644 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultContactList.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultContactList.java @@ -164,9 +164,9 @@ public class DefaultContactList tip.setTitle(metaGroup.getGroupName()); } - else if (element instanceof ChatContact) + else if (element instanceof ChatContact<?>) { - ChatContact chatContact = (ChatContact) element; + ChatContact<?> chatContact = (ChatContact<?>) element; ImageIcon avatarImage = chatContact.getAvatar(); @@ -232,9 +232,9 @@ public class DefaultContactList return metaGroup.getMetaUID(); } - else if (element instanceof ChatContact) + else if (element instanceof ChatContact<?>) { - ChatContact chatContact = (ChatContact) element; + ChatContact<?> chatContact = (ChatContact<?>) element; return chatContact.getUID(); } diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultTreeContactList.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultTreeContactList.java index 5572bc2..17709fd 100644 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultTreeContactList.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultTreeContactList.java @@ -135,9 +135,9 @@ public class DefaultTreeContactList tip = new ExtendedTooltip(true); tip.setTitle(group.getDisplayName()); } - else if (element instanceof ChatContact) + else if (element instanceof ChatContact<?>) { - ChatContact chatContact = (ChatContact) element; + ChatContact<?> chatContact = (ChatContact<?>) element; ImageIcon avatarImage = chatContact.getAvatar(); diff --git a/src/net/java/sip/communicator/impl/neomedia/MediaUtils.java b/src/net/java/sip/communicator/impl/neomedia/MediaUtils.java index e7a5150..a70df75 100644 --- a/src/net/java/sip/communicator/impl/neomedia/MediaUtils.java +++ b/src/net/java/sip/communicator/impl/neomedia/MediaUtils.java @@ -247,6 +247,7 @@ public class MediaUtils * @param clockRates the optional list of clock rates of the * <tt>MediaFormat</tt>s to be associated with <tt>rtpPayloadType</tt> */ + @SuppressWarnings("unchecked") private static void addMediaFormats( byte rtpPayloadType, String encoding, @@ -354,6 +355,7 @@ public class MediaUtils * represents <tt>format</tt> if any; <tt>null</tt> if there is no such * representing <tt>MediaFormat</tt> in <tt>MediaUtils</tt> */ + @SuppressWarnings("unchecked") public static MediaFormat getMediaFormat(Format format) { double clockRate; @@ -409,6 +411,7 @@ public class MediaUtils * @return a <tt>List</tt> of <tt>MediaFormat</tt>s corresponding to the * specified encoding (name) */ + @SuppressWarnings("unchecked") public static List<MediaFormat> getMediaFormats(String encoding) { String jmfEncoding = null; @@ -434,6 +437,7 @@ public class MediaUtils .getJMFEncoding().equals(jmfEncoding)) mediaFormats.add(rtpPayloadTypeMediaFormat); + if (mediaFormats.size() < 1) { for (MediaFormat rtpPayloadTypelessMediaFormat diff --git a/src/net/java/sip/communicator/impl/neomedia/RTPConnectorOutputStream.java b/src/net/java/sip/communicator/impl/neomedia/RTPConnectorOutputStream.java index 0c34305..2c1eac6 100755 --- a/src/net/java/sip/communicator/impl/neomedia/RTPConnectorOutputStream.java +++ b/src/net/java/sip/communicator/impl/neomedia/RTPConnectorOutputStream.java @@ -279,7 +279,7 @@ public class RTPConnectorOutputStream /**
* The maximum number of RTP packets to be sent by this
* <tt>OutputDataStream</tt> through its <tt>DatagramSocket</tt> per
- * {@link #perMillis} milliseconds.
+ * {@link #perNanos} nanoseconds.
*/
private int maxPackets = -1;
@@ -371,7 +371,7 @@ public class RTPConnectorOutputStream /**
* Sends the RTP packets in {@link #packetQueue} in accord with
- * {@link #maxPackets} and {@link #perMillis}.
+ * {@link #maxPackets} and {@link #perNanos}.
*/
private void runInSendThread()
{
diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/EncodingConfiguration.java b/src/net/java/sip/communicator/impl/neomedia/codec/EncodingConfiguration.java index 392d98d..90714ce 100644 --- a/src/net/java/sip/communicator/impl/neomedia/codec/EncodingConfiguration.java +++ b/src/net/java/sip/communicator/impl/neomedia/codec/EncodingConfiguration.java @@ -33,6 +33,9 @@ public class EncodingConfiguration */ private final Logger logger = Logger.getLogger(EncodingConfiguration.class); + /** + * The SDP preference property. + */ private static final String PROP_SDP_PREFERENCE = "net.java.sip.communicator.impl.neomedia.codec.EncodingConfiguration"; @@ -52,6 +55,9 @@ public class EncodingConfiguration private static final String SPEEX_RESAMPLER = "net.java.sip.communicator.impl.neomedia.codec.audio.speex.SpeexResampler"; + /** + * The additional custom JMF codecs. + */ private static final String[] CUSTOM_CODECS = { FMJConditionals.FMJ_CODECS @@ -295,10 +301,11 @@ public class EncodingConfiguration * encodings to those of audio encodings. * * @param encoding the SDP int of the encoding whose pref we're setting. - * @param clockRate + * @param clockRate clock rate * @param pref a positive int indicating the preference for that encoding. */ - private void setEncodingPreference(String encoding, double clockRate, int pref) + private void setEncodingPreference(String encoding, double clockRate, + int pref) { MediaFormat mediaFormat = MediaUtils.getMediaFormat(encoding, clockRate); @@ -334,6 +341,11 @@ public class EncodingConfiguration updateSupportedEncodings(); } + /** + * Set the priority for a <tt>MediaFormat</tt>. + * @param encoding the <tt>MediaFormat</tt> + * @return the priority + */ public int getPriority(MediaFormat encoding) { @@ -504,6 +516,14 @@ public class EncodingConfiguration } } + /** + * Get the available encodings for a specific <tt>MediaType</tt>. + * + * @param type the <tt>MediaType</tt> we would like to know its available + * encodings + * @return array of <tt>MediaFormat</tt> supported for the + * <tt>MediaType</tt> + */ public MediaFormat[] getAvailableEncodings(MediaType type) { return MediaUtils.getMediaFormats(type); diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/audio/Utils.java b/src/net/java/sip/communicator/impl/neomedia/codec/audio/Utils.java index 0addbcb..36860a1 100644 --- a/src/net/java/sip/communicator/impl/neomedia/codec/audio/Utils.java +++ b/src/net/java/sip/communicator/impl/neomedia/codec/audio/Utils.java @@ -28,7 +28,8 @@ public class Utils * @return a short array, or <code>null</code> if byteArray is of zero * length * - * @throws java.lang.ArrayIndexOutOfBoundsException + * @throws java.lang.ArrayIndexOutOfBoundsException if the array is too + * small to fill data */ public static short[] byteToShortArray (byte[] byteArray, int offset, int length, boolean little) diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/audio/alaw/JavaEncoder.java b/src/net/java/sip/communicator/impl/neomedia/codec/audio/alaw/JavaEncoder.java index 58e8d48..ddacce4 100644 --- a/src/net/java/sip/communicator/impl/neomedia/codec/audio/alaw/JavaEncoder.java +++ b/src/net/java/sip/communicator/impl/neomedia/codec/audio/alaw/JavaEncoder.java @@ -95,7 +95,8 @@ public class JavaEncoder /** * No resources to be opened. - * @throws ResourceUnavailableException + * @throws ResourceUnavailableException if open failed (which cannot + * happend for this codec since no resources are to be opened) */ public void open() throws ResourceUnavailableException {} @@ -206,12 +207,12 @@ public class JavaEncoder * @return integer. */ public static int uShortToInt(short value) - { + { if (value >= 0) - return value; - else - return MAX_USHORT + 1 + value; - } + return value; + else + return MAX_USHORT + 1 + value; + } /** * Encode an array of pcm values into a pre-allocated target array @@ -226,10 +227,10 @@ public class JavaEncoder public static void aLawEncode(boolean bigEndian, byte[] data, int offset, int length, byte[] target) { - if (bigEndian) - aLawEncodeBigEndian(data, offset, length, target); - else - aLawEncodeLittleEndian(data, offset, length, target); + if (bigEndian) + aLawEncodeBigEndian(data, offset, length, target); + else + aLawEncodeLittleEndian(data, offset, length, target); } /** @@ -305,7 +306,7 @@ public class JavaEncoder int exponent = 7; //Move to the right and decrement exponent until //we hit the 1 or the exponent hits 0 - for (int expMask = 0x4000; + for (int expMask = 0x4000; (pcm & expMask) == 0 && exponent>0; exponent--, expMask >>= 1) { } diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/audio/alaw/Packetizer.java b/src/net/java/sip/communicator/impl/neomedia/codec/audio/alaw/Packetizer.java index 72c6ad9..682942f 100644 --- a/src/net/java/sip/communicator/impl/neomedia/codec/audio/alaw/Packetizer.java +++ b/src/net/java/sip/communicator/impl/neomedia/codec/audio/alaw/Packetizer.java @@ -19,6 +19,9 @@ import net.java.sip.communicator.impl.neomedia.codec.*; public class Packetizer extends AudioPacketizer { + /** + * Constructs a new ALAW packetizer. + */ public Packetizer() { packetSize = 160; diff --git a/src/net/java/sip/communicator/impl/neomedia/directshow/DSFormat.java b/src/net/java/sip/communicator/impl/neomedia/directshow/DSFormat.java index 05c1c71..8fedd66 100644 --- a/src/net/java/sip/communicator/impl/neomedia/directshow/DSFormat.java +++ b/src/net/java/sip/communicator/impl/neomedia/directshow/DSFormat.java @@ -30,14 +30,50 @@ public class DSFormat }
/* supported formats */
+
+ /**
+ * The RGB24 constant.
+ */
public static final long RGB24;
+
+ /**
+ * The RGB32 constant.
+ */
public static final long RGB32;
+
+ /**
+ * The ARGB32 constant.
+ */
public static final long ARGB32;
+
+ /**
+ * The YUY2 constant.
+ */
public static final long YUY2;
+
+ /**
+ * The UYVY constant.
+ */
public static final long UYVY;
+
+ /**
+ * The Y411 constant.
+ */
public static final long Y411;
+
+ /**
+ * The Y41P constant.
+ */
public static final long Y41P;
+
+ /**
+ * The NV12 constant.
+ */
public static final long NV12;
+
+ /**
+ * The I420 constant.
+ */
public static final long I420;
/**
@@ -100,27 +136,146 @@ public class DSFormat }
/* RGB */
+ /**
+ * Get the RGB24 native pixel format
+ *
+ * @return RGB24 native format value
+ */
public static native long getRGB24PixelFormat();
+
+ /**
+ * Get the RGB32 native pixel format
+ *
+ * @return RGB32 native format value
+ */
public static native long getRGB32PixelFormat();
+
+ /**
+ * Get the ARGB32 native pixel format
+ *
+ * @return ARGB32 native format value
+ */
public static native long getARGBPixelFormat();
/* YUV */
+
+ /**
+ * Get the AYUV native pixel format
+ *
+ * @return AYUV native format value
+ */
public static native long getAYUVPixelFormat();
+
+ /**
+ * Get the YUY2 native pixel format
+ *
+ * @return YUY2 native format value
+ */
public static native long getYUY2PixelFormat();
+
+ /**
+ * Get the UYVY native pixel format
+ *
+ * @return UYVY native format value
+ */
public static native long getUYVYPixelFormat();
+
+ /**
+ * Get the IMC1 native pixel format
+ *
+ * @return IMC1 native format value
+ */
public static native long getIMC1PixelFormat();
+
+ /**
+ * Get the IMC2 native pixel format
+ *
+ * @return IMC2 native format value
+ */
public static native long getIMC2PixelFormat();
+
+ /**
+ * Get the IMC3 native pixel format
+ *
+ * @return IMC3 native format value
+ */
public static native long getIMC3PixelFormat();
+
+ /**
+ * Get the IMC4 native pixel format
+ *
+ * @return IMC4 native format value
+ */
public static native long getIMC4PixelFormat();
+
+ /**
+ * Get the YV12 native pixel format
+ *
+ * @return YV12 native format value
+ */
public static native long getYV12PixelFormat();
+
+ /**
+ * Get the NV12 native pixel format
+ *
+ * @return NV12 native format value
+ */
public static native long getNV12PixelFormat();
+
+ /**
+ * Get the IF09 native pixel format
+ *
+ * @return IF09 native format value
+ */
public static native long getIF09PixelFormat();
+
+ /**
+ * Get the IYUV native pixel format
+ *
+ * @return IYUV native format value
+ */
public static native long getIYUVPixelFormat();
+
+ /**
+ * Get the Y211 native pixel format
+ *
+ * @return Y211 native format value
+ */
public static native long getY211PixelFormat();
+
+ /**
+ * Get the Y411 native pixel format
+ *
+ * @return Y411 native format value
+ */
public static native long getY411PixelFormat();
+
+ /**
+ * Get the Y41P native pixel format
+ *
+ * @return Y41P native format value
+ */
public static native long getY41PPixelFormat();
+
+ /**
+ * Get the YVU9 native pixel format
+ *
+ * @return YVU9 native format value
+ */
public static native long getYVU9PixelFormat();
+
+ /**
+ * Get the YVYU native pixel format
+ *
+ * @return YVYU native format value
+ */
public static native long getYVYUPixelFormat();
+
+ /**
+ * Get the I420 native pixel format
+ *
+ * @return I420 native format value
+ */
public static native long getI420PixelFormat();
}
diff --git a/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/AbstractPullBufferStream.java b/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/AbstractPullBufferStream.java index a81bb8e..6f1dada 100644 --- a/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/AbstractPullBufferStream.java +++ b/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/AbstractPullBufferStream.java @@ -155,8 +155,8 @@ public abstract class AbstractPullBufferStream } /** - * Implements {@link Controls#getControls()}. Gets the controls available - * for this instance. + * Implements {@link javax.media.protocol.Controls#getControls()}. Gets the + * controls available for this instance. * * @return an array of <tt>Object</tt>s which represent the controls * available for this instance diff --git a/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/AbstractPushBufferCaptureDevice.java b/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/AbstractPushBufferCaptureDevice.java index 0c630ad..0424277 100644 --- a/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/AbstractPushBufferCaptureDevice.java +++ b/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/AbstractPushBufferCaptureDevice.java @@ -411,8 +411,8 @@ public abstract class AbstractPushBufferCaptureDevice } /** - * Implements {@link Controls#getControls()}. Gets the controls available - * for this instance. + * Implements {@link javax.media.protocol.Controls#getControls()}. Gets the + * controls available for this instance. * * @return an array of <tt>Object</tt>s which represent the controls * available for this instance diff --git a/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/AbstractPushBufferStream.java b/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/AbstractPushBufferStream.java index 4432bf0..9870da5 100644 --- a/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/AbstractPushBufferStream.java +++ b/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/AbstractPushBufferStream.java @@ -161,8 +161,8 @@ public abstract class AbstractPushBufferStream } /** - * Implements {@link Controls#getControls()}. Gets the controls available - * for this instance. + * Implements {@link javax.media.protocol.Controls#getControls()}. Gets the + * controls available for this instance. * * @return an array of <tt>Object</tt>s which represent the controls * available for this instance diff --git a/src/net/java/sip/communicator/impl/neomedia/jmfext/media/renderer/video/JAWTRenderer.java b/src/net/java/sip/communicator/impl/neomedia/jmfext/media/renderer/video/JAWTRenderer.java index 971f16c..d3394b1 100644 --- a/src/net/java/sip/communicator/impl/neomedia/jmfext/media/renderer/video/JAWTRenderer.java +++ b/src/net/java/sip/communicator/impl/neomedia/jmfext/media/renderer/video/JAWTRenderer.java @@ -158,6 +158,11 @@ public class JAWTRenderer component = new Canvas() { /** + * Serial version UID. + */ + public static final long serialVersionUID = 0L; + + /** * The indicator which determines whether the native counterpart * of this <tt>JAWTRenderer</tt> wants <tt>paint</tt> calls on * its AWT <tt>Component</tt> to be delivered. For example, @@ -241,6 +246,8 @@ public class JAWTRenderer * operate. The input format of this <tt>Renderer</tt> has to be set before * <tt>open</tt> is called. Buffers should not be passed into this * <tt>PlugIn</tt> without first calling <tt>open</tt>. + * + * @throws ResourceUnavailableException if there is a problem during opening */ public synchronized void open() throws ResourceUnavailableException @@ -268,6 +275,7 @@ public class JAWTRenderer * to be valid. * @return a handle to a native counterpart of a <tt>JAWTRenderer</tt> which * is to draw into the specified AWT <tt>Component</tt> + * @throws ResourceUnavailableException if there is a problem during opening */ private static native long open(Component component) throws ResourceUnavailableException; diff --git a/src/net/java/sip/communicator/impl/neomedia/protocol/BufferStreamAdapter.java b/src/net/java/sip/communicator/impl/neomedia/protocol/BufferStreamAdapter.java index aeac468..ee8374e 100644 --- a/src/net/java/sip/communicator/impl/neomedia/protocol/BufferStreamAdapter.java +++ b/src/net/java/sip/communicator/impl/neomedia/protocol/BufferStreamAdapter.java @@ -41,8 +41,8 @@ public abstract class BufferStreamAdapter<T extends SourceStream> * specific <tt>SourceStream</tt> into a <tt>SourceStream</tt> with * a specific <tt>Format</tt>. * - * @param stream - * @param format + * @param stream the <tt>SourceStream</tt> to be adapted + * @param format the specific <tt>Format</tt> of the <tt>SourceStream</tt> */ public BufferStreamAdapter(T stream, Format format) { @@ -50,44 +50,57 @@ public abstract class BufferStreamAdapter<T extends SourceStream> this.format = format; } - /* + /** * Implements SourceStream#endOfStream(). Delegates to the wrapped * SourceStream. + * + * @return true if the stream is finished, false otherwise */ public boolean endOfStream() { return stream.endOfStream(); } - /* + /** * Implements SourceStream#getContentDescriptor(). Delegates to the wrapped * SourceStream. + * + * @return the <tt>ContentDescriptor</tt> of the stream */ public ContentDescriptor getContentDescriptor() { return stream.getContentDescriptor(); } - /* + /** * Implements SourceStream#getContentLength(). Delegates to the wrapped * SourceStream. + * + * @return content length */ public long getContentLength() { return stream.getContentLength(); } - /* + /** * Implements Controls#getControl(String). Delegates to the wrapped * SourceStream. + * + * @param controlType a <tt>String</tt> value naming the type of the control + * of this instance to be retrieved + * @return an <tt>Object</tt> which represents the control of this instance + * with the specified type */ public Object getControl(String controlType) { return stream.getControl(controlType); } - /* + /** * Implements Controls#getControls(). Delegates to the wrapped SourceStream. + * + * @return array of JMF <tt>Control</tt> objects */ public Object[] getControls() { @@ -123,7 +136,7 @@ public abstract class BufferStreamAdapter<T extends SourceStream> * @param bytes the array of <tt>byte</tt>s to read data into from this * instance and to be set as the data of the specified * <tt>buffer</tt> - * @throws IOException + * @throws IOException if I/O related errors occurred during read operation */ protected void read(Buffer buffer, byte[] bytes) throws IOException @@ -157,7 +170,7 @@ public abstract class BufferStreamAdapter<T extends SourceStream> * specified <tt>buffer</tt> * @return the number of bytes read from this stream and written into the * specified <tt>buffer</tt> - * @throws IOException + * @throws IOException if I/O related errors occurred during read operation */ protected abstract int read(byte[] buffer, int offset, int length) throws IOException; diff --git a/src/net/java/sip/communicator/impl/neomedia/protocol/CachingPushBufferStream.java b/src/net/java/sip/communicator/impl/neomedia/protocol/CachingPushBufferStream.java index cdfad2f..8ed2691 100644 --- a/src/net/java/sip/communicator/impl/neomedia/protocol/CachingPushBufferStream.java +++ b/src/net/java/sip/communicator/impl/neomedia/protocol/CachingPushBufferStream.java @@ -89,7 +89,7 @@ public class CachingPushBufferStream /** * The <tt>PushBufferStream</tt> being paced by this instance with - * respect to the maximum number of data units it provides in a single push. + * respect to the maximum number of data units it provides in a single push. */ private final PushBufferStream stream; @@ -97,7 +97,7 @@ public class CachingPushBufferStream * Initializes a new <tt>CachingPushBufferStream</tt> instance which is * to pace the number of per-push data units a specific * <tt>PushBufferStream</tt> provides. - * + * * @param stream the <tt>PushBufferStream</tt> to be paced with respect to * the number of per-push data units it provides */ @@ -236,10 +236,11 @@ public class CachingPushBufferStream } /** - * Implements {@link Controls#getControl(String)}. Delegates to the wrapped - * <tt>PushBufferStream</tt> and gives access to the <tt>BufferControl</tt> - * of this instance if such a <tt>controlType</tt> is specified and the - * wrapped <tt>PushBufferStream</tt> does not have such a control available. + * Implements {@link javax.media.Controls#getControl(String)}. Delegates to + * the wrapped <tt>PushBufferStream</tt> and gives access to the + * <tt>BufferControl</tt> of this instance if such a <tt>controlType</tt> is + * specified and the wrapped <tt>PushBufferStream</tt> does not have such a + * control available. * * @param controlType a <tt>String</tt> value which names the type of the * control of the wrapped <tt>PushBufferStream</tt> to be retrieved @@ -258,10 +259,10 @@ public class CachingPushBufferStream } /** - * Implements {@link Controls#getControls()}. Delegates to the wrapped - * <tt>PushBufferStream</tt> and adds the <tt>BufferControl</tt> of this - * instance if the wrapped <tt>PushBufferStream</tt> does not have a control - * of such type available. + * Implements {@link javax.media.Controls#getControls()}. Delegates to the + * wrapped <tt>PushBufferStream</tt> and adds the <tt>BufferControl</tt> of + * this instance if the wrapped <tt>PushBufferStream</tt> does not have a + * control of such type available. * * @return an array of <tt>Object</tt>s which represent the control * available for the wrapped <tt>PushBufferStream</tt> @@ -428,7 +429,7 @@ public class CachingPushBufferStream * matches that of the input <tt>Buffer</tt>, it will be used and thus the * output <tt>Buffer</tt> may control the maximum number of data units to be * read into it. - * + * * @param input the <tt>Buffer</tt> to read data from * @param output the <tt>Buffer</tt> into which to write the data read * from the specified <tt>input</tt> diff --git a/src/net/java/sip/communicator/impl/neomedia/protocol/PullBufferStreamAdapter.java b/src/net/java/sip/communicator/impl/neomedia/protocol/PullBufferStreamAdapter.java index 04b54d9..c286f9b 100644 --- a/src/net/java/sip/communicator/impl/neomedia/protocol/PullBufferStreamAdapter.java +++ b/src/net/java/sip/communicator/impl/neomedia/protocol/PullBufferStreamAdapter.java @@ -15,7 +15,7 @@ import javax.media.protocol.*; /** * Represents a <tt>PullBufferStream</tt> which reads its data from a * specific <tt>PullSourceStream</tt>. - * + * * @author Lubomir Marinov */ public class PullBufferStreamAdapter @@ -27,7 +27,7 @@ public class PullBufferStreamAdapter * Initializes a new <tt>PullBufferStreamAdapter</tt> instance which * reads its data from a specific <tt>PullSourceStream</tt> with a * specific <tt>Format</tt> - * + * * @param stream the <tt>PullSourceStream</tt> the new instance is to * read its data from * @param format the <tt>Format</tt> of the specified input @@ -41,7 +41,7 @@ public class PullBufferStreamAdapter /** * Gets the frame size measured in bytes defined by a specific * <tt>Format</tt>. - * + * * @param format the <tt>Format</tt> to determine the frame size in * bytes of * @return the frame size measured in bytes defined by the specified @@ -59,10 +59,13 @@ public class PullBufferStreamAdapter return (frameSizeInBits <= 8) ? 1 : (frameSizeInBits / 8); } - /* + /** * Implements PullBufferStream#read(Buffer). Delegates to the wrapped * PullSourceStream by either allocating a new byte[] buffer or using the * existing one in the specified Buffer. + * + * @param buffer <tt>Buffer</tt> to read + * @throws IOException if I/O errors occurred during read operation */ public void read(Buffer buffer) throws IOException @@ -99,9 +102,15 @@ public class PullBufferStreamAdapter read(buffer, bytes); } - /* + /** * Implements BufferStreamAdapter#read(byte[], int, int). Delegates to the * wrapped PullSourceStream. + * + * @param buffer byte array to read + * @param offset to start reading + * @param length length to read + * @return number of bytes read + * @throws IOException if I/O related errors occurred during read operation */ protected int read(byte[] buffer, int offset, int length) throws IOException @@ -109,9 +118,11 @@ public class PullBufferStreamAdapter return stream.read(buffer, offset, length); } - /* + /** * Implements PullBufferStream#willReadBlock(). Delegates to the wrapped * PullSourceStream. + * + * @return true if this stream will block on read operation, false otherwise */ public boolean willReadBlock() { diff --git a/src/net/java/sip/communicator/impl/neomedia/protocol/PushBufferStreamAdapter.java b/src/net/java/sip/communicator/impl/neomedia/protocol/PushBufferStreamAdapter.java index 0ad7355..a4b075b 100644 --- a/src/net/java/sip/communicator/impl/neomedia/protocol/PushBufferStreamAdapter.java +++ b/src/net/java/sip/communicator/impl/neomedia/protocol/PushBufferStreamAdapter.java @@ -14,7 +14,7 @@ import javax.media.protocol.*; /** * Represents a <tt>PushBufferStream</tt> which reads its data from a * specific <tt>PushSourceStream</tt>. - * + * * @author Lubomir Marinov */ public class PushBufferStreamAdapter @@ -26,7 +26,7 @@ public class PushBufferStreamAdapter * Initializes a new <tt>PushBufferStreamAdapter</tt> instance which * reads its data from a specific <tt>PushSourceStream</tt> with a * specific <tt>Format</tt> - * + * * @param stream the <tt>PushSourceStream</tt> the new instance is to * read its data from * @param format the <tt>Format</tt> of the specified input @@ -37,10 +37,13 @@ public class PushBufferStreamAdapter super(stream, format); } - /* + /** * Implements PushBufferStream#read(Buffer). Delegates to the wrapped * PushSourceStream by allocating a new byte[] buffer of size equal to - * PushSourceStream#getMinimumTransferSize(). + * PushSourceStream#getMinimumTransferSize(). + * + * @param buffer the <tt>Buffer</tt> to read + * @throws IOException if I/O related errors occurred during read operation */ public void read(Buffer buffer) throws IOException @@ -48,9 +51,15 @@ public class PushBufferStreamAdapter read(buffer, new byte[stream.getMinimumTransferSize()]); } - /* + /** * Implements BufferStreamAdapter#read(byte[], int, int). Delegates to the * wrapped PushSourceStream. + * + * @param buffer byte array to read + * @param offset offset to start reading + * @param length length to read + * @return number of bytes read + * @throws IOException if I/O related errors occurred during read operation */ protected int read(byte[] buffer, int offset, int length) throws IOException @@ -58,10 +67,12 @@ public class PushBufferStreamAdapter return stream.read(buffer, offset, length); } - /* + /** * Implements PushBufferStream#setTransferHandler(BufferTransferHandler). * Delegates to the wrapped PushSourceStream by translating the specified * BufferTransferHandler to a SourceTransferHandler. + * + * @param transferHandler a <tt>BufferTransferHandler</tt> to set */ public void setTransferHandler(final BufferTransferHandler transferHandler) { diff --git a/src/net/java/sip/communicator/impl/neomedia/protocol/StreamSubstituteBufferTransferHandler.java b/src/net/java/sip/communicator/impl/neomedia/protocol/StreamSubstituteBufferTransferHandler.java index 6ae42c5..7e3f010 100644 --- a/src/net/java/sip/communicator/impl/neomedia/protocol/StreamSubstituteBufferTransferHandler.java +++ b/src/net/java/sip/communicator/impl/neomedia/protocol/StreamSubstituteBufferTransferHandler.java @@ -18,7 +18,7 @@ import javax.media.protocol.*; * where the method argument <code>stream</code> is ignored and the substitute * is used instead. * </p> - * + * * @author Lubomir Marinov */ public class StreamSubstituteBufferTransferHandler @@ -48,7 +48,7 @@ public class StreamSubstituteBufferTransferHandler * Initializes a new <tt>StreamSubstituteBufferTransferHandler</tt> instance * which is to overwrite the source <tt>PushBufferStream</tt> of a specific * <tt>BufferTransferHandler</tt>. - * + * * @param transferHandler the <tt>BufferTransferHandler</tt> the new * instance is to overwrite the source <tt>PushBufferStream</tt> * of @@ -69,11 +69,13 @@ public class StreamSubstituteBufferTransferHandler this.substitute = substitute; } - /* + /** * Implements BufferTransferHandler#transferData(PushBufferStream). Puts in * place the essence of the StreamSubstituteBufferTransferHandler class * which is to report to the transferHandler from the same PushBufferStream * to which it was set so that the substitute can gain full control. + * + * @param stream the <tt>PushBufferStream</tt> to transfer */ public void transferData(PushBufferStream stream) { diff --git a/src/net/java/sip/communicator/impl/protocol/SingleCallInProgressPolicy.java b/src/net/java/sip/communicator/impl/protocol/SingleCallInProgressPolicy.java index 82936ea..fbed031 100644 --- a/src/net/java/sip/communicator/impl/protocol/SingleCallInProgressPolicy.java +++ b/src/net/java/sip/communicator/impl/protocol/SingleCallInProgressPolicy.java @@ -228,7 +228,7 @@ public class SingleCallInProgressPolicy * the <code>Call</code>s created by the former */ private void addOperationSetBasicTelephonyListener( - OperationSetBasicTelephony telephony) + OperationSetBasicTelephony<? extends ProtocolProviderService> telephony) { telephony.addCallListener(listener); } @@ -318,7 +318,7 @@ public class SingleCallInProgressPolicy */ private void putOnHold(Call call) { - OperationSetBasicTelephony telephony = + OperationSetBasicTelephony<?> telephony = call.getProtocolProvider() .getOperationSet(OperationSetBasicTelephony.class); @@ -377,7 +377,7 @@ public class SingleCallInProgressPolicy * the <code>Call</code>s created by the former */ private void removeOperationSetBasicTelephonyListener( - OperationSetBasicTelephony telephony) + OperationSetBasicTelephony<? extends ProtocolProviderService> telephony) { telephony.removeCallListener(listener); } @@ -401,7 +401,7 @@ public class SingleCallInProgressPolicy if (service instanceof ProtocolProviderService) { - OperationSetBasicTelephony telephony = + OperationSetBasicTelephony<?> telephony = ((ProtocolProviderService) service) .getOperationSet(OperationSetBasicTelephony.class); diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetGeolocationJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetGeolocationJabberImpl.java index a357a82..95ad054 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetGeolocationJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetGeolocationJabberImpl.java @@ -32,7 +32,9 @@ import net.java.sip.communicator.util.*; public class OperationSetGeolocationJabberImpl implements OperationSetGeolocation { - + /** + * Our logger. + */ private static final Logger logger = Logger.getLogger(OperationSetGeolocationJabberImpl.class); diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetServerStoredAccountInfoJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetServerStoredAccountInfoJabberImpl.java index 5998c20..2d94b56 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetServerStoredAccountInfoJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetServerStoredAccountInfoJabberImpl.java @@ -29,7 +29,7 @@ public class OperationSetServerStoredAccountInfoJabberImpl private ProtocolProviderServiceJabberImpl jabberProvider = null; /** - * Our account uin + * Our account UIN. */ private String uin = null; @@ -196,9 +196,10 @@ public class OperationSetServerStoredAccountInfoJabberImpl // detail.getClass()); //} - Iterator iter = getDetails(detail.getClass()); + Iterator<GenericDetail> iter = getDetails(detail.getClass()); int currentDetailsSize = 0; - while (iter.hasNext()) { + while (iter.hasNext()) + { currentDetailsSize++; } @@ -251,6 +252,9 @@ public class OperationSetServerStoredAccountInfoJabberImpl * @param currentDetailValue the detail value we'd like to replace. * @param newDetailValue the value of the detail that we'd like to replace * currentDetailValue with. + * @return true if the operation was a success or false if + * currentDetailValue did not previously exist (in this case an additional + * call to addDetail is required). * @throws ClassCastException if newDetailValue is not an instance of the * same class as currentDetailValue. * @throws OperationFailedException with code Network Failure if putting the @@ -275,12 +279,12 @@ public class OperationSetServerStoredAccountInfoJabberImpl } boolean isFound = false; - Iterator iter = + Iterator<GenericDetail> iter = infoRetreiver.getDetails(uin, currentDetailValue.getClass()); while (iter.hasNext()) { - GenericDetail item = (GenericDetail) iter.next(); + GenericDetail item = iter.next(); if (item.equals(currentDetailValue)) { isFound = true; diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetWhiteboardingJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetWhiteboardingJabberImpl.java index a79e9a5..7882caf 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetWhiteboardingJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetWhiteboardingJabberImpl.java @@ -253,12 +253,12 @@ public class OperationSetWhiteboardingJabberImpl } /** - * Returns a list of the <tt>WhiteboardSession</tt>s that + * Returns a list of the <tt>WhiteboardSession</tt>s that * <tt>WhiteboardParticipant</tt> has joined and is currently active in. * * @param participant the participant whose current * <tt>WhiteboardSession</tt>s we will be querying. - * @return a list of the <tt>WhiteboardSession</tt>s that + * @return a list of the <tt>WhiteboardSession</tt>s that * <tt>WhiteboardParticipant</tt> has joined and is currently active in. * * @throws OperationFailedException if an error occurs while trying to @@ -266,7 +266,7 @@ public class OperationSetWhiteboardingJabberImpl * @throws OperationNotSupportedException if the server does not support * white-boarding */ - public List getCurrentlyJoinedWhiteboards(WhiteboardParticipant participant) + public List<WhiteboardSession> getCurrentlyJoinedWhiteboards(WhiteboardParticipant participant) throws OperationFailedException, OperationNotSupportedException { @@ -377,7 +377,7 @@ public class OperationSetWhiteboardingJabberImpl } // If we're here this means that no white board session has been - // found and we will send an invitation to the user to join a + // found and we will send an invitation to the user to join a // white-board session created by us. WhiteboardObjectPacketExtension newMessage = (WhiteboardObjectPacketExtension) ext; @@ -417,14 +417,14 @@ public class OperationSetWhiteboardingJabberImpl /** * Delivers a <tt>WhiteboardInvitationEvent</tt> to all * registered <tt>WhiteboardInvitationListener</tt>s. - * + * * @param targetWhiteboard the white-board that invitation refers to * @param whiteboardObject the white-board object that inviter send * with this invitation and which will be shown on the white-board if the - * user accepts the invitation + * user accepts the invitation * @param inviter the inviter that sent the invitation * @param reason the reason why the inviter sent the invitation - * @param password the password to use when joining the room + * @param password the password to use when joining the room */ public void fireInvitationEvent(WhiteboardSession targetWhiteboard, WhiteboardObject whiteboardObject, @@ -463,7 +463,7 @@ public class OperationSetWhiteboardingJabberImpl /** * Delivers a <tt>WhiteboardSessionPresenceChangeEvent</tt> to all * registered <tt>WhiteboardSessionPresenceChangeEvent</tt>s. - * + * * @param session the <tt>WhiteboardSession</tt> which has been joined, * left, etc. * @param eventType the type of this event; one of LOCAL_USER_JOINED, diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/ServerStoredContactListJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/ServerStoredContactListJabberImpl.java index 8c50ff2..dcd6f0d 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/ServerStoredContactListJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/ServerStoredContactListJabberImpl.java @@ -205,7 +205,7 @@ public class ServerStoredContactListJabberImpl */ if(eventID == ServerStoredGroupEvent.GROUP_CREATED_EVENT) { - Iterator iter = group.contacts(); + Iterator<Contact> iter = group.contacts(); while (iter.hasNext()) { ContactJabberImpl c = (ContactJabberImpl)iter.next(); @@ -663,7 +663,7 @@ public class ServerStoredContactListJabberImpl else if(err.getCode() > 500) errorCode = OperationFailedException.INTERNAL_SERVER_ERROR; - errTxt = err.getCondition(); + errTxt = err.getCondition(); } throw new OperationFailedException(errTxt, errorCode, ex); diff --git a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetServerStoredAccountInfoMsnImpl.java b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetServerStoredAccountInfoMsnImpl.java index 70758ae..317424b 100644 --- a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetServerStoredAccountInfoMsnImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetServerStoredAccountInfoMsnImpl.java @@ -53,6 +53,11 @@ public class OperationSetServerStoredAccountInfoMsnImpl private Hashtable<String,List<GenericDetail>> retrievedDetails = new Hashtable<String,List<GenericDetail>>(); + /** + * Constructor. + * @param msnProvider MSN service provider + * @param uin MSN UIN + */ protected OperationSetServerStoredAccountInfoMsnImpl( ProtocolProviderServiceMsnImpl msnProvider, String uin) @@ -76,7 +81,8 @@ public class OperationSetServerStoredAccountInfoMsnImpl * @return a java.util.Iterator over all details that are instances or * descendants of the specified class. */ - public Iterator<GenericDetail> getDetailsAndDescendants(Class detailClass) + public Iterator<GenericDetail> getDetailsAndDescendants( + Class<? extends GenericDetail> detailClass) { assertConnected(); @@ -180,7 +186,8 @@ public class OperationSetServerStoredAccountInfoMsnImpl * <p> * @return a java.util.Iterator over all details of specified class. */ - public Iterator<GenericDetail> getDetails(Class detailClass) + public Iterator<GenericDetail> getDetails( + Class<? extends GenericDetail> detailClass) { assertConnected(); @@ -262,7 +269,7 @@ public class OperationSetServerStoredAccountInfoMsnImpl * <p> * @return int the maximum number of detail instances. */ - public int getMaxDetailInstances(Class detailClass) + public int getMaxDetailInstances(Class<? extends GenericDetail> detailClass) { return 1; } @@ -275,7 +282,8 @@ public class OperationSetServerStoredAccountInfoMsnImpl * @param detailClass Class * @return Iterator */ - private Iterator<GenericDetail> getDetails(String uin, Class detailClass) + private Iterator<GenericDetail> getDetails(String uin, + Class<? extends GenericDetail> detailClass) { List<GenericDetail> details = getContactDetails(uin); List<GenericDetail> result = new LinkedList<GenericDetail>(); @@ -329,7 +337,7 @@ public class OperationSetServerStoredAccountInfoMsnImpl // detail.getClass()); // } - Iterator iter = getDetails(detail.getClass()); + Iterator<GenericDetail> iter = getDetails(detail.getClass()); int currentDetailsSize = 0; while (iter.hasNext()) { @@ -367,7 +375,7 @@ public class OperationSetServerStoredAccountInfoMsnImpl * Stores the picture. * @param data data to store * @return the picture path. - * @throws Exception + * @throws Exception if the storage of the picture failed */ private String storePicture(byte[] data) throws Exception @@ -418,6 +426,9 @@ public class OperationSetServerStoredAccountInfoMsnImpl * @param currentDetailValue the detail value we'd like to replace. * @param newDetailValue the value of the detail that we'd like to replace * currentDetailValue with. + * @return true if the operation was a success or false if + * currentDetailValue did not previously exist (in this case an additional + * call to addDetail is required). * @throws ClassCastException if newDetailValue is not an instance of the * same class as currentDetailValue. * @throws OperationFailedException with code Network Failure if putting the @@ -426,7 +437,7 @@ public class OperationSetServerStoredAccountInfoMsnImpl public boolean replaceDetail( ServerStoredDetails.GenericDetail currentDetailValue, ServerStoredDetails.GenericDetail newDetailValue) - throws ClassCastException, OperationFailedException + throws ClassCastException, OperationFailedException { assertConnected(); @@ -442,10 +453,10 @@ public class OperationSetServerStoredAccountInfoMsnImpl } boolean isFound = false; - Iterator iter = getDetails(uin, currentDetailValue.getClass()); + Iterator<GenericDetail> iter = getDetails(uin, currentDetailValue.getClass()); while (iter.hasNext()) { - GenericDetail item = (GenericDetail) iter.next(); + GenericDetail item = iter.next(); if (item.equals(currentDetailValue)) { isFound = true; diff --git a/src/net/java/sip/communicator/impl/protocol/rss/ProtocolProviderFactoryRssImpl.java b/src/net/java/sip/communicator/impl/protocol/rss/ProtocolProviderFactoryRssImpl.java index bde0fcc..cb87c72 100644 --- a/src/net/java/sip/communicator/impl/protocol/rss/ProtocolProviderFactoryRssImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/rss/ProtocolProviderFactoryRssImpl.java @@ -159,7 +159,7 @@ public class ProtocolProviderFactoryRssImpl throws NullPointerException { // TODO Auto-generated method stub - + } /** diff --git a/src/net/java/sip/communicator/impl/protocol/rss/RssFeedReader.java b/src/net/java/sip/communicator/impl/protocol/rss/RssFeedReader.java index 761414d..7f50ae0 100644 --- a/src/net/java/sip/communicator/impl/protocol/rss/RssFeedReader.java +++ b/src/net/java/sip/communicator/impl/protocol/rss/RssFeedReader.java @@ -195,13 +195,13 @@ public class RssFeedReader private String getNewsAbstract(SyndEntry syndEntry) { StringBuffer newsAbstract = new StringBuffer(); - List contents; + List<?> contents; // get item contents contents = syndEntry.getContents(); if (!contents.isEmpty()) { - Iterator it = contents.iterator(); + Iterator<?> it = contents.iterator(); while (it.hasNext()) { newsAbstract.append(((SyndContent)it.next()).getValue()); diff --git a/src/net/java/sip/communicator/impl/protocol/sip/UriHandlerSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/UriHandlerSipImpl.java index 9f633ab..7feff89 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/UriHandlerSipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/UriHandlerSipImpl.java @@ -1,6 +1,6 @@ /* * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. - * + * * Distributable under LGPL license. See terms of license at gnu.org. */ package net.java.sip.communicator.impl.protocol.sip; @@ -19,7 +19,7 @@ import net.java.sip.communicator.util.*; /** * The sip implementation of the URI handler. This class handles sip URIs by * trying to establish a call to them. - * + * * @author Emil Ivov * @author Lubomir Marinov */ @@ -76,9 +76,9 @@ public class UriHandlerSipImpl * Creates an instance of this uri handler, so that it would start handling * URIs by passing them to the providers registered by <tt>protoFactory</tt> * . - * + * * @param protoFactory the provider that created us. - * + * * @throws NullPointerException if <tt>protoFactory</tt> is <tt>null</tt>. */ public UriHandlerSipImpl(ProtocolProviderFactorySipImpl protoFactory) @@ -150,7 +150,7 @@ public class UriHandlerSipImpl /* * (non-Javadoc) - * + * * @see * net.java.sip.communicator.service.protocol.event.AccountManagerListener * #handleAccountManagerEvent @@ -240,7 +240,7 @@ public class UriHandlerSipImpl /** * Returns the protocol that this handler is responsible for or "sip" in * other words. - * + * * @return the "sip" string to indicate that this handler is responsible for * handling "sip" uris. */ @@ -252,7 +252,7 @@ public class UriHandlerSipImpl /** * Parses the specified URI and creates a call with the currently active * telephony operation set. - * + * * @param uri the SIP URI that we have to call. */ public void handleUri(String uri) @@ -297,7 +297,7 @@ public class UriHandlerSipImpl return; } - OperationSetBasicTelephony telephonyOpSet + OperationSetBasicTelephony<?> telephonyOpSet = provider.getOperationSet(OperationSetBasicTelephony.class); try @@ -324,7 +324,7 @@ public class UriHandlerSipImpl /** * Informs the user that they need to be registered before placing calls and * asks them whether they would like us to do it for them. - * + * * @param uri the uri that the user would like us to call after registering. * @param provider the provider that we may have to reregister. */ @@ -351,7 +351,7 @@ public class UriHandlerSipImpl * only register our own uri handling service and thus only handle URIs * while the factory is available as an OSGi service. We remove ourselves * when our factory unregisters its service reference. - * + * * @param event the OSGi <tt>ServiceEvent</tt> */ public void serviceChanged(ServiceEvent event) @@ -384,7 +384,7 @@ public class UriHandlerSipImpl /** * Uses the <tt>UIService</tt> to show an error <tt>message</tt> and log and * <tt>exception</tt>. - * + * * @param message the message that we'd like to show to the user. * @param exc the exception that we'd like to log */ @@ -399,7 +399,7 @@ public class UriHandlerSipImpl * We use this class when launching a provider registration by ourselves in * order to track for provider registration states and retry uri handling, * once the provider is registered. - * + * */ private class ProtocolRegistrationThread extends Thread @@ -416,7 +416,7 @@ public class UriHandlerSipImpl /** * Configures this thread register our parent provider and re-attempt * connection to the specified <tt>uri</tt>. - * + * * @param uri the uri that we need to handle. * @param handlerProvider the provider that we are going to make * register and that we are going to use to handle the @@ -459,7 +459,7 @@ public class UriHandlerSipImpl * registration. It would ignore intermediate states such as * REGISTERING. Disconnection and failure events would simply cause this * listener to remove itself from the list of registration listeners. - * + * * @param evt the <tt>RegistrationStateChangeEvent</tt> that this thread * was initiated with. */ @@ -493,12 +493,12 @@ public class UriHandlerSipImpl * or null if there aren't any. Depending on the implementation this method * may require user intervention so make sure you don't rely on a quick * outcome when calling it. - * + * * @param uri the uri that we'd like to handle with the provider that we are * about to select. - * + * * @return the provider that we should handle URIs through. - * + * * @throws OperationFailedException with code <tt>OPERATION_CANCELED</tt> if * the users. */ @@ -574,7 +574,7 @@ public class UriHandlerSipImpl /** * Returns a human readable <tt>String</tt> representing the provider * encapsulated by this class. - * + * * @return a human readable string representing the provider. */ @Override diff --git a/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultLanguagePackImpl.java b/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultLanguagePackImpl.java index f6f6b83..2c695db 100644 --- a/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultLanguagePackImpl.java +++ b/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultLanguagePackImpl.java @@ -37,7 +37,7 @@ public class DefaultLanguagePackImpl public DefaultLanguagePackImpl() { // Finds all the files *.properties in the path : /resources/languages. - Enumeration fsEnum = DefaultResourcePackActivator.bundleContext.getBundle(). + Enumeration<?> fsEnum = DefaultResourcePackActivator.bundleContext.getBundle(). findEntries("/resources/languages", "*.properties", false); while (fsEnum.hasMoreElements()) diff --git a/src/net/java/sip/communicator/plugin/exampleplugin/PluginDialog.java b/src/net/java/sip/communicator/plugin/exampleplugin/PluginDialog.java index 16fdb01..0dc63f7 100644 --- a/src/net/java/sip/communicator/plugin/exampleplugin/PluginDialog.java +++ b/src/net/java/sip/communicator/plugin/exampleplugin/PluginDialog.java @@ -16,50 +16,50 @@ import net.java.sip.communicator.util.swing.*; /** * A plugin dialog that is open through the right button menu over a contact and * shows the contact name. - * + * * @author Yana Stamcheva */ public class PluginDialog extends SIPCommDialog { private JTextArea infoTextArea = new JTextArea(); - + private JPanel mainPanel = new TransparentPanel(); - + private JLabel contactLabel = new JLabel(); private JLabel nameLabel = new JLabel(); - + /** * Creates an instance of this <tt>PluginDialog</tt> by specifying the * current <tt>MetaContact</tt>. - * + * * @param metaContact the <tt>MetaContact</tt> we're going to treat. */ public PluginDialog(MetaContact metaContact) { this.setTitle("Example plugin"); - + this.infoTextArea.setPreferredSize(new Dimension(250, 70)); - + this.infoTextArea.setText("This is an example plugin that shows the " + "currently selected contact" + " in a separate window."); - + this.nameLabel.setText("The name of the selected contact is:"); this.contactLabel.setText(metaContact.getDisplayName()); - + this.mainPanel.add(infoTextArea); this.mainPanel.add(nameLabel); this.mainPanel.add(contactLabel); - + this.getContentPane().add(mainPanel); - + this.initStyles(); - + this.setResizable(false); this.pack(); } - + /** * Initializes needed layouts, alignments, borders and different text area * style constants. @@ -67,19 +67,19 @@ public class PluginDialog private void initStyles() { this.mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS)); - + this.mainPanel.setBorder( BorderFactory.createEmptyBorder(10, 10, 10, 10)); - + this.infoTextArea.setEditable(false); this.infoTextArea.setOpaque(false); this.infoTextArea.setWrapStyleWord(true); this.infoTextArea.setLineWrap(true); this.infoTextArea.setFont(infoTextArea.getFont().deriveFont(Font.BOLD)); this.infoTextArea.setAlignmentX(JTextArea.CENTER_ALIGNMENT); - + this.nameLabel.setAlignmentX(JLabel.CENTER_ALIGNMENT); - + this.contactLabel.setAlignmentX(JLabel.CENTER_ALIGNMENT); this.contactLabel.setAlignmentY(JLabel.TOP_ALIGNMENT); this.contactLabel.setFont(contactLabel.getFont().deriveFont(Font.BOLD)); diff --git a/src/net/java/sip/communicator/plugin/pluginmanager/PluginTableModel.java b/src/net/java/sip/communicator/plugin/pluginmanager/PluginTableModel.java index 7553d40..2dd8ffd 100644 --- a/src/net/java/sip/communicator/plugin/pluginmanager/PluginTableModel.java +++ b/src/net/java/sip/communicator/plugin/pluginmanager/PluginTableModel.java @@ -14,7 +14,7 @@ import org.osgi.framework.*; /** * The <tt>TableModel</tt> of the table containing all plug-ins. - * + * * @author Yana Stamcheva */ public class PluginTableModel @@ -200,7 +200,7 @@ public class PluginTableModel { for(Bundle b : list) { - Dictionary headers = b.getHeaders(); + Dictionary<?, ?> headers = b.getHeaders(); if(headers.get(Constants.BUNDLE_ACTIVATOR)!=null) { if(!headers.get(Constants.BUNDLE_ACTIVATOR).toString() diff --git a/src/net/java/sip/communicator/plugin/skinmanager/SkinTableModel.java b/src/net/java/sip/communicator/plugin/skinmanager/SkinTableModel.java index 28768fd..4adc140 100644 --- a/src/net/java/sip/communicator/plugin/skinmanager/SkinTableModel.java +++ b/src/net/java/sip/communicator/plugin/skinmanager/SkinTableModel.java @@ -145,7 +145,7 @@ public class SkinTableModel { for (Bundle b : list) { - Dictionary headers = b.getHeaders(); + Dictionary<?, ?> headers = b.getHeaders(); if (headers.get(Constants.BUNDLE_ACTIVATOR) != null) { if (headers.get(Constants.BUNDLE_ACTIVATOR).toString() diff --git a/src/net/java/sip/communicator/plugin/whiteboard/gui/whiteboardshapes/WhiteboardShape.java b/src/net/java/sip/communicator/plugin/whiteboard/gui/whiteboardshapes/WhiteboardShape.java index 16bb791..f933070 100644 --- a/src/net/java/sip/communicator/plugin/whiteboard/gui/whiteboardshapes/WhiteboardShape.java +++ b/src/net/java/sip/communicator/plugin/whiteboard/gui/whiteboardshapes/WhiteboardShape.java @@ -60,7 +60,7 @@ public abstract class WhiteboardShape implements WhiteboardObject { this.id = id; } - + /** * Code when shape is preselected * @param g graphics context @@ -88,21 +88,21 @@ public abstract class WhiteboardShape implements WhiteboardObject g2.setComposite (oldComposite); } - + /** * Code to paint the specific shape * @param g graphics context * @param t 2D affine transform */ public abstract void paintShape (Graphics2D g, AffineTransform t); - + /** * method to test if the shape contains a point * @param p coord point * @return true if shape contains p */ public abstract boolean contains (Point2D p); - + /** * Sets color of the WhiteboardShape (or rather it's border) * @@ -112,7 +112,7 @@ public abstract class WhiteboardShape implements WhiteboardObject { this.color = color; } - + /** * Returns WhiteboardShape's opacity * @@ -122,7 +122,7 @@ public abstract class WhiteboardShape implements WhiteboardObject { return opacity; } - + /** * Sets WhiteboardShape's opacity * @@ -132,7 +132,7 @@ public abstract class WhiteboardShape implements WhiteboardObject { this.opacity = opacity; } - + /** * Returns true if the Shape is selected * @@ -142,7 +142,7 @@ public abstract class WhiteboardShape implements WhiteboardObject { return selected; } - + /** * Sets selected the shape * @@ -155,7 +155,7 @@ public abstract class WhiteboardShape implements WhiteboardObject /** * Sets the point from which a modification could start. - * + * * @param point the point from which a modification could start. */ public void setModifyPoint(WhiteboardPoint point) @@ -165,7 +165,7 @@ public abstract class WhiteboardShape implements WhiteboardObject /** * The last selected for modification point. - * + * * @return the last selected for modification point. */ public WhiteboardPoint getModifyPoint() @@ -182,10 +182,10 @@ public abstract class WhiteboardShape implements WhiteboardObject { drawSelectionPoints (g, t, Color.cyan); } - + /** * Draws selection points when a shape is preselected. - * + * * @param g graphics context * @param t 2D affine transform */ @@ -193,7 +193,7 @@ public abstract class WhiteboardShape implements WhiteboardObject { drawSelectionPoints (g, t, Color.lightGray); } - + /** * Draw all the points on the shape * @@ -205,16 +205,16 @@ public abstract class WhiteboardShape implements WhiteboardObject AffineTransform t, Color color) { - List list = getSelectionPoints (); + List<WhiteboardPoint> list = getSelectionPoints (); WhiteboardPoint point; for (int i = 0; i < list.size (); i++) { - point = (WhiteboardPoint) list.get (i); + point = list.get (i); drawSelectedPoint (g, t, point, color); } } - + /** * Draw a point on the shape * @@ -250,13 +250,13 @@ public abstract class WhiteboardShape implements WhiteboardObject g.dispose(); } } - + /** * Returns the list of selected points * * @return list of selected points */ - public abstract List getSelectionPoints (); + public abstract List<WhiteboardPoint> getSelectionPoints (); /** * Translates the shape * @@ -264,7 +264,7 @@ public abstract class WhiteboardShape implements WhiteboardObject * @param deltaY y coord */ public abstract void translate (double deltaX, double deltaY); - + /** * Translates the shape point at p * @@ -272,7 +272,7 @@ public abstract class WhiteboardShape implements WhiteboardObject * @param deltaY y coord */ public abstract void translateSelectedPoint (double deltaX, double deltaY); - + /** * Returns a String uniquely identifying this WhiteboardShape. * @@ -282,7 +282,7 @@ public abstract class WhiteboardShape implements WhiteboardObject { return this.id; } - + /** * Sets a new identification for this WhiteboardShape * @@ -292,7 +292,7 @@ public abstract class WhiteboardShape implements WhiteboardObject { this.id = id; } - + /** * Returns an integer indicating the thickness (represented as number of * pixels) of this whiteboard shape (or its border). @@ -303,7 +303,7 @@ public abstract class WhiteboardShape implements WhiteboardObject { return this.thickness; } - + /** * Sets the thickness (in pixels) of this whiteboard shape. * @@ -314,7 +314,7 @@ public abstract class WhiteboardShape implements WhiteboardObject { this.thickness = thickness; } - + /** * Returns an integer representing the color of this object. The return * value uses standard RGB encoding: bits 24-31 are alpha, 16-23 are red, @@ -326,7 +326,7 @@ public abstract class WhiteboardShape implements WhiteboardObject { return this.color.getRGB (); } - + /** * Sets the color of this whiteboard shape (or rather it's border). The * color parameter must be encoded with standard RGB encoding: bits 24-31 @@ -339,8 +339,8 @@ public abstract class WhiteboardShape implements WhiteboardObject { this.color = Color.getColor ("",color); } - - + + /** * Indicates whether some other WhiteboardShape is "equal to" this one. * @param obj the reference object with which to compare. @@ -355,17 +355,17 @@ public abstract class WhiteboardShape implements WhiteboardObject if (obj == this || ((WhiteboardShape)obj).getID ().equals ( getID () )) return true; - + return false; } /** * Returns a selection point contained in this <tt>WhiteboardShape</tt>, * which corresponds to the given point (i.e. is in a near radius close * to it). - * + * * @param p point to check * @return the nearest selection point */ public abstract WhiteboardPoint getSelectionPoint (Point2D p); - + }
\ No newline at end of file diff --git a/src/net/java/sip/communicator/service/contactlist/event/MetaContactModifiedEvent.java b/src/net/java/sip/communicator/service/contactlist/event/MetaContactModifiedEvent.java index 91a0757..aa338e2 100644 --- a/src/net/java/sip/communicator/service/contactlist/event/MetaContactModifiedEvent.java +++ b/src/net/java/sip/communicator/service/contactlist/event/MetaContactModifiedEvent.java @@ -19,11 +19,11 @@ public class MetaContactModifiedEvent * Name of the modification. */ private String modificationName; - + /** * Creates an instance of this event using the specified arguments. * @param source the <tt>MetaContact</tt> that this event is about. - * @param modificationName name of the modifiaction + * @param modificationName name of the modification * @param oldValue the new value for the modification of this meta contact. * @param newValue the old value for the modification of this meta contact. */ @@ -35,7 +35,7 @@ public class MetaContactModifiedEvent super(source, META_CONTACT_MODIFIED, oldValue, newValue); this.modificationName = modificationName; } - + /** * Returns the modification name of the source meta contact. * @return the modification name for the meta contact. diff --git a/src/net/java/sip/communicator/service/geolocation/GeolocationService.java b/src/net/java/sip/communicator/service/geolocation/GeolocationService.java index 243a48e..fab7637 100644 --- a/src/net/java/sip/communicator/service/geolocation/GeolocationService.java +++ b/src/net/java/sip/communicator/service/geolocation/GeolocationService.java @@ -25,7 +25,7 @@ public interface GeolocationService * @return the last <tt>Geolocation</tt> that we have set by a geolocation * backend. */ - public Map getCurrentGeolocation(); + public Map<String, String> getCurrentGeolocation(); /** * Registers a listener that would get notifications any time the provider @@ -40,7 +40,8 @@ public interface GeolocationService * Remove a listener that would get notifications any time the provider * geolocation was succesfully refreshed. * - * @param listener + * @param listener the <tt>ProviderGeolocationPresenceListener</tt> to + * remove */ public void removeGeolocationListener(GeolocationListener listener); } diff --git a/src/net/java/sip/communicator/service/keybindings/Persistence.java b/src/net/java/sip/communicator/service/keybindings/Persistence.java index a556eb7..f4990ed 100644 --- a/src/net/java/sip/communicator/service/keybindings/Persistence.java +++ b/src/net/java/sip/communicator/service/keybindings/Persistence.java @@ -18,7 +18,7 @@ import javax.swing.KeyStroke; * text key/value pairs.<br> * PROPERTIES_XML- Persistence provided by java.util.Properties using its XML * format. - * + * * @author Damian Johnson (atagar1@gmail.com) * @version September 21, 2007 */ @@ -31,7 +31,7 @@ public enum Persistence /** * Returns the enum representation of a string. This is case sensitive. - * + * * @param str toString representation of this enum * @return enum associated with a string * @throws IllegalArgumentException if argument is not represented by this @@ -50,7 +50,7 @@ public enum Persistence /** * Attempts to load this type of persistent keystroke map from a given path. * This is unable to parse any null content. - * + * * @param path absolute path to resource to be loaded * @return keybinding map reflecting file contents * @throws IOException if unable to load resource @@ -66,7 +66,7 @@ public enum Persistence /** * Attempts to load this type of persistent keystroke map from a given * stream. This is unable to parse any null content. - * + * * @param input source of keybindings to be parsed * @return keybinding map reflecting file contents * @throws IOException if unable to load resource @@ -96,13 +96,13 @@ public enum Persistence if (this == SERIAL_HASH) { - if (!(instance instanceof HashMap)) + if (!(instance instanceof HashMap<?, ?>)) { throw new ParseException( "Serialized resource doesn't represent a HashMap", 0); } - HashMap mapping = (HashMap) instance; + HashMap<?, ?> mapping = (HashMap<?, ?>)instance; for (Object key : mapping.keySet()) { Object value = mapping.get(key); @@ -218,7 +218,7 @@ public enum Persistence /** * Writes the persistent state of the bindings to an output stream. - * + * * @param output stream where persistent state should be written * @param bindings keybindings to be saved * @throws IOException if unable to save bindings @@ -275,7 +275,7 @@ public enum Persistence /** * Writes the persistent state of the bindings to a file. - * + * * @param path absolute path to where bindings should be saved * @param bindings keybindings to be saved * @throws IOException if unable to save bindings @@ -310,7 +310,7 @@ public enum Persistence * Provides the textual output of what this persistence format would save * given a set of bindings. This silently fails, returning null if unable to * generate output from bindings. - * + * * @param bindings bindings for which to generate saved output * @return string reflecting what would be saved by this persistence format */ @@ -376,7 +376,7 @@ public enum Persistence * underscores and this changes the input to lowercase except the first * letter of each word. For instance, "RARE_CARDS" would become * "Rare Cards". - * + * * @param input string to be converted * @return reader friendly variant of constant name */ diff --git a/src/net/java/sip/communicator/service/protocol/ActiveCallsRepository.java b/src/net/java/sip/communicator/service/protocol/ActiveCallsRepository.java index a8a775d..fc21e25 100644 --- a/src/net/java/sip/communicator/service/protocol/ActiveCallsRepository.java +++ b/src/net/java/sip/communicator/service/protocol/ActiveCallsRepository.java @@ -20,7 +20,7 @@ import net.java.sip.communicator.util.*; * @author Emil Ivov */ public abstract class ActiveCallsRepository<T extends Call, - U extends OperationSetBasicTelephony> + U extends OperationSetBasicTelephony<? extends ProtocolProviderService>> extends CallChangeAdapter { /** diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetWhiteboarding.java b/src/net/java/sip/communicator/service/protocol/OperationSetWhiteboarding.java index 495e58a..3eeb103 100644 --- a/src/net/java/sip/communicator/service/protocol/OperationSetWhiteboarding.java +++ b/src/net/java/sip/communicator/service/protocol/OperationSetWhiteboarding.java @@ -25,15 +25,15 @@ public interface OperationSetWhiteboarding * @return a <tt>List</tt> of the <tt>WhiteboardSession</tt>s where the user * has joined using a given connection. */ - public List getCurrentlyJoinedWhiteboards(); + public List<WhiteboardSession> getCurrentlyJoinedWhiteboards(); /** - * Returns a list of the <tt>WhiteboardSession</tt>s that + * Returns a list of the <tt>WhiteboardSession</tt>s that * <tt>WhiteboardParticipant</tt> has joined and is currently active in. * * @param participant the participant whose current * <tt>WhiteboardSession</tt>s we will be querying. - * @return a list of the <tt>WhiteboardSession</tt>s that + * @return a list of the <tt>WhiteboardSession</tt>s that * <tt>WhiteboardParticipant</tt> has joined and is currently active in. * * @throws OperationFailedException if an error occurs while trying to @@ -41,7 +41,8 @@ public interface OperationSetWhiteboarding * @throws OperationNotSupportedException if the server does not support * white-boarding */ - public List getCurrentlyJoinedWhiteboards(WhiteboardParticipant participant) + public List<WhiteboardSession> getCurrentlyJoinedWhiteboards( + WhiteboardParticipant participant) throws OperationFailedException, OperationNotSupportedException; /** @@ -138,7 +139,7 @@ public interface OperationSetWhiteboarding * white-boards. */ public boolean isWhiteboardingSupportedByContact(Contact contact); - + /** * Adds a listener that will be notified of changes in our participation in * a white-board session such as us being joined, left, dropped. @@ -151,7 +152,7 @@ public interface OperationSetWhiteboarding /** * Removes a listener that was being notified of changes in our * participation in a room such as us being kicked, joined, left. - * + * * @param listener a local user participation listener. */ public void removePresenceListener( diff --git a/src/net/java/sip/communicator/service/protocol/event/GeolocationEvent.java b/src/net/java/sip/communicator/service/protocol/event/GeolocationEvent.java index c8392a2..2db6329 100644 --- a/src/net/java/sip/communicator/service/protocol/event/GeolocationEvent.java +++ b/src/net/java/sip/communicator/service/protocol/event/GeolocationEvent.java @@ -32,7 +32,7 @@ public class GeolocationEvent /** * The new location of the contact that has caused this event. */ - private Map newLocation = null; + private Map<String, String> newLocation = null; /** * Creates an event instance indicating that the specified source contact @@ -45,7 +45,7 @@ public class GeolocationEvent */ public GeolocationEvent(Contact sourceContact, ProtocolProviderService sourceProvider, - Map newLocation, + Map<String, String> newLocation, OperationSetGeolocation geolocationOpSet) { super(geolocationOpSet); @@ -81,7 +81,7 @@ public class GeolocationEvent * @return geolocation stored into a Map indicating the current location * of the source Contact at the moment the event was dispatched. */ - public Map getNewLocation() + public Map<String, String> getNewLocation() { return newLocation; } diff --git a/src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetBasicTelephony.java b/src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetBasicTelephony.java index 6e0d851..b9ee9d0 100644 --- a/src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetBasicTelephony.java +++ b/src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetBasicTelephony.java @@ -148,13 +148,12 @@ public abstract class AbstractOperationSetBasicTelephony * the new <tt>Recorder</tt> for the specified <tt>call</tt> * @see OperationSetBasicTelephony#createRecorder(Call) */ - @SuppressWarnings("rawtypes") public Recorder createRecorder(Call call) throws OperationFailedException { return - (call instanceof MediaAwareCall) - ? ((MediaAwareCall) call).createRecorder() + (call instanceof MediaAwareCall<?, ?, ?>) + ? ((MediaAwareCall<?, ?, ?>) call).createRecorder() : null; } } |