You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by to...@apache.org on 2008/03/06 07:36:51 UTC
svn commit: r634177 -
/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/EnvironmentReader.java
Author: tonywu
Date: Wed Mar 5 22:36:51 2008
New Revision: 634177
URL: http://svn.apache.org/viewvc?rev=634177&view=rev
Log:
should get system property through privilege action.
Modified:
harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/EnvironmentReader.java
Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/EnvironmentReader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/EnvironmentReader.java?rev=634177&r1=634176&r2=634177&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/EnvironmentReader.java (original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/EnvironmentReader.java Wed Mar 5 22:36:51 2008
@@ -304,7 +304,12 @@
String resPath = null;
// Construct the full filename of "java.home"/lib/jndi.properties
- resPath = System.getProperty("java.home"); //$NON-NLS-1$
+ resPath = AccessController.doPrivileged(new PrivilegedAction<String>(){
+ public String run() {
+ return System.getProperty("java.home"); //$NON-NLS-1$
+ }
+ });
+
if (!resPath.endsWith(sep)) {
resPath += sep;
}