harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r804431 - /harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ClassLoaderTest.java
Date Sat, 15 Aug 2009 04:15:42 GMT
Author: ndbeyer
Date: Sat Aug 15 04:15:40 2009
New Revision: 804431

URL: http://svn.apache.org/viewvc?rev=804431&view=rev
Log:
use class loader path separator characters, instead of OS file system path separators; resource
loads were failing on windows

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ClassLoaderTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ClassLoaderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ClassLoaderTest.java?rev=804431&r1=804430&r2=804431&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ClassLoaderTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ClassLoaderTest.java
Sat Aug 15 04:15:40 2009
@@ -17,8 +17,6 @@
 
 package org.apache.harmony.luni.tests.java.lang;
 
-import java.io.File;
-import java.io.FileOutputStream;
 import java.io.InputStream;
 import java.security.CodeSource;
 import java.security.Permission;
@@ -26,6 +24,7 @@
 import java.security.Policy;
 import java.security.ProtectionDomain;
 import java.security.SecurityPermission;
+
 import junit.framework.TestCase;
 
 public class ClassLoaderTest extends TestCase {
@@ -259,8 +258,8 @@
     @SuppressWarnings("deprecation")
     public Class<?> define() throws Exception {
         Package p = getClass().getPackage();
-        String path = p == null ? "" : p.getName().replace('.', File.separatorChar)
-                + File.separator;
+        // Class loader paths use '/' character as separator
+        String path = p == null ? "" : p.getName().replace('.', '/') + '/';
         InputStream is = getResourceAsStream(path + "A.class");
         byte[] buf = new byte[512];
         int len = is.read(buf);



Mime
View raw message