geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject [39/51] [abbrv] geronimo-yoko git commit: Add extra check for connector helper setting in Connector_impl
Date Sun, 19 Feb 2017 01:49:56 GMT
Add extra check for connector helper setting in Connector_impl


Project: http://git-wip-us.apache.org/repos/asf/geronimo-yoko/repo
Commit: http://git-wip-us.apache.org/repos/asf/geronimo-yoko/commit/f7c60edd
Tree: http://git-wip-us.apache.org/repos/asf/geronimo-yoko/tree/f7c60edd
Diff: http://git-wip-us.apache.org/repos/asf/geronimo-yoko/diff/f7c60edd

Branch: refs/heads/master
Commit: f7c60eddd552e7a8683515bccfa1c5baacd840c8
Parents: 6c4cc03
Author: Neil GM Richards <neil_richards@uk.ibm.com>
Authored: Tue Jun 21 02:48:23 2016 +0100
Committer: Neil GM Richards <neil_richards@uk.ibm.com>
Committed: Tue Jun 21 02:57:17 2016 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/yoko/orb/OCI/IIOP/Connector_impl.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/f7c60edd/yoko-core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Connector_impl.java
----------------------------------------------------------------------
diff --git a/yoko-core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Connector_impl.java b/yoko-core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Connector_impl.java
index e2a737e..b257a22 100644
--- a/yoko-core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Connector_impl.java
+++ b/yoko-core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Connector_impl.java
@@ -459,6 +459,7 @@ final class Connector_impl extends org.omg.CORBA.LocalObject implements
Connecto
     // ------------------------------------------------------------------
 
     private Connector_impl(IOR ior, Policy[] policies, String host, int port, boolean keepAlive,
ConnectCB[] cb, ListenerMap lm, ConnectionHelper helper, ExtendedConnectionHelper xhelper,
Codec codec) {
+        if ((null == helper) && (null == xhelper)) throw new IllegalArgumentException("Both
connection helpers must not be null");
         ior_ = ior;
         policies_ = policies;
         keepAlive_ = keepAlive;
@@ -474,8 +475,8 @@ final class Connector_impl extends org.omg.CORBA.LocalObject implements
Connecto
         this(ior, policies, host, port, keepAlive, cb, lm, helper, null, codec);
     }
 
-    public Connector_impl(IOR ior, Policy[] policies, String host, int port, boolean keepAlive,
ConnectCB[] cb, ListenerMap lm, ExtendedConnectionHelper helper, Codec codec) {
-        this(ior, policies, host, port, keepAlive, cb, lm, null, helper, codec);
+    public Connector_impl(IOR ior, Policy[] policies, String host, int port, boolean keepAlive,
ConnectCB[] cb, ListenerMap lm, ExtendedConnectionHelper xhelper, Codec codec) {
+        this(ior, policies, host, port, keepAlive, cb, lm, null, xhelper, codec);
     }
 
     public void finalize() throws Throwable {


Mime
View raw message