Author: ron.sigal(a)jboss.com
Date: 2008-04-05 02:49:11 -0400 (Sat, 05 Apr 2008)
New Revision: 3905
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/callback/CallbackStore.java
Log:
JBREM-934: Put new FileInputStream() 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-04-05
05:26:02 UTC (rev 3904)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/callback/CallbackStore.java 2008-04-05
06:49:11 UTC (rev 3905)
@@ -360,7 +360,23 @@
// of the list is automatically ordered by the OS and all file names are
numeric by time.
String separator =
SystemUtility.getSystemProperty("file.separator");
objectFilePath = filePath + separator + objectFileList[0];
- inFile = new FileInputStream(objectFilePath);
+
+ try
+ {
+ final String finalObjectFilePath = objectFilePath;
+ inFile = (FileInputStream)AccessController.doPrivileged( new
PrivilegedExceptionAction()
+ {
+ public Object run() throws FileNotFoundException
+ {
+ return new FileInputStream(finalObjectFilePath);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (IOException) e.getCause();
+ }
+
in =
SerializationStreamFactory.getManagerInstance(serializationType).createRegularInput(inFile);
try
Show replies by date