You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2008/05/22 00:29:38 UTC

svn commit: r658906 - /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/BaseEjbProxyHandler.java

Author: dblevins
Date: Wed May 21 15:29:38 2008
New Revision: 658906

URL: http://svn.apache.org/viewvc?rev=658906&view=rev
Log:
Another small "cleaning" tweak

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/BaseEjbProxyHandler.java

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/BaseEjbProxyHandler.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/BaseEjbProxyHandler.java?rev=658906&r1=658905&r2=658906&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/BaseEjbProxyHandler.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/BaseEjbProxyHandler.java Wed May 21 15:29:38 2008
@@ -245,9 +245,7 @@
             ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
             Thread.currentThread().setContextClassLoader(getDeploymentInfo().getClassLoader());
             try {
-                if (args != null && args.length > 0) {
-                    args = copyArgs(args);
-                }
+                args = copyArgs(args);
                 method = copyMethod(method);
                 interfce = copyObj(interfce);
             } finally {
@@ -255,15 +253,13 @@
                 IntraVmCopyMonitor.post();
             }
 
-        } else if (strategy == COPY) {
+        } else if (strategy == COPY && args != null && args.length > 0) {
 
-            if (args != null && args.length > 0) {
-                IntraVmCopyMonitor.pre(strategy);
-                try {
-                    args = copyArgs(args);
-                } finally {
-                    IntraVmCopyMonitor.post();
-                }
+            IntraVmCopyMonitor.pre(strategy);
+            try {
+                args = copyArgs(args);
+            } finally {
+                IntraVmCopyMonitor.post();
             }
         }
 
@@ -437,6 +433,7 @@
     protected abstract Object _invoke(Object proxy, Class interfce, Method method, Object[] args) throws Throwable;
 
     protected Object[] copyArgs(Object[] objects) throws IOException, ClassNotFoundException {
+        if (objects == null) return objects;
         /* 
             while copying the arguments is necessary. Its not necessary to copy the array itself,
             because they array is created by the Proxy implementation for the sole purpose of