diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2010-09-23 22:42:07 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2010-09-23 22:42:07 +0000 |
commit | f040cae84a6359a3aa9954afab7bdbf76bd4610b (patch) | |
tree | 473ec30375e1037b28dc18a6d81f1a6a58d6068e /src/net/java | |
parent | 2103e97050aa8888d4e21799614e76beea2c41e6 (diff) | |
download | jitsi-f040cae84a6359a3aa9954afab7bdbf76bd4610b.zip jitsi-f040cae84a6359a3aa9954afab7bdbf76bd4610b.tar.gz jitsi-f040cae84a6359a3aa9954afab7bdbf76bd4610b.tar.bz2 |
Adds javadocs, fixes warnings.
Diffstat (limited to 'src/net/java')
16 files changed, 49 insertions, 74 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/CallPeerMediaHandlerJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/CallPeerMediaHandlerJabberImpl.java index b8ceab5..e03c4ba 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/CallPeerMediaHandlerJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/CallPeerMediaHandlerJabberImpl.java @@ -30,8 +30,8 @@ public class CallPeerMediaHandlerJabberImpl * The <tt>Logger</tt> used by the <tt>CallPeerMediaHandlerJabberImpl</tt> * class and its instances for logging output. */ - private static final Logger logger = Logger - .getLogger(CallPeerMediaHandlerJabberImpl.class.getName()); + private static final Logger logger + = Logger.getLogger(CallPeerMediaHandlerJabberImpl.class); /** * A temporarily single transport manager that we use for generating @@ -111,9 +111,7 @@ public class CallPeerMediaHandlerJabberImpl = JingleUtils.getRtpDescription(content); if(description.getMedia().equals(contentType)) - { return content; - } } return null; } @@ -133,9 +131,7 @@ public class CallPeerMediaHandlerJabberImpl = JingleUtils.getRtpDescription(content); if(description.getMedia().equals(contentType)) - { return content; - } } return null; } @@ -296,7 +292,7 @@ public class CallPeerMediaHandlerJabberImpl if(helloHash != null && helloHash[1].length() > 0) { ZrtpHashPacketExtension hash - = new ZrtpHashPacketExtension(); + = new ZrtpHashPacketExtension(); hash.setVersion(helloHash[0]); hash.setValue(helloHash[1]); @@ -407,7 +403,7 @@ public class CallPeerMediaHandlerJabberImpl * Creates a {@link ContentPacketExtension}s of the streams for a * specific <tt>MediaDevice</tt>. * - * @param type <tt>MediaDevice</tt> + * @param dev <tt>MediaDevice</tt> * @return the {@link ContentPacketExtension}s of stream that this * handler is prepared to initiate. * @throws OperationFailedException if we fail to create the descriptions @@ -464,7 +460,7 @@ public class CallPeerMediaHandlerJabberImpl * prepared to initiate depending on available <tt>MediaDevice</tt>s and * local on-hold and video transmission preferences. * - * @param type <tt>MediaType</tt> of the content + * @param mediaType <tt>MediaType</tt> of the content * @return a {@link List} containing the {@link ContentPacketExtension}s of * streams that this handler is prepared to initiate. * @@ -642,9 +638,7 @@ public class CallPeerMediaHandlerJabberImpl ContentPacketExtension ext = remoteContentMap.get(key); if(ext != null) - { processContent(ext); - } } } @@ -687,9 +681,7 @@ public class CallPeerMediaHandlerJabberImpl ContentPacketExtension content = localContentMap.remove(name); if(content == null) - { return; - } RtpDescriptionPacketExtension description = JingleUtils.getRtpDescription(content); @@ -714,9 +706,7 @@ public class CallPeerMediaHandlerJabberImpl ContentPacketExtension content = remoteContentMap.remove(name); if(content == null) - { return; - } RtpDescriptionPacketExtension description = JingleUtils.getRtpDescription(content); @@ -853,7 +843,6 @@ public class CallPeerMediaHandlerJabberImpl * * @return the transport manager that is handling our address management. */ - @Override public TransportManagerJabberImpl getTransportManager() { return transportManager; @@ -889,13 +878,9 @@ public class CallPeerMediaHandlerJabberImpl { //off hold - make sure that we re-enable sending if that's if(audioStream != null) - { calculatePostHoldDirection(audioStream); - } if(videoStream != null) - { calculatePostHoldDirection(videoStream); - } } } diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java index 61857f5..753830e 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java @@ -509,7 +509,7 @@ public class OperationSetBasicInstantMessagingJabberImpl } else if (evt.getNewState() == RegistrationState.REGISTERED) { - //subscribe for Google (GMail or Google Apps) notifications + //subscribe for Google (Gmail or Google Apps) notifications //for new mail messages. boolean enableGmailNotifications = jabberProvider @@ -893,7 +893,7 @@ public class OperationSetBasicInstantMessagingJabberImpl /** * Subscribes this provider as interested in receiving notifications for - * new mail messages from Google mail services such as GMail or Google Apps. + * new mail messages from Google mail services such as Gmail or Google Apps. */ private void subscribeForGmailNotifications() { @@ -908,14 +908,14 @@ public class OperationSetBasicInstantMessagingJabberImpl { if (logger.isDebugEnabled()) logger.debug(accountIDService - +" does not seem to provide a GMail notification " + +" does not seem to provide a Gmail notification " +" service so we won't be trying to subscribe for it"); return; } if (logger.isDebugEnabled()) logger.debug(accountIDService - +" seems to provide a GMail notification " + +" seems to provide a Gmail notification " +" service so we will try to subscribe for it"); ProviderManager providerManager = ProviderManager.getInstance(); diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailThreadInfo.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailThreadInfo.java index f846d9f..23d71aa 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailThreadInfo.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailThreadInfo.java @@ -601,7 +601,7 @@ public class MailThreadInfo /** * Creates an html description of all participant names in the thread. - * We try to do this in a GMail-like (although quite simplified) way:<br/> + * We try to do this in a Gmail-like (although quite simplified) way:<br/> * We print the whole name for a sole participant. <br/> * We print only the first names for more than one participant. <br/> * We print up to three names max. <br/> diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxQueryIQ.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxQueryIQ.java index 4b6a153..b6a372e 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxQueryIQ.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxQueryIQ.java @@ -11,7 +11,7 @@ import net.java.sip.communicator.util.*; /** * A straightforward <tt>IQ</tt> extension. The <tt>QueryNotify</tt> object is - * used to create queries for the GMail mail server. It creates a simple + * used to create queries for the Gmail mail server. It creates a simple * <tt>IQ</tt> packet which represents the query. * * @author Matthieu Helleringer diff --git a/src/net/java/sip/communicator/launcher/ChangeJVMFrame.java b/src/net/java/sip/communicator/launcher/ChangeJVMFrame.java index daa76fb..e8fa2c1 100644 --- a/src/net/java/sip/communicator/launcher/ChangeJVMFrame.java +++ b/src/net/java/sip/communicator/launcher/ChangeJVMFrame.java @@ -76,19 +76,14 @@ public class ChangeJVMFrame this.javaLinkPane.setContentType("text/html"); this.javaLinkPane.setEditable(false); - if (osName.equals(MAC_OSX)) - this.javaLinkPane.setText(macLink); - else - this.javaLinkPane.setText(defaultLink); + this.javaLinkPane.setText(osName.equals(MAC_OSX) ? macLink : defaultLink); this.javaLinkPane.addHyperlinkListener(new HyperlinkListener() { public void hyperlinkUpdate(HyperlinkEvent e) { if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) - { new BrowserLauncher().openURL(e.getDescription()); - } } }); diff --git a/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistration.java b/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistration.java index b9410a3..9e273fe 100755 --- a/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistration.java +++ b/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistration.java @@ -175,10 +175,10 @@ public class JabberAccountRegistration } /** - * Determines whether SIP Communicator should be querying GMail servers + * Determines whether SIP Communicator should be querying Gmail servers * for unread mail messages. * - * @return <tt>true</tt> if we are to enable GMail notifications and + * @return <tt>true</tt> if we are to enable Gmail notifications and * <tt>false</tt> otherwise. */ public boolean isGmailNotificationEnabled() @@ -229,10 +229,10 @@ public class JabberAccountRegistration } /** - * Specifies whether SIP Communicator should be querying GMail servers + * Specifies whether SIP Communicator should be querying Gmail servers * for unread mail messages. * - * @param enabled <tt>true</tt> if we are to enable GMail notification and + * @param enabled <tt>true</tt> if we are to enable Gmail notification and * <tt>false</tt> otherwise. */ public void setGmailNotificationEnabled(boolean enabled) diff --git a/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java index 1fa12bc..562f4b3 100644 --- a/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java @@ -471,7 +471,7 @@ public class JabberAccountRegistrationWizard } /** - * Opens the GMail signup URI in the OS's default browser. + * Opens the Gmail signup URI in the OS's default browser. */ public void webSignup() { diff --git a/src/net/java/sip/communicator/util/Base64.java b/src/net/java/sip/communicator/util/Base64.java index ccb7c1f..7428503 100644 --- a/src/net/java/sip/communicator/util/Base64.java +++ b/src/net/java/sip/communicator/util/Base64.java @@ -32,7 +32,6 @@ package net.java.sip.communicator.util; import java.io.*; - public class Base64 { private static final Base64Encoder encoder = new Base64Encoder(); diff --git a/src/net/java/sip/communicator/util/GenericBuffer.java b/src/net/java/sip/communicator/util/GenericBuffer.java index 7b00b5e..5a62407 100644 --- a/src/net/java/sip/communicator/util/GenericBuffer.java +++ b/src/net/java/sip/communicator/util/GenericBuffer.java @@ -3,16 +3,15 @@ *
* Distributable under LGPL license. See terms of license at gnu.org.
*/
-
package net.java.sip.communicator.util;
import java.util.*;
/**
* The GenericBuffer class provides a way to minimize the effort needed to
- * bufferize any kind of information. This class is particularly suited to
+ * buffer any kind of information. This class is particularly suited to
* optimizations based on reusing already computed data.
- *
+ *
* @author Benoit Pradelle
*/
public class GenericBuffer<T>
diff --git a/src/net/java/sip/communicator/util/Logger.java b/src/net/java/sip/communicator/util/Logger.java index d04a8f8..1d75beb 100644 --- a/src/net/java/sip/communicator/util/Logger.java +++ b/src/net/java/sip/communicator/util/Logger.java @@ -6,7 +6,6 @@ */ package net.java.sip.communicator.util; -import java.io.*; import java.util.logging.*; /** diff --git a/src/net/java/sip/communicator/util/ScStdOut.java b/src/net/java/sip/communicator/util/ScStdOut.java index 7a4e3bf..bb2cb6d 100644 --- a/src/net/java/sip/communicator/util/ScStdOut.java +++ b/src/net/java/sip/communicator/util/ScStdOut.java @@ -272,6 +272,4 @@ public class ScStdOut extends PrintStream if(stdOutPrintingEnabled) super.println(); } - - } diff --git a/src/net/java/sip/communicator/util/Sha1Crypto.java b/src/net/java/sip/communicator/util/Sha1Crypto.java index bd4042d..841f0ab 100644 --- a/src/net/java/sip/communicator/util/Sha1Crypto.java +++ b/src/net/java/sip/communicator/util/Sha1Crypto.java @@ -1,8 +1,13 @@ +/* + * 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.util; -import java.io.UnsupportedEncodingException; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; +import java.io.*; +import java.security.*; public class Sha1Crypto { diff --git a/src/net/java/sip/communicator/util/UtilActivator.java b/src/net/java/sip/communicator/util/UtilActivator.java index 855d769..81e4143 100644 --- a/src/net/java/sip/communicator/util/UtilActivator.java +++ b/src/net/java/sip/communicator/util/UtilActivator.java @@ -29,6 +29,10 @@ public class UtilActivator implements BundleActivator, Thread.UncaughtExceptionHandler { + /** + * The <tt>Logger</tt> used by the <tt>UtilActivator</tt> class and its + * instances for logging output. + */ private static final Logger logger = Logger.getLogger(UtilActivator.class); @@ -99,14 +103,10 @@ public class UtilActivator { if (configurationService == null) { - ServiceReference serviceReference = - bundleContext.getServiceReference(ConfigurationService.class - .getName()); - - if (serviceReference != null) - configurationService = - (ConfigurationService) bundleContext - .getService(serviceReference); + configurationService + = ServiceUtils.getService( + bundleContext, + ConfigurationService.class); } return configurationService; } @@ -115,14 +115,10 @@ public class UtilActivator { if (keybindingsService == null) { - ServiceReference serviceReference = - bundleContext.getServiceReference(KeybindingsService.class - .getName()); - - if (serviceReference != null) - keybindingsService = - (KeybindingsService) bundleContext - .getService(serviceReference); + keybindingsService + = ServiceUtils.getService( + bundleContext, + KeybindingsService.class); } return keybindingsService; } @@ -135,9 +131,10 @@ public class UtilActivator public static ResourceManagementService getResources() { if (resourceService == null) - resourceService = - ResourceManagementServiceUtils.getService(bundleContext); - + { + resourceService + = ResourceManagementServiceUtils.getService(bundleContext); + } return resourceService; } @@ -154,9 +151,7 @@ public class UtilActivator URL path = getResources().getImageURL(imageID); if (path == null) - { return null; - } try { diff --git a/src/net/java/sip/communicator/util/launchutils/AEGetURLEventHandler.java b/src/net/java/sip/communicator/util/launchutils/AEGetURLEventHandler.java index 470c270..144f202 100644 --- a/src/net/java/sip/communicator/util/launchutils/AEGetURLEventHandler.java +++ b/src/net/java/sip/communicator/util/launchutils/AEGetURLEventHandler.java @@ -4,12 +4,11 @@ * Distributable under LGPL license. * See terms of license at gnu.org. */ - package net.java.sip.communicator.util.launchutils; /** - * Registers as listener for Apple Event GURL. - * And will handle any url comming from the os by passing it to LaunchArgHandler. + * Registers as listener for kAEGetURL AppleScript events. + * And will handle any url coming from the OS by passing it to LaunchArgHandler. * * @author Lubomir Marinov * @author Damian Minkov diff --git a/src/net/java/sip/communicator/util/launchutils/ArgDelegator.java b/src/net/java/sip/communicator/util/launchutils/ArgDelegator.java index 297de89..571f7a9 100644 --- a/src/net/java/sip/communicator/util/launchutils/ArgDelegator.java +++ b/src/net/java/sip/communicator/util/launchutils/ArgDelegator.java @@ -22,6 +22,10 @@ import net.java.sip.communicator.util.*; */ class ArgDelegator { + /** + * The <tt>Logger</tt> used by the <tt>ArgDelegator</tt> class and its + * instances for logging output. + */ private static final Logger logger = Logger.getLogger(ArgDelegator.class); /** @@ -96,9 +100,7 @@ class ArgDelegator synchronized(recordedArgs) { if(uriDelegationPeer != null) - { uriDelegationPeer.handleConcurrentInvocationRequest(); - } } } } diff --git a/src/net/java/sip/communicator/util/skin/Skinnable.java b/src/net/java/sip/communicator/util/skin/Skinnable.java index 9dea614..59a8d1c 100644 --- a/src/net/java/sip/communicator/util/skin/Skinnable.java +++ b/src/net/java/sip/communicator/util/skin/Skinnable.java @@ -4,7 +4,6 @@ * Distributable under LGPL license. * See terms of license at gnu.org. */ - package net.java.sip.communicator.util.skin; /** |