Author: ron.sigal(a)jboss.com
Date: 2008-03-26 00:34:20 -0400 (Wed, 26 Mar 2008)
New Revision: 3768
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/serialization/SerializationStreamFactory.java
Log:
JBREM-934: Put System.getProperty() in AccessController.doPrivileged() call.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/serialization/SerializationStreamFactory.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/serialization/SerializationStreamFactory.java 2008-03-26
04:33:26 UTC (rev 3767)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/serialization/SerializationStreamFactory.java 2008-03-26
04:34:20 UTC (rev 3768)
@@ -28,6 +28,8 @@
import org.jboss.remoting.serialization.impl.jboss.JBossEncryptionSerializationManager;
import java.io.IOException;
+import java.security.AccessController;
+import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
import java.util.Map;
@@ -56,7 +58,21 @@
{
try
{
- String managerClassName = System.getProperty("SERIALIZATION",
JavaSerializationManager.class.getName());
+ String managerClassName = JavaSerializationManager.class.getName();
+ try
+ {
+ managerClassName = (String)AccessController.doPrivileged( new
PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.getProperty("SERIALIZATION",
JavaSerializationManager.class.getName());
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ log.debug("error", e.getCause());
+ }
setManagerClassName(DEFAULT, managerClassName);
}
catch(Exception e)
Show replies by date