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

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Fri Apr 11 20:51:33 EDT 2008


Author: ron.sigal at jboss.com
Date: 2008-04-11 20:51:33 -0400 (Fri, 11 Apr 2008)
New Revision: 3929

Modified:
   remoting2/branches/2.x/src/main/org/jboss/remoting/InvokerLocator.java
Log:
JBREM-934: Replaced AccessController.doPrivileged() with SecurityUtility.getSystemProperty().

Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/InvokerLocator.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/InvokerLocator.java	2008-04-12 00:49:56 UTC (rev 3928)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/InvokerLocator.java	2008-04-12 00:51:33 UTC (rev 3929)
@@ -42,7 +42,7 @@
 import org.jboss.logging.Logger;
 import org.jboss.remoting.serialization.SerializationStreamFactory;
 import org.jboss.remoting.transport.ClientInvoker;
-import org.jboss.remoting.util.SystemUtility;
+import org.jboss.remoting.util.SecurityUtility;
 
 /**
  * InvokerLocator is an object that indentifies a specific Invoker on the network, via a unique
@@ -315,7 +315,7 @@
       }
       else 
       {
-         String s = SystemUtility.getSystemProperty(LEGACY_PARSING);
+         String s = SecurityUtility.getSystemProperty(LEGACY_PARSING);
          doLegacyParsing = "true".equalsIgnoreCase(s);
       }
 
@@ -457,30 +457,14 @@
       }
       else if(host.indexOf("0.0.0.0") != -1)
       {
-         String bindAddress = null;
-         try
-         {
-            bindAddress = (String) AccessController.doPrivileged( new PrivilegedExceptionAction()
-            {
-               public Object run() throws Exception
-               {
-                  return System.getProperty(SERVER_BIND_ADDRESS, "0.0.0.0");
-               }
-            });
-         }
-         catch (PrivilegedActionException e)
-         {
-            log.debug("error", e.getCause());
-            return "0.0.0.0";
-         }
-         
+         String bindAddress = SecurityUtility.getSystemProperty(SERVER_BIND_ADDRESS, "0.0.0.0");         
          if(bindAddress.equals("0.0.0.0"))
          {
             host = fixRemoteAddress(host);
          }
          else
          {
-            host = host.replaceAll("0\\.0\\.0\\.0", SystemUtility.getSystemProperty(SERVER_BIND_ADDRESS));
+            host = host.replaceAll("0\\.0\\.0\\.0", SecurityUtility.getSystemProperty(SERVER_BIND_ADDRESS));
          }
       }
       return host;




More information about the jboss-remoting-commits mailing list