harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r532472 - in /harmony/enhanced/classlib/trunk/modules/luni/src: main/native/luni/shared/luniglob.c test/java/org/apache/harmony/luni/tests/java/lang/SystemTest.java
Date Wed, 25 Apr 2007 20:33:12 GMT
Author: hindessm
Date: Wed Apr 25 13:33:11 2007
New Revision: 532472

URL: http://svn.apache.org/viewvc?view=rev&rev=532472
Log:
Applied patches from "[#HARMONY-3298] [classlib][luni] Extraneous path
separator in *.boot.class.path causes DaCapo ('jython' benchmark) failure".

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/SystemTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c?view=diff&rev=532472&r1=532471&r2=532472
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c Wed
Apr 25 13:33:11 2007
@@ -325,9 +325,10 @@
     /* Commit the full bootstrap class path into the VMI */
     if (bootstrapClassPath)
     {
+        int shift=(bootstrapClassPath[0]==(char)hysysinfo_get_classpathSeparator() ? 1 :
0);
         vmiError rcSetProperty = (*vmInterface)->SetSystemProperty (vmInterface,
             BOOTCLASSPATH_PROPERTY,
-            bootstrapClassPath);
+            bootstrapClassPath + shift);
         if (VMI_ERROR_NONE != rcSetProperty)
         {
             returnCode = JNI_ERR;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/SystemTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/SystemTest.java?view=diff&rev=532472&r1=532471&r2=532472
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/SystemTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/SystemTest.java
Wed Apr 25 13:33:11 2007
@@ -19,6 +19,7 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
+import java.io.File;
 import java.io.InputStream;
 import java.io.PrintStream;
 import java.util.Map;
@@ -186,6 +187,24 @@
 		}
 		assertTrue("Wrong encoding: " + encoding, !is8859_1 || found8859_1);
 	}
+
+    /**
+     * @tests java.lang.System#getProperty(java.lang.String)
+     * Tests that there are no extra path separator in boot class path.
+     * Regression test for HARMONY-3298
+     */
+    public void test_getProperty_bootClassPath() {
+        String bootClassPath = System.getProperty("org.apache.harmony.boot.class.path");
+
+        if (bootClassPath == null) {
+            bootClassPath = System.getProperty("sun.boot.class.path");
+        }
+
+        if (bootClassPath != null
+                && (bootClassPath.indexOf(File.pathSeparator + File.pathSeparator)
>= 0)) {
+            fail("Boot class path contains extra path separator: " + bootClassPath);
+        }
+    }
 
 	/**
 	 * @tests java.lang.System#getProperty(java.lang.String, java.lang.String)



Mime
View raw message