You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by tr...@apache.org on 2007/09/17 01:55:40 UTC

svn commit: r576217 [7/7] - in /mina/trunk: core/src/main/java/org/apache/mina/common/ core/src/main/java/org/apache/mina/filter/codec/ core/src/main/java/org/apache/mina/filter/codec/demux/ core/src/main/java/org/apache/mina/filter/codec/serialization...

Modified: mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/IoFilterMapping.java
URL: http://svn.apache.org/viewvc/mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/IoFilterMapping.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/IoFilterMapping.java (original)
+++ mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/IoFilterMapping.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.integration.spring;
 
@@ -26,7 +26,7 @@
 /**
  * Associates a name with an {@link IoFilter}. This makes it possible to configure
  * named filters using Spring.
- * <p> 
+ * <p>
  * Use this class when you want to configure the
  * filters added to the filter chain of all sessions created from a particular
  * {@link org.apache.mina.common.IoService} created using one of the
@@ -37,14 +37,14 @@
  * This class can also be used when creating {@link Binding} objects. This lets
  * one configure per-port filters. These filters will only be added to the
  * filter chain of sessions for incoming connections on the port specified by
- * the {@link Binding}. Note that {@link Binding} can also be configured to 
+ * the {@link Binding}. Note that {@link Binding} can also be configured to
  * generate filter names automatically. In that case you add the {@link IoFilter}
  * instances directly to the {@link Binding}.
  * </p>
- * 
+ *
  * @author The Apache MINA Project (dev@mina.apache.org)
  * @version $Rev$, $Date$
- * 
+ *
  * @see org.apache.mina.integration.spring.IoAcceptorFactoryBean
  * @see org.apache.mina.integration.spring.Binding
  */
@@ -61,10 +61,10 @@
 
     /**
      * Creates a new instance using the specified name and filter.
-     * 
+     *
      * @param name the name.
      * @param filter the filter.
-     * @throws IllegalArgumentException if any of the arguments are 
+     * @throws IllegalArgumentException if any of the arguments are
      *         <code>null</code>.
      */
     public IoFilterMapping(String name, IoFilter filter) {
@@ -77,7 +77,7 @@
 
     /**
      * Returns the filter of this mapping.
-     * 
+     *
      * @return the filter.
      */
     public IoFilter getFilter() {
@@ -86,7 +86,7 @@
 
     /**
      * Returns the name associated with the filter.
-     * 
+     *
      * @return the name.
      */
     public String getName() {
@@ -95,9 +95,9 @@
 
     /**
      * Sets the filter of this mapping.
-     * 
+     *
      * @param filter the filter.
-     * @throws IllegalArgumentException if the specified value is 
+     * @throws IllegalArgumentException if the specified value is
      *         <code>null</code>.
      */
     public void setFilter(IoFilter filter) {
@@ -107,9 +107,9 @@
 
     /**
      * Sets the name associated with the filter.
-     * 
+     *
      * @param name the name.
-     * @throws IllegalArgumentException if the specified value is 
+     * @throws IllegalArgumentException if the specified value is
      *         <code>null</code>.
      */
     public void setName(String name) {

Modified: mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/ThreadPoolExecutorFactoryBean.java
URL: http://svn.apache.org/viewvc/mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/ThreadPoolExecutorFactoryBean.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/ThreadPoolExecutorFactoryBean.java (original)
+++ mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/ThreadPoolExecutorFactoryBean.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.integration.spring;
 
@@ -35,8 +35,8 @@
  * Spring {@link FactoryBean} which enables the configuration of
  * {@link ThreadPoolExecutor} instances using Spring. Most of this code
  * has been copied from the <code>ThreadPoolTaskExecutor</code> class
- * available in Spring 2.0. 
- * 
+ * available in Spring 2.0.
+ *
  * @author The Apache MINA Project (dev@mina.apache.org)
  * @version $Rev$, $Date$
  */
@@ -81,7 +81,7 @@
      * <p>
      * Any positive value will lead to a LinkedBlockingQueue instance; any other
      * value will lead to a SynchronousQueue instance.
-     * 
+     *
      * @see LinkedBlockingQueue
      * @see SynchronousQueue
      */
@@ -92,24 +92,24 @@
     /**
      * Set the ThreadFactory to use for the ThreadPoolExecutor's thread pool.
      * Default is the ThreadPoolExecutor's default thread factory.
-     * 
+     *
      * @see Executors#defaultThreadFactory()
      */
     public void setThreadFactory(ThreadFactory threadFactory) {
-        this.threadFactory = (threadFactory != null ? threadFactory : Executors
-                .defaultThreadFactory());
+        this.threadFactory = threadFactory != null ? threadFactory : Executors
+                .defaultThreadFactory();
     }
 
     /**
      * Set the RejectedExecutionHandler to use for the ThreadPoolExecutor.
      * Default is the ThreadPoolExecutor's default abort policy.
-     * 
+     *
      * @see ThreadPoolExecutor.AbortPolicy
      */
     public void setRejectedExecutionHandler(
             RejectedExecutionHandler rejectedExecutionHandler) {
-        this.rejectedExecutionHandler = (rejectedExecutionHandler != null ? rejectedExecutionHandler
-                : new ThreadPoolExecutor.AbortPolicy());
+        this.rejectedExecutionHandler = rejectedExecutionHandler != null ? rejectedExecutionHandler
+                : new ThreadPoolExecutor.AbortPolicy();
     }
 
     @Override
@@ -131,6 +131,7 @@
         executor.shutdown();
     }
 
+    @Override
     public Class getObjectType() {
         return ThreadPoolExecutor.class;
     }

Modified: mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/VmPipeAddressEditor.java
URL: http://svn.apache.org/viewvc/mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/VmPipeAddressEditor.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/VmPipeAddressEditor.java (original)
+++ mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/VmPipeAddressEditor.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.integration.spring;
 
@@ -26,18 +26,18 @@
 import org.springframework.util.Assert;
 
 /**
- * Java Bean {@link java.beans.PropertyEditor} which converts Strings into 
+ * Java Bean {@link java.beans.PropertyEditor} which converts Strings into
  * {@link VmPipeAddress} objects. Valid values specify an integer port number
  * optionally prefixed with a ':'. E.g.: <code>:80</code>, <code>22</code>.
  * <p>
  * Use Spring's CustomEditorConfigurer to use this property editor in a Spring
- * configuration file. See chapter 3.14 of the Spring Reference Documentation 
+ * configuration file. See chapter 3.14 of the Spring Reference Documentation
  * for more info.
  * </p>
- * 
+ *
  * @author The Apache MINA Project (dev@mina.apache.org)
  * @version $Revision$, $Date$
- * 
+ *
  * @see org.apache.mina.transport.vmpipe.VmPipeAddress
  */
 public class VmPipeAddressEditor extends PropertyEditorSupport {

Modified: mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/ssl/BogusTrustManagerFactory.java
URL: http://svn.apache.org/viewvc/mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/ssl/BogusTrustManagerFactory.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/ssl/BogusTrustManagerFactory.java (original)
+++ mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/ssl/BogusTrustManagerFactory.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.integration.spring.ssl;
 
@@ -33,7 +33,7 @@
 import javax.net.ssl.X509TrustManager;
 
 /**
- * Bogus {@link javax.net.ssl.TrustManagerFactory} which creates 
+ * Bogus {@link javax.net.ssl.TrustManagerFactory} which creates
  * {@link javax.net.ssl.X509TrustManager} trusting everything.
  *
  * @author The Apache MINA Project (dev@mina.apache.org)

Modified: mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/ssl/KeyStoreFactoryBean.java
URL: http://svn.apache.org/viewvc/mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/ssl/KeyStoreFactoryBean.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/ssl/KeyStoreFactoryBean.java (original)
+++ mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/ssl/KeyStoreFactoryBean.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.integration.spring.ssl;
 
@@ -31,7 +31,7 @@
 import org.springframework.util.Assert;
 
 /**
- * Spring {@link org.springframework.beans.factory.FactoryBean} implementation 
+ * Spring {@link org.springframework.beans.factory.FactoryBean} implementation
  * which makes it possible to configure {@link java.security.KeyStore} instances
  * using Spring.
  *
@@ -52,7 +52,7 @@
     /**
      * Creates a new {@link KeyStore}. This method will be called
      * by the base class when Spring creates a bean using this FactoryBean.
-     * 
+     *
      * @return the {@link KeyStore} instance.
      */
     @Override
@@ -88,6 +88,7 @@
         return ks;
     }
 
+    @Override
     public Class getObjectType() {
         return KeyStore.class;
     }
@@ -95,7 +96,7 @@
     /**
      * Sets the file which contains the key store. Either this
      * property or {@link #setProvider(String)} have to be set.
-     * 
+     *
      * @param file the file to load the key store from.
      */
     public void setFile(File file) {
@@ -105,8 +106,8 @@
     /**
      * Sets the key store password. If this value is <code>null</code> no
      * password will be used to check the integrity of the key store.
-     * 
-     * @param password the password or <code>null</code> if no password is 
+     *
+     * @param password the password or <code>null</code> if no password is
      *        needed.
      */
     public void setPassword(String password) {
@@ -120,7 +121,7 @@
     /**
      * Sets the name of the provider to use when creating the key store. The
      * default is to use the platform default provider.
-     * 
+     *
      * @param provider the name of the provider, e.g. SUN.
      */
     public void setProvider(String provider) {
@@ -130,7 +131,7 @@
     /**
      * Sets a Spring {@link Resource} which contains the key store. Either this
      * property or {@link #setFile(File)} have to be set.
-     * 
+     *
      * @param resource the resource to load the key store from.
      */
     public void setResource(Resource resource) {
@@ -138,11 +139,11 @@
     }
 
     /**
-     * Sets the type of key store to create. The default is to create a 
+     * Sets the type of key store to create. The default is to create a
      * JKS key store.
-     * 
+     *
      * @param type the type to use when creating the key store.
-     * @throws IllegalArgumentException if the specified value is 
+     * @throws IllegalArgumentException if the specified value is
      *         <code>null</code>.
      */
     public void setType(String type) {

Modified: mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/ssl/SSLContextFactoryBean.java
URL: http://svn.apache.org/viewvc/mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/ssl/SSLContextFactoryBean.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/ssl/SSLContextFactoryBean.java (original)
+++ mina/trunk/integration-spring/src/main/java/org/apache/mina/integration/spring/ssl/SSLContextFactoryBean.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.integration.spring.ssl;
 
@@ -24,17 +24,18 @@
 
 import javax.net.ssl.KeyManager;
 import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.ManagerFactoryParameters;
 import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSessionContext;
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.TrustManagerFactory;
-import javax.net.ssl.ManagerFactoryParameters;
 
 import org.springframework.beans.factory.config.AbstractFactoryBean;
 import org.springframework.util.Assert;
 
 /**
- * Spring {@link org.springframework.beans.factory.FactoryBean} implementation 
- * which makes it possible to configure {@link javax.net.ssl.SSLContext} 
+ * Spring {@link org.springframework.beans.factory.FactoryBean} implementation
+ * which makes it possible to configure {@link javax.net.ssl.SSLContext}
  * instances using Spring.
  * <p>
  * If no properties are set the returned {@link javax.net.ssl.SSLContext} will
@@ -178,6 +179,7 @@
         return context;
     }
 
+    @Override
     public Class getObjectType() {
         return SSLContext.class;
     }
@@ -185,9 +187,9 @@
     /**
      * Sets the protocol to use when creating the {@link SSLContext}. The
      * default is <code>TLS</code>.
-     * 
+     *
      * @param protocol the name of the protocol.
-     * @throws IllegalArgumentException if the specified value is 
+     * @throws IllegalArgumentException if the specified value is
      *         <code>null</code>.
      */
     public void setProtocol(String protocol) {
@@ -201,7 +203,7 @@
      * no algorithm has been set using
      * {@link #setKeyManagerFactoryAlgorithm(String)} the default algorithm
      * return by {@link KeyManagerFactory#getDefaultAlgorithm()} will be used.
-     * 
+     *
      * @param useDefault
      *            <code>true</code> or <code>false</code>.
      */
@@ -212,10 +214,10 @@
     /**
      * If this is set to <code>true</code> while no {@link TrustManagerFactory}
      * has been set using {@link #setTrustManagerFactory(TrustManagerFactory)} and
-     * no algorithm has been set using 
+     * no algorithm has been set using
      * {@link #setTrustManagerFactoryAlgorithm(String)} the default algorithm
      * return by {@link TrustManagerFactory#getDefaultAlgorithm()} will be used.
-     * 
+     *
      * @param useDefault <code>true</code> or <code>false</code>.
      */
     public void setTrustManagerFactoryAlgorithmUseDefault(boolean useDefault) {
@@ -226,7 +228,7 @@
      * Sets the {@link KeyManagerFactory} to use. If this is set the properties
      * which are used by this factory bean to create a {@link KeyManagerFactory}
      * will all be ignored.
-     * 
+     *
      * @param factory the factory.
      */
     public void setKeyManagerFactory(KeyManagerFactory factory) {
@@ -234,7 +236,7 @@
     }
 
     /**
-     * Sets the algorithm to use when creating the {@link KeyManagerFactory} 
+     * Sets the algorithm to use when creating the {@link KeyManagerFactory}
      * using {@link KeyManagerFactory#getInstance(java.lang.String)} or
      * {@link KeyManagerFactory#getInstance(java.lang.String, java.lang.String)}.
      * <p>
@@ -242,13 +244,13 @@
      * set directly using {@link #setKeyManagerFactory(KeyManagerFactory)}.
      * </p>
      * <p>
-     * If this property isn't set while no {@link KeyManagerFactory} has been 
-     * set using {@link #setKeyManagerFactory(KeyManagerFactory)} and 
-     * {@link #setKeyManagerFactoryAlgorithmUseDefault(boolean)} has been set to 
-     * <code>true</code> the value returned 
+     * If this property isn't set while no {@link KeyManagerFactory} has been
+     * set using {@link #setKeyManagerFactory(KeyManagerFactory)} and
+     * {@link #setKeyManagerFactoryAlgorithmUseDefault(boolean)} has been set to
+     * <code>true</code> the value returned
      * by {@link KeyManagerFactory#getDefaultAlgorithm()} will be used instead.
-     * </p> 
-     * 
+     * </p>
+     *
      * @param algorithm the algorithm to use.
      */
     public void setKeyManagerFactoryAlgorithm(String algorithm) {
@@ -256,8 +258,8 @@
     }
 
     /**
-     * Sets the provider to use when creating the {@link KeyManagerFactory} 
-     * using 
+     * Sets the provider to use when creating the {@link KeyManagerFactory}
+     * using
      * {@link KeyManagerFactory#getInstance(java.lang.String, java.lang.String)}.
      * <p>
      * This property will be ignored if a {@link KeyManagerFactory} has been
@@ -265,11 +267,11 @@
      * </p>
      * <p>
      * If this property isn't set and no {@link KeyManagerFactory} has been set
-     * using {@link #setKeyManagerFactory(KeyManagerFactory)} 
+     * using {@link #setKeyManagerFactory(KeyManagerFactory)}
      * {@link KeyManagerFactory#getInstance(java.lang.String)} will be used
      * to create the {@link KeyManagerFactory}.
-     * </p> 
-     * 
+     * </p>
+     *
      * @param provider the name of the provider.
      */
     public void setKeyManagerFactoryProvider(String provider) {
@@ -277,10 +279,10 @@
     }
 
     /**
-     * Sets the {@link KeyStore} which will be used in the call to 
+     * Sets the {@link KeyStore} which will be used in the call to
      * {@link KeyManagerFactory#init(java.security.KeyStore, char[])} when
-     * the {@link SSLContext} is created. 
-     * 
+     * the {@link SSLContext} is created.
+     *
      * @param keyStore the key store.
      */
     public void setKeyManagerFactoryKeyStore(KeyStore keyStore) {
@@ -288,10 +290,10 @@
     }
 
     /**
-     * Sets the password which will be used in the call to 
+     * Sets the password which will be used in the call to
      * {@link KeyManagerFactory#init(java.security.KeyStore, char[])} when
-     * the {@link SSLContext} is created. 
-     * 
+     * the {@link SSLContext} is created.
+     *
      * @param password the password. Use <code>null</code> to disable password.
      */
     public void setKeyManagerFactoryKeyStorePassword(String password) {
@@ -306,7 +308,7 @@
      * Sets the {@link TrustManagerFactory} to use. If this is set the
      * properties which are used by this factory bean to create a
      * {@link TrustManagerFactory} will all be ignored.
-     * 
+     *
      * @param factory
      *            the factory.
      */
@@ -315,7 +317,7 @@
     }
 
     /**
-     * Sets the algorithm to use when creating the {@link TrustManagerFactory} 
+     * Sets the algorithm to use when creating the {@link TrustManagerFactory}
      * using {@link TrustManagerFactory#getInstance(java.lang.String)} or
      * {@link TrustManagerFactory#getInstance(java.lang.String, java.lang.String)}.
      * <p>
@@ -323,13 +325,13 @@
      * set directly using {@link #setTrustManagerFactory(TrustManagerFactory)}.
      * </p>
      * <p>
-     * If this property isn't set while no {@link TrustManagerFactory} has been 
-     * set using {@link #setTrustManagerFactory(TrustManagerFactory)} and 
-     * {@link #setTrustManagerFactoryAlgorithmUseDefault(boolean)} has been set to 
-     * <code>true</code> the value returned 
+     * If this property isn't set while no {@link TrustManagerFactory} has been
+     * set using {@link #setTrustManagerFactory(TrustManagerFactory)} and
+     * {@link #setTrustManagerFactoryAlgorithmUseDefault(boolean)} has been set to
+     * <code>true</code> the value returned
      * by {@link TrustManagerFactory#getDefaultAlgorithm()} will be used instead.
-     * </p> 
-     * 
+     * </p>
+     *
      * @param algorithm the algorithm to use.
      */
     public void setTrustManagerFactoryAlgorithm(String algorithm) {
@@ -337,14 +339,14 @@
     }
 
     /**
-     * Sets the {@link KeyStore} which will be used in the call to 
+     * Sets the {@link KeyStore} which will be used in the call to
      * {@link TrustManagerFactory#init(java.security.KeyStore)} when
-     * the {@link SSLContext} is created. 
+     * the {@link SSLContext} is created.
      * <p>
      * This property will be ignored if {@link ManagerFactoryParameters} has been
      * set directly using {@link #setTrustManagerFactoryParameters(ManagerFactoryParameters)}.
      * </p>
-     * 
+     *
      * @param keyStore the key store.
      */
     public void setTrustManagerFactoryKeyStore(KeyStore keyStore) {
@@ -355,7 +357,7 @@
      * Sets the {@link ManagerFactoryParameters} which will be used in the call to
      * {@link TrustManagerFactory#init(javax.net.ssl.ManagerFactoryParameters)} when
      * the {@link SSLContext} is created.
-     *  
+     *
      * @param parameters describing provider-specific trust material.
      */
     public void setTrustManagerFactoryParameters(
@@ -364,8 +366,8 @@
     }
 
     /**
-     * Sets the provider to use when creating the {@link TrustManagerFactory} 
-     * using 
+     * Sets the provider to use when creating the {@link TrustManagerFactory}
+     * using
      * {@link TrustManagerFactory#getInstance(java.lang.String, java.lang.String)}.
      * <p>
      * This property will be ignored if a {@link TrustManagerFactory} has been
@@ -373,11 +375,11 @@
      * </p>
      * <p>
      * If this property isn't set and no {@link TrustManagerFactory} has been set
-     * using {@link #setTrustManagerFactory(TrustManagerFactory)} 
+     * using {@link #setTrustManagerFactory(TrustManagerFactory)}
      * {@link TrustManagerFactory#getInstance(java.lang.String)} will be used
      * to create the {@link TrustManagerFactory}.
-     * </p> 
-     * 
+     * </p>
+     *
      * @param provider the name of the provider.
      */
     public void setTrustManagerFactoryProvider(String provider) {
@@ -385,10 +387,10 @@
     }
 
     /**
-     * Sets the {@link SecureRandom} to use when initializing the 
+     * Sets the {@link SecureRandom} to use when initializing the
      * {@link SSLContext}. The JVM's default will be used if this isn't set.
-     * 
-     * @param secureRandom the {@link SecureRandom} or <code>null</code> if the 
+     *
+     * @param secureRandom the {@link SecureRandom} or <code>null</code> if the
      *        JVM's default should be used.
      * @see SSLContext#init(javax.net.ssl.KeyManager[], javax.net.ssl.TrustManager[], java.security.SecureRandom)
      */

Modified: mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/DefaultIoFilterChainBuilderFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/DefaultIoFilterChainBuilderFactoryBeanTest.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/DefaultIoFilterChainBuilderFactoryBeanTest.java (original)
+++ mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/DefaultIoFilterChainBuilderFactoryBeanTest.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.integration.spring;
 

Modified: mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/InetAddressEditorTest.java
URL: http://svn.apache.org/viewvc/mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/InetAddressEditorTest.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/InetAddressEditorTest.java (original)
+++ mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/InetAddressEditorTest.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.integration.spring;
 
@@ -26,7 +26,7 @@
 
 /**
  * Tests {@link org.apache.mina.integration.spring.InetAddressEditor}.
- * 
+ *
  * @author The Apache MINA Project (dev@mina.apache.org)
  * @version $Rev$, $Date$
  */

Modified: mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/InetSocketAddressEditorTest.java
URL: http://svn.apache.org/viewvc/mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/InetSocketAddressEditorTest.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/InetSocketAddressEditorTest.java (original)
+++ mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/InetSocketAddressEditorTest.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.integration.spring;
 
@@ -25,7 +25,7 @@
 
 /**
  * Tests {@link InetSocketAddressEditor}.
- * 
+ *
  * @author The Apache MINA Project (dev@mina.apache.org)
  * @version $Rev$, $Date$
  */

Modified: mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/IoFilterMappingTest.java
URL: http://svn.apache.org/viewvc/mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/IoFilterMappingTest.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/IoFilterMappingTest.java (original)
+++ mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/IoFilterMappingTest.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.integration.spring;
 
@@ -26,7 +26,7 @@
 
 /**
  * Tests {@link org.apache.mina.integration.spring.IoFilterMapping}.
- * 
+ *
  * @author The Apache MINA Project (dev@mina.apache.org)
  * @version $Rev$, $Date$
  */

Modified: mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/VmPipeAddressEditorTest.java
URL: http://svn.apache.org/viewvc/mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/VmPipeAddressEditorTest.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/VmPipeAddressEditorTest.java (original)
+++ mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/VmPipeAddressEditorTest.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.integration.spring;
 
@@ -25,7 +25,7 @@
 
 /**
  * Tests {@link VmPipeAddressEditor}.
- * 
+ *
  * @author The Apache MINA Project (dev@mina.apache.org)
  * @version $Rev$, $Date$
  */

Modified: mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/ssl/KeyStoreFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/ssl/KeyStoreFactoryBeanTest.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/ssl/KeyStoreFactoryBeanTest.java (original)
+++ mina/trunk/integration-spring/src/test/java/org/apache/mina/integration/spring/ssl/KeyStoreFactoryBeanTest.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.integration.spring.ssl;
 
@@ -37,7 +37,7 @@
  */
 public class KeyStoreFactoryBeanTest extends TestCase {
     public void testCreateInstanceFromResource() throws Exception {
-        // Test using default for now. 
+        // Test using default for now.
         KeyStoreFactoryBean factory = new KeyStoreFactoryBean();
         factory.setResource(new ClassPathResource("keystore.cert", getClass()));
         factory.setPassword("boguspw");
@@ -61,7 +61,7 @@
         in.close();
         out.close();
 
-        // Test using default for now. 
+        // Test using default for now.
         KeyStoreFactoryBean factory = new KeyStoreFactoryBean();
         factory.setFile(file);
         factory.setPassword("boguspw");

Modified: mina/trunk/protocol-http-client/src/main/java/org/apache/mina/protocol/http/client/AsyncHttpClient.java
URL: http://svn.apache.org/viewvc/mina/trunk/protocol-http-client/src/main/java/org/apache/mina/protocol/http/client/AsyncHttpClient.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/protocol-http-client/src/main/java/org/apache/mina/protocol/http/client/AsyncHttpClient.java (original)
+++ mina/trunk/protocol-http-client/src/main/java/org/apache/mina/protocol/http/client/AsyncHttpClient.java Sun Sep 16 16:55:27 2007
@@ -72,7 +72,7 @@
                 port = 443;
             }
         }
-        if (scheme.toLowerCase().equals("http") && (port == -1)) {
+        if (scheme.toLowerCase().equals("http") && port == -1) {
             port = 80;
         }
 

Modified: mina/trunk/protocol-http-client/src/main/java/org/apache/mina/protocol/http/client/SimpleTrustManagerFactory.java
URL: http://svn.apache.org/viewvc/mina/trunk/protocol-http-client/src/main/java/org/apache/mina/protocol/http/client/SimpleTrustManagerFactory.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/protocol-http-client/src/main/java/org/apache/mina/protocol/http/client/SimpleTrustManagerFactory.java (original)
+++ mina/trunk/protocol-http-client/src/main/java/org/apache/mina/protocol/http/client/SimpleTrustManagerFactory.java Sun Sep 16 16:55:27 2007
@@ -52,13 +52,16 @@
 
     public static final TrustManager[] X509_MANAGERS = new TrustManager[] { X509 };
 
+    @Override
     protected void engineInit(KeyStore keyStore) throws KeyStoreException {
     }
 
+    @Override
     protected void engineInit(ManagerFactoryParameters managerFactoryParameters)
             throws InvalidAlgorithmParameterException {
     }
 
+    @Override
     protected TrustManager[] engineGetTrustManagers() {
         return X509_MANAGERS;
     }

Modified: mina/trunk/protocol-http-client/src/test/java/org/apache/mina/protocol/http/client/AbstractTest.java
URL: http://svn.apache.org/viewvc/mina/trunk/protocol-http-client/src/test/java/org/apache/mina/protocol/http/client/AbstractTest.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/protocol-http-client/src/test/java/org/apache/mina/protocol/http/client/AbstractTest.java (original)
+++ mina/trunk/protocol-http-client/src/test/java/org/apache/mina/protocol/http/client/AbstractTest.java Sun Sep 16 16:55:27 2007
@@ -46,6 +46,7 @@
 
     protected Embedded server;
 
+    @Override
     protected void setUp() throws Exception {
         System.out.println("BASEDIR = " + BASEDIR.getAbsolutePath());
         server = new Embedded();
@@ -76,9 +77,11 @@
         server.start();
     }
 
+    @Override
     protected void tearDown() throws Exception {
-        if (server != null)
+        if (server != null) {
             server.stop();
+        }
     }
 
     protected final File getBaseDir() {

Modified: mina/trunk/protocol-http-client/src/test/java/org/apache/mina/protocol/http/client/AsyncHttpClientTest.java
URL: http://svn.apache.org/viewvc/mina/trunk/protocol-http-client/src/test/java/org/apache/mina/protocol/http/client/AsyncHttpClientTest.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/protocol-http-client/src/test/java/org/apache/mina/protocol/http/client/AsyncHttpClientTest.java (original)
+++ mina/trunk/protocol-http-client/src/test/java/org/apache/mina/protocol/http/client/AsyncHttpClientTest.java Sun Sep 16 16:55:27 2007
@@ -26,8 +26,6 @@
 
 import org.apache.mina.filter.codec.http.HttpRequestMessage;
 import org.apache.mina.filter.codec.http.HttpResponseMessage;
-import org.apache.mina.protocol.http.client.AsyncHttpClient;
-import org.apache.mina.protocol.http.client.AsyncHttpClientCallback;
 
 public class AsyncHttpClientTest extends AbstractTest {
 
@@ -135,8 +133,9 @@
         }
 
         if (!testForException) {
-            if (callback.isException())
+            if (callback.isException()) {
                 throw new Exception(callback.getThrowable());
+            }
         }
 
     }

Modified: mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/DefaultSerialSessionConfig.java
URL: http://svn.apache.org/viewvc/mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/DefaultSerialSessionConfig.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/DefaultSerialSessionConfig.java (original)
+++ mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/DefaultSerialSessionConfig.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.transport.serial;
 
@@ -24,7 +24,7 @@
 
 /**
  * The default configuration for a serial session {@link SerialSessionConfig}.
- * 
+ *
  * @author The Apache MINA Project (dev@mina.apache.org)
  * @version $Rev: 529576 $, $Date: 2007-04-17 14:25:07 +0200 (mar., 17 avr. 2007) $
  */
@@ -39,7 +39,8 @@
     public DefaultSerialSessionConfig() {
 
     }
-    
+
+    @Override
     protected void doSetAll(IoSessionConfig config) {
         if (config instanceof SerialSessionConfig) {
             SerialSessionConfig cfg = (SerialSessionConfig) config;

Modified: mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialAddress.java
URL: http://svn.apache.org/viewvc/mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialAddress.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialAddress.java (original)
+++ mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialAddress.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 
 package org.apache.mina.transport.serial;
@@ -110,14 +110,14 @@
 
     /**
      * The name of the device. Can be COM1, COM2, /dev/ttyS0, /dev/ttyUSB1, etc..
-     * @return name 
+     * @return name
      */
     public String getName() {
         return name;
     }
 
     /**
-     * The parity check for this communication. 
+     * The parity check for this communication.
      * @return parity type
      */
     public Parity getParity() {
@@ -135,6 +135,7 @@
     /**
      * Convert this serial address to a human readable string.
      */
+    @Override
     public String toString() {
         return "serial(" + name + ",bauds:" + bauds + ",databits:" + dataBits
                 + ",stopbits:" + stopBits + ",parity:" + parity

Modified: mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialConnector.java
URL: http://svn.apache.org/viewvc/mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialConnector.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialConnector.java (original)
+++ mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialConnector.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.transport.serial;
 
@@ -95,20 +95,24 @@
                         future.setSession(session);
                         return future;
                     } catch (PortInUseException e) {
-                        if (log.isDebugEnabled())
+                        if (log.isDebugEnabled()) {
                             log.debug("Port In Use Exception : ", e);
+                        }
                         return DefaultConnectFuture.newFailedFuture(e);
                     } catch (UnsupportedCommOperationException e) {
-                        if (log.isDebugEnabled())
+                        if (log.isDebugEnabled()) {
                             log.debug("Comm Exception : ", e);
+                        }
                         return DefaultConnectFuture.newFailedFuture(e);
                     } catch (IOException e) {
-                        if (log.isDebugEnabled())
+                        if (log.isDebugEnabled()) {
                             log.debug("IOException : ", e);
+                        }
                         return DefaultConnectFuture.newFailedFuture(e);
                     } catch (TooManyListenersException e) {
-                        if (log.isDebugEnabled())
+                        if (log.isDebugEnabled()) {
                             log.debug("TooManyListenersException : ", e);
+                        }
                         return DefaultConnectFuture.newFailedFuture(e);
                     }
                 }
@@ -134,7 +138,7 @@
         if (connectTimeout > Integer.MAX_VALUE) {
             connectTimeout = Integer.MAX_VALUE;
         }
-        
+
         SerialPort serialPort = (SerialPort) portId.open(
                 user, (int) connectTimeout);
 
@@ -146,15 +150,17 @@
 
         serialPort.notifyOnDataAvailable(true);
 
-        if (config.isLowLantecy())
+        if (config.isLowLantecy()) {
             serialPort.setLowLatency();
+        }
 
         serialPort.setInputBufferSize(config.getInputBufferSize());
 
         if (config.getReceiveThreshold() >= 0) {
             serialPort.enableReceiveThreshold(config.getReceiveThreshold());
-        } else
+        } else {
             serialPort.disableReceiveThreshold();
+        }
 
         return serialPort;
     }

Modified: mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialPortUnavailableException.java
URL: http://svn.apache.org/viewvc/mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialPortUnavailableException.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialPortUnavailableException.java (original)
+++ mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialPortUnavailableException.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.transport.serial;
 

Modified: mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialSessionConfig.java
URL: http://svn.apache.org/viewvc/mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialSessionConfig.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialSessionConfig.java (original)
+++ mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialSessionConfig.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.mina.transport.serial;
 
@@ -31,14 +31,14 @@
 public interface SerialSessionConfig extends IoSessionConfig {
 
     /**
-     * Gets the input buffer size. Note that this method is advisory and the underlying OS 
+     * Gets the input buffer size. Note that this method is advisory and the underlying OS
      * may choose not to report correct values for the buffer size.
      * @return input buffer size in bytes
      */
     int getInputBufferSize();
 
     /**
-     * Sets the input buffer size. Note that this is advisory and memory availability may 
+     * Sets the input buffer size. Note that this is advisory and memory availability may
      * determine the ultimate buffer size used by the driver.
      * @param bufferSize the buffer size in bytes
      */
@@ -51,20 +51,20 @@
     boolean isLowLantecy();
 
     /**
-     * Set the low latency mode, be carefull it's not supported by all the OS/hardware. 
+     * Set the low latency mode, be carefull it's not supported by all the OS/hardware.
      * @param lowLatency
      */
     void setLowLatency(boolean lowLatency);
 
     /**
-     * The current receive threshold (-1 if not enabled). Give the value of the current buffer 
+     * The current receive threshold (-1 if not enabled). Give the value of the current buffer
      * needed for generate a new frame.
      * @return the receive thresold in bytes or -1 if disabled
      */
     int getReceiveThreshold();
 
     /**
-     * Set the receive threshold in byte (set it to -1 for disable). The serial port will try to 
+     * Set the receive threshold in byte (set it to -1 for disable). The serial port will try to
      * provide frame of the given minimal byte count. Be carefull some devices doesn't support it.
      * @param bytes minimal amount of byte before producing a new frame, or -1 if disabled
      */

Modified: mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialSessionImpl.java
URL: http://svn.apache.org/viewvc/mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialSessionImpl.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialSessionImpl.java (original)
+++ mina/trunk/transport-serial/src/main/java/org/apache/mina/transport/serial/SerialSessionImpl.java Sun Sep 16 16:55:27 2007
@@ -109,7 +109,8 @@
     public SerialAddress getRemoteAddress() {
         return address;
     }
-    
+
+    @Override
     public SerialAddress getServiceAddress() {
         return (SerialAddress) super.getServiceAddress();
     }
@@ -140,6 +141,7 @@
     private WriteWorker writeWorker;
 
     private class WriteWorker extends Thread {
+        @Override
         public void run() {
             while (isConnected() && !isClosing()) {
                 flushWrites();
@@ -159,8 +161,9 @@
     private void flushWrites() {
         for (; ;) {
             WriteRequest req = getWriteRequestQueue().peek();
-            if (req == null)
+            if (req == null) {
                 break;
+            }
 
             ByteBuffer buf = (ByteBuffer) req.getMessage();
             if (buf.remaining() == 0) {
@@ -196,8 +199,9 @@
                     } catch (InterruptedException e) {
                         log.error("InterruptedException", e);
                     }
-                    if (isClosing() || !isConnected())
+                    if (isClosing() || !isConnected()) {
                         break;
+                    }
                     int dataSize;
                     try {
                         dataSize = inputStream.available();