You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by wo...@apache.org on 2009/09/22 22:26:24 UTC

svn commit: r817821 - /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/AbstractTestCase.java

Author: woodroy
Date: Tue Sep 22 20:26:15 2009
New Revision: 817821

URL: http://svn.apache.org/viewvc?rev=817821&view=rev
Log:
Use FileInputStream to retrieve InputStream rather than classloader

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/AbstractTestCase.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/AbstractTestCase.java?rev=817821&r1=817820&r2=817821&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/AbstractTestCase.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/AbstractTestCase.java Tue Sep 22 20:26:15 2009
@@ -21,6 +21,7 @@
 
 import java.io.BufferedReader;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.net.URL;
@@ -103,9 +104,9 @@
     }
     
     public static String[] getConformanceTestFiles() throws Exception {
-        BufferedReader in = new BufferedReader(new InputStreamReader(
-                AbstractTestCase.class.getClassLoader().getResourceAsStream(
-                        "conformance/filelist")));
+        InputStream is = new FileInputStream("../axiom-api/target/generated-test-resources/conformance/filelist");
+        BufferedReader in = new BufferedReader(new InputStreamReader(is));
+        
         String line;
         List result = new ArrayList(10);
         while ((line = in.readLine()) != null) {



Re: svn commit: r817821 - /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/AbstractTestCase.java

Posted by Andreas Veithen <an...@gmail.com>.
What was the reason for this change?

Andreas

On Tue, Sep 22, 2009 at 22:26,  <wo...@apache.org> wrote:
> Author: woodroy
> Date: Tue Sep 22 20:26:15 2009
> New Revision: 817821
>
> URL: http://svn.apache.org/viewvc?rev=817821&view=rev
> Log:
> Use FileInputStream to retrieve InputStream rather than classloader
>
> Modified:
>    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/AbstractTestCase.java
>
> Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/AbstractTestCase.java
> URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/AbstractTestCase.java?rev=817821&r1=817820&r2=817821&view=diff
> ==============================================================================
> --- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/AbstractTestCase.java (original)
> +++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/AbstractTestCase.java Tue Sep 22 20:26:15 2009
> @@ -21,6 +21,7 @@
>
>  import java.io.BufferedReader;
>  import java.io.File;
> +import java.io.FileInputStream;
>  import java.io.InputStream;
>  import java.io.InputStreamReader;
>  import java.net.URL;
> @@ -103,9 +104,9 @@
>     }
>
>     public static String[] getConformanceTestFiles() throws Exception {
> -        BufferedReader in = new BufferedReader(new InputStreamReader(
> -                AbstractTestCase.class.getClassLoader().getResourceAsStream(
> -                        "conformance/filelist")));
> +        InputStream is = new FileInputStream("../axiom-api/target/generated-test-resources/conformance/filelist");
> +        BufferedReader in = new BufferedReader(new InputStreamReader(is));
> +
>         String line;
>         List result = new ArrayList(10);
>         while ((line = in.readLine()) != null) {
>
>
>