[jboss-remoting-commits] JBoss Remoting SVN: r3893 - remoting2/branches/2.x/src/main/org/jboss/remoting/ident.
jboss-remoting-commits at lists.jboss.org
jboss-remoting-commits at lists.jboss.org
Fri Apr 4 18:27:34 EDT 2008
Author: ron.sigal at jboss.com
Date: 2008-04-04 18:27:34 -0400 (Fri, 04 Apr 2008)
New Revision: 3893
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/ident/Identity.java
Log:
JBREM-934: Uses SystemUtility.mkdirs().
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/ident/Identity.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/ident/Identity.java 2008-04-04 22:25:37 UTC (rev 3892)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/ident/Identity.java 2008-04-04 22:27:34 UTC (rev 3893)
@@ -296,13 +296,13 @@
try
{
- dir = (File)AccessController.doPrivileged( new PrivilegedExceptionAction()
- {
- public Object run() throws Exception
- {
- return server.getAttribute(obj, "ServerDataDir");
- }
- });
+ dir = (File)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return server.getAttribute(obj, "ServerDataDir");
+ }
+ });
}
catch (PrivilegedActionException e)
{
@@ -313,15 +313,7 @@
{
if(fileExists(dir) == false)
{
- final File finalDir = dir;
- AccessController.doPrivileged( new PrivilegedAction()
- {
- public Object run()
- {
- finalDir.mkdirs();
- return null;
- }
- });
+ SystemUtility.mkdirs(dir);
}
file = new File(dir, "jboss.identity");
}
@@ -351,27 +343,19 @@
final File dir = new File(fl);
if(fileExists(dir) == false)
{
- AccessController.doPrivileged( new PrivilegedAction()
- {
- public Object run()
- {
- dir.mkdirs();
- return null;
- }
- });
-
+ SystemUtility.mkdirs(dir);
}
file = new File(dir, "jboss.identity");
}
final File finalFile = file;
boolean canRead = ((Boolean)AccessController.doPrivileged( new PrivilegedAction()
- {
- public Object run()
- {
- return new Boolean(finalFile.canRead());
- }
- })).booleanValue();
+ {
+ public Object run()
+ {
+ return new Boolean(finalFile.canRead());
+ }
+ })).booleanValue();
if(fileExists(file) && canRead)
More information about the jboss-remoting-commits
mailing list