geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsis...@apache.org
Subject svn commit: r407991 - /geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/config/MultiParentClassLoaderTest.java
Date Sat, 20 May 2006 12:32:39 GMT
Author: jsisson
Date: Sat May 20 05:32:39 2006
New Revision: 407991

URL: http://svn.apache.org/viewvc?rev=407991&view=rev
Log:
close inputstreams in test code

Modified:
    geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/config/MultiParentClassLoaderTest.java

Modified: geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/config/MultiParentClassLoaderTest.java
URL: http://svn.apache.org/viewvc/geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/config/MultiParentClassLoaderTest.java?rev=407991&r1=407990&r2=407991&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/config/MultiParentClassLoaderTest.java
(original)
+++ geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/config/MultiParentClassLoaderTest.java
Sat May 20 05:32:39 2006
@@ -77,10 +77,12 @@
             // resource shared by all jars
             InputStream in = urlClassLoader.getResourceAsStream(ENTRY_NAME );
             assertStreamContains("Should have found value from parent " + i, ENTRY_VALUE
+ i, in);
-
+            in.close();
+            
             // resource specific to this jar
             in = urlClassLoader.getResourceAsStream(ENTRY_NAME + i);
             assertStreamContains("Should have found value from parent " + i, ENTRY_VALUE
+ i + ENTRY_VALUE, in);
+            in.close();
         }
     }
 
@@ -189,14 +191,17 @@
     public void testGetResourceAsStream() throws Exception {
         InputStream in = classLoader.getResourceAsStream(ENTRY_NAME + 33);
         assertStreamContains("Should have found value from my file", ENTRY_VALUE + 33 + ENTRY_VALUE,
in);
+        in.close();
 
         for (int i = 0; i < parents.length; i++) {
             in = classLoader.getResourceAsStream(ENTRY_NAME + i);
             assertStreamContains("Should have found value from parent " + i, ENTRY_VALUE
+ i + ENTRY_VALUE, in);
+            in.close();
         }
 
         in = classLoader.getResourceAsStream(ENTRY_NAME);
         assertStreamContains("Should have found value from first parent", ENTRY_VALUE + 0,
in);
+        in.close();
     }
 
     /**



Mime
View raw message