Author: tolusha
Date: 2010-06-15 04:25:16 -0400 (Tue, 15 Jun 2010)
New Revision: 2591
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializer.java
Log:
EXOJCR-756: fix DBInitializer
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializer.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializer.java 2010-06-15
08:15:24 UTC (rev 2590)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializer.java 2010-06-15
08:25:16 UTC (rev 2591)
@@ -109,18 +109,25 @@
return readScriptResource(scriptPath);
}
- protected String readScriptResource(String path) throws IOException
+ protected String readScriptResource(final String path) throws IOException
{
- final InputStream is = this.getClass().getResourceAsStream(path);
+ PrivilegedAction<InputStream> action = new
PrivilegedAction<InputStream>()
+ {
+ public InputStream run()
+ {
+ return this.getClass().getResourceAsStream(path);
+ }
+ };
+ final InputStream is = AccessController.doPrivileged(action);
- PrivilegedAction<InputStreamReader> action = new
PrivilegedAction<InputStreamReader>()
+ PrivilegedAction<InputStreamReader> action_ = new
PrivilegedAction<InputStreamReader>()
{
public InputStreamReader run()
{
return new InputStreamReader(is);
}
};
- InputStreamReader isr = AccessController.doPrivileged(action);
+ InputStreamReader isr = AccessController.doPrivileged(action_);
try
{
Show replies by date