Repository: mina
Updated Branches:
  refs/heads/2.0 8d5cde67c -> 3d5ac4143


Removed the doSetAll() method, replaced it with a setAll() method that
calls the parent's setAll() method, made the setAll() method not final.

Project: http://git-wip-us.apache.org/repos/asf/mina/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/3d5ac414
Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/3d5ac414
Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/3d5ac414

Branch: refs/heads/2.0
Commit: 3d5ac4143b318676654bd26143c535d996da9fc7
Parents: 8d5cde6
Author: Emmanuel Lécharny <elecha...@symas.com>
Authored: Mon Sep 19 11:42:23 2016 +0200
Committer: Emmanuel Lécharny <elecha...@symas.com>
Committed: Mon Sep 19 11:42:23 2016 +0200

----------------------------------------------------------------------
 .../mina/core/session/AbstractIoSessionConfig.java      | 12 +-----------
 .../java/org/apache/mina/core/session/DummySession.java |  8 --------
 .../transport/socket/AbstractDatagramSessionConfig.java |  7 ++++++-
 .../transport/socket/AbstractSocketSessionConfig.java   |  7 ++++++-
 .../transport/vmpipe/DefaultVmPipeSessionConfig.java    |  5 -----
 .../transport/serial/DefaultSerialSessionConfig.java    |  4 +++-
 6 files changed, 16 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina/blob/3d5ac414/mina-core/src/main/java/org/apache/mina/core/session/AbstractIoSessionConfig.java
----------------------------------------------------------------------
diff --git 
a/mina-core/src/main/java/org/apache/mina/core/session/AbstractIoSessionConfig.java
 
b/mina-core/src/main/java/org/apache/mina/core/session/AbstractIoSessionConfig.java
index 200dbfe..2a6a887 100644
--- 
a/mina-core/src/main/java/org/apache/mina/core/session/AbstractIoSessionConfig.java
+++ 
b/mina-core/src/main/java/org/apache/mina/core/session/AbstractIoSessionConfig.java
@@ -62,7 +62,7 @@ public abstract class AbstractIoSessionConfig implements 
IoSessionConfig {
      * {@inheritDoc}
      */
     @Override
-    public final void setAll(IoSessionConfig config) {
+    public void setAll(IoSessionConfig config) {
         if (config == null) {
             throw new IllegalArgumentException("config");
         }
@@ -76,19 +76,9 @@ public abstract class AbstractIoSessionConfig implements 
IoSessionConfig {
         setWriteTimeout(config.getWriteTimeout());
         setUseReadOperation(config.isUseReadOperation());
         
setThroughputCalculationInterval(config.getThroughputCalculationInterval());
-
-        doSetAll(config);
     }
 
     /**
-     * Implement this method to set all transport-specific configuration
-     * properties retrieved from the specified <tt>config</tt>.
-     * 
-     * @param config the {@link IoSessionConfig} to set
-     */
-    protected abstract void doSetAll(IoSessionConfig config);
-
-    /**
      * {@inheritDoc}
      */
     @Override

http://git-wip-us.apache.org/repos/asf/mina/blob/3d5ac414/mina-core/src/main/java/org/apache/mina/core/session/DummySession.java
----------------------------------------------------------------------
diff --git 
a/mina-core/src/main/java/org/apache/mina/core/session/DummySession.java 
b/mina-core/src/main/java/org/apache/mina/core/session/DummySession.java
index 0b2d409..3b842f1 100644
--- a/mina-core/src/main/java/org/apache/mina/core/session/DummySession.java
+++ b/mina-core/src/main/java/org/apache/mina/core/session/DummySession.java
@@ -68,10 +68,6 @@ public class DummySession extends AbstractIoSession {
     private volatile IoService service;
 
     private volatile IoSessionConfig config = new AbstractIoSessionConfig() {
-        @Override
-        protected void doSetAll(IoSessionConfig config) {
-            // Do nothing
-        }
     };
 
     private final IoFilterChain filterChain = new DefaultIoFilterChain(this);
@@ -94,10 +90,6 @@ public class DummySession extends AbstractIoSession {
 
         // Initialize dummy service.
                 new AbstractIoAcceptor(new AbstractIoSessionConfig() {
-                    @Override
-                    protected void doSetAll(IoSessionConfig config) {
-                        // Do nothing
-                    }
                 }, new Executor() {
                     public void execute(Runnable command) {
                         // Do nothing

http://git-wip-us.apache.org/repos/asf/mina/blob/3d5ac414/mina-core/src/main/java/org/apache/mina/transport/socket/AbstractDatagramSessionConfig.java
----------------------------------------------------------------------
diff --git 
a/mina-core/src/main/java/org/apache/mina/transport/socket/AbstractDatagramSessionConfig.java
 
b/mina-core/src/main/java/org/apache/mina/transport/socket/AbstractDatagramSessionConfig.java
index 0ed3b70..67daf74 100644
--- 
a/mina-core/src/main/java/org/apache/mina/transport/socket/AbstractDatagramSessionConfig.java
+++ 
b/mina-core/src/main/java/org/apache/mina/transport/socket/AbstractDatagramSessionConfig.java
@@ -31,8 +31,13 @@ public abstract class AbstractDatagramSessionConfig extends 
AbstractIoSessionCon
     /** Tells if we should close the session if the port is unreachable. 
Default to true */
     private boolean closeOnPortUnreachable = true;
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
-    protected void doSetAll(IoSessionConfig config) {
+    public void setAll(IoSessionConfig config) {
+        super.setAll(config);
+        
         if (!(config instanceof DatagramSessionConfig)) {
             return;
         }

http://git-wip-us.apache.org/repos/asf/mina/blob/3d5ac414/mina-core/src/main/java/org/apache/mina/transport/socket/AbstractSocketSessionConfig.java
----------------------------------------------------------------------
diff --git 
a/mina-core/src/main/java/org/apache/mina/transport/socket/AbstractSocketSessionConfig.java
 
b/mina-core/src/main/java/org/apache/mina/transport/socket/AbstractSocketSessionConfig.java
index 6443e17..fcfc96f 100644
--- 
a/mina-core/src/main/java/org/apache/mina/transport/socket/AbstractSocketSessionConfig.java
+++ 
b/mina-core/src/main/java/org/apache/mina/transport/socket/AbstractSocketSessionConfig.java
@@ -28,8 +28,13 @@ import org.apache.mina.core.session.IoSessionConfig;
  * @author <a href="http://mina.apache.org";>Apache MINA Project</a>
  */
 public abstract class AbstractSocketSessionConfig extends 
AbstractIoSessionConfig implements SocketSessionConfig {
+    /**
+     * {@inheritDoc}
+     */
     @Override
-    protected final void doSetAll(IoSessionConfig config) {
+    public void setAll(IoSessionConfig config) {
+        super.setAll(config);
+        
         if (!(config instanceof SocketSessionConfig)) {
             return;
         }

http://git-wip-us.apache.org/repos/asf/mina/blob/3d5ac414/mina-core/src/main/java/org/apache/mina/transport/vmpipe/DefaultVmPipeSessionConfig.java
----------------------------------------------------------------------
diff --git 
a/mina-core/src/main/java/org/apache/mina/transport/vmpipe/DefaultVmPipeSessionConfig.java
 
b/mina-core/src/main/java/org/apache/mina/transport/vmpipe/DefaultVmPipeSessionConfig.java
index 949797c..3ff382a 100644
--- 
a/mina-core/src/main/java/org/apache/mina/transport/vmpipe/DefaultVmPipeSessionConfig.java
+++ 
b/mina-core/src/main/java/org/apache/mina/transport/vmpipe/DefaultVmPipeSessionConfig.java
@@ -31,9 +31,4 @@ class DefaultVmPipeSessionConfig extends 
AbstractIoSessionConfig implements VmPi
     DefaultVmPipeSessionConfig() {
         // Do nothing
     }
-
-    @Override
-    protected void doSetAll(IoSessionConfig config) {
-        // Do nothing
-    }
 }

http://git-wip-us.apache.org/repos/asf/mina/blob/3d5ac414/mina-transport-serial/src/main/java/org/apache/mina/transport/serial/DefaultSerialSessionConfig.java
----------------------------------------------------------------------
diff --git 
a/mina-transport-serial/src/main/java/org/apache/mina/transport/serial/DefaultSerialSessionConfig.java
 
b/mina-transport-serial/src/main/java/org/apache/mina/transport/serial/DefaultSerialSessionConfig.java
index fb7dbaa..09e2f3b 100644
--- 
a/mina-transport-serial/src/main/java/org/apache/mina/transport/serial/DefaultSerialSessionConfig.java
+++ 
b/mina-transport-serial/src/main/java/org/apache/mina/transport/serial/DefaultSerialSessionConfig.java
@@ -45,7 +45,9 @@ class DefaultSerialSessionConfig extends 
AbstractIoSessionConfig implements Seri
      * {@inheritDoc}
      */
     @Override
-    protected void doSetAll(IoSessionConfig config) {
+    public void setAll(IoSessionConfig config) {
+        super.setAll(config);
+        
         if (config instanceof SerialSessionConfig) {
             SerialSessionConfig cfg = (SerialSessionConfig) config;
             setInputBufferSize(cfg.getInputBufferSize());

Reply via email to