harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r421495 - /incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeansTest.java
Date Thu, 13 Jul 2006 04:06:57 GMT
Author: mloenko
Date: Wed Jul 12 21:06:56 2006
New Revision: 421495

URL: http://svn.apache.org/viewvc?rev=421495&view=rev
Log:
fixing test failure on RI

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeansTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeansTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeansTest.java?rev=421495&r1=421494&r2=421495&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeansTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/BeansTest.java
Wed Jul 12 21:06:56 2006
@@ -44,9 +44,9 @@
 
     private final String MOCK_JAVA_BEAN2 = "tests.api.java.beans.mock.MockJavaBean2";
 
-    private final String MOCK_JAVA_BEAN2_FILE = "/binary/java/beans/mock/MockJavaBean2.bin";
+    private final String MOCK_JAVA_BEAN2_FILE = "binary/java/beans/mock/MockJavaBean2.bin";
 
-    private final String MOCK_JAVA_BEAN2_SFILE = "/serialization/java/beans/mock/MockJavaBean2.ser";
+    private final String MOCK_JAVA_BEAN2_SFILE = "serialization/java/beans/mock/MockJavaBean2.ser";
 
     /*
      * public Beans()
@@ -428,8 +428,7 @@
                 // makes sense to get actual file size?
                 byte[] buf = new byte[10000];
 
-                InputStream in = getClass().getResourceAsStream(
-                        MOCK_JAVA_BEAN2_FILE);
+                InputStream in = getResourceAsStream(MOCK_JAVA_BEAN2_FILE);
 
                 int sz = 0;
 
@@ -454,10 +453,11 @@
                 + ".ser";;
 
         protected URL findResource(String name) {
-            if (MOCK_JAVA_BEAN2_SNAME.equals(name)) {
-                name = MOCK_JAVA_BEAN2_SFILE;
+            if (!MOCK_JAVA_BEAN2_SNAME.equals(name)) {
+                return super.findResource(name);
             }
-            return super.getResource(name);
+
+            return getResource(MOCK_JAVA_BEAN2_SFILE);
         }
     }
 }



Mime
View raw message