[jboss-remoting-commits] JBoss Remoting SVN: r3764 - remoting2/branches/2.x/src/main/org/jboss/remoting/callback.
jboss-remoting-commits at lists.jboss.org
jboss-remoting-commits at lists.jboss.org
Wed Mar 26 00:30:01 EDT 2008
Author: ron.sigal at jboss.com
Date: 2008-03-26 00:30:00 -0400 (Wed, 26 Mar 2008)
New Revision: 3764
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/callback/CallbackStore.java
Log:
JBREM-934: Put System.getProperty() in AccessController.doPrivileged() call.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/callback/CallbackStore.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/callback/CallbackStore.java 2008-03-26 04:28:53 UTC (rev 3763)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/callback/CallbackStore.java 2008-03-26 04:30:00 UTC (rev 3764)
@@ -24,10 +24,6 @@
import org.jboss.logging.Logger;
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.serialization.SerializationStreamFactory;
-import org.jboss.remoting.transport.rmi.RMIServerInvoker;
-import org.jboss.util.propertyeditor.PropertyEditors;
-
-import java.beans.IntrospectionException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
@@ -122,7 +118,21 @@
// need to figure the best place to store on disk
if (filePath == null)
{
- filePath = System.getProperty("jboss.server.data.dir", "data");
+ try
+ {
+ filePath = (String)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.getProperty("jboss.server.data.dir", "data");
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ log.debug("error", e.getCause());
+ filePath = "data";
+ }
}
File storeFile = new File(filePath);
if (!storeFile.exists())
More information about the jboss-remoting-commits
mailing list