harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r634177 - /harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/EnvironmentReader.java
Date Thu, 06 Mar 2008 06:36:51 GMT
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;
         }



Mime
View raw message