You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by gn...@apache.org on 2013/07/26 11:56:17 UTC

git commit: Make sure the NIO2 IoService can't be loaded if not on JDK 7 so that SSHD falls back on Mina correctly

Updated Branches:
  refs/heads/master f3444e0c8 -> e405c09a9


Make sure the NIO2 IoService can't be loaded if not on JDK 7 so that SSHD falls back on Mina correctly

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

Branch: refs/heads/master
Commit: e405c09a94ab2ff768ac55e314348b301a2ac5c9
Parents: f3444e0
Author: Guillaume Nodet <gn...@apache.org>
Authored: Fri Jul 26 11:55:47 2013 +0200
Committer: Guillaume Nodet <gn...@apache.org>
Committed: Fri Jul 26 11:55:47 2013 +0200

----------------------------------------------------------------------
 .../org/apache/sshd/common/io/nio2/Nio2ServiceFactory.java    | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/e405c09a/sshd-core/src/main/java/org/apache/sshd/common/io/nio2/Nio2ServiceFactory.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/io/nio2/Nio2ServiceFactory.java b/sshd-core/src/main/java/org/apache/sshd/common/io/nio2/Nio2ServiceFactory.java
index 447b631..8ba03cc 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/io/nio2/Nio2ServiceFactory.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/io/nio2/Nio2ServiceFactory.java
@@ -18,6 +18,8 @@
  */
 package org.apache.sshd.common.io.nio2;
 
+import java.nio.channels.AsynchronousChannel;
+
 import org.apache.sshd.common.FactoryManager;
 import org.apache.sshd.common.io.IoAcceptor;
 import org.apache.sshd.common.io.IoConnector;
@@ -28,6 +30,11 @@ import org.apache.sshd.common.io.IoServiceFactory;
  */
 public class Nio2ServiceFactory implements IoServiceFactory {
 
+    public Nio2ServiceFactory() {
+        // Make sure NIO2 is available
+        Class clazz = AsynchronousChannel.class;
+    }
+
     public IoConnector createConnector(FactoryManager manager, IoHandler handler) {
         return new Nio2Connector(manager, handler);
     }