[jboss-remoting-commits] JBoss Remoting SVN: r3720 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Fri Mar 21 01:21:34 EDT 2008


Author: ron.sigal at jboss.com
Date: 2008-03-21 01:21:33 -0400 (Fri, 21 Mar 2008)
New Revision: 3720

Modified:
   remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi/RMIServerInvoker.java
Log:
JBREM-934: Created final variable finalRegistry in initRMI.

Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi/RMIServerInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi/RMIServerInvoker.java	2008-03-21 05:19:35 UTC (rev 3719)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi/RMIServerInvoker.java	2008-03-21 05:21:33 UTC (rev 3720)
@@ -192,7 +192,7 @@
    
    protected void initRMI(Home bindHome, Home connectHome) throws IOException
    {
-      final Registry registry = null;
+      Registry registry = null;
       try
       {
          registry = getRegistry();
@@ -202,6 +202,7 @@
          throw new IOException(e.getMessage());
       }
 
+      final Registry finalRegistry = registry;
       String bindHost = bindHome.host;
       final int bindPort = bindHome.port;
       String clientConnectHost = connectHome.host;
@@ -224,7 +225,7 @@
          {
             public Object run() throws AccessException, RemoteException
             {
-               registry.rebind("remoting/RMIServerInvoker/" + bindPort, RMIServerInvoker.this);
+               finalRegistry.rebind("remoting/RMIServerInvoker/" + bindPort, RMIServerInvoker.this);
                return null;
             }
          });




More information about the jboss-remoting-commits mailing list