harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r530813 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/Environment.java
Date Fri, 20 Apr 2007 13:59:59 GMT
Author: apetrenko
Date: Fri Apr 20 06:59:58 2007
New Revision: 530813

URL: http://svn.apache.org/viewvc?view=rev&rev=530813
Log:
Patch for HARMONY-2453 "[classlib][luni] Environment provides inconsistent map on Windows"

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/Environment.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/Environment.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/Environment.java?view=diff&rev=530813&r1=530812&r2=530813
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/Environment.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/Environment.java
Fri Apr 20 06:59:58 2007
@@ -42,7 +42,9 @@
             }
             String[] envStrings = new String(bytes).split("\0");
             for (int i = 0; i < envStrings.length; i++) {
-                int separator = envStrings[i].indexOf("=");
+                // some "hidden" variable names on Windows start with "="
+                // so we search "=" from the second character
+                int separator = envStrings[i].indexOf("=", 1);
                 newEnvMap.put(envStrings[i].substring(0, separator),
                         envStrings[i].substring(separator + 1));
             }



Mime
View raw message