[jboss-cvs] JBossAS SVN: r90214 - projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jun 15 16:13:36 EDT 2009


Author: alesj
Date: 2009-06-15 16:13:35 -0400 (Mon, 15 Jun 2009)
New Revision: 90214

Modified:
   projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test/JARCacheUnitTestCase.java
Log:
Close manifest.

Modified: projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test/JARCacheUnitTestCase.java
===================================================================
--- projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test/JARCacheUnitTestCase.java	2009-06-15 20:13:33 UTC (rev 90213)
+++ projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test/JARCacheUnitTestCase.java	2009-06-15 20:13:35 UTC (rev 90214)
@@ -32,6 +32,7 @@
 import junit.framework.Test;
 import org.jboss.virtual.VFS;
 import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.VFSUtils;
 
 /**
  * Test the caching strategy of VFS with jar files.
@@ -75,7 +76,7 @@
       VirtualFile vf = VFS.getVirtualFile(root.toURI().toURL(), "test.jar");
       {
          VirtualFile manifestFile = vf.findChild("META-INF/MANIFEST.MF");
-         Manifest manifest = new Manifest(manifestFile.openStream());
+         Manifest manifest = VFSUtils.readManifest(manifestFile);
          String actual = manifest.getMainAttributes().getValue("test");
          assertEquals("v1", actual);
       }
@@ -104,7 +105,7 @@
       // Verify the manifest the VFS way
       {
          VirtualFile manifestFile = vf.findChild("META-INF/MANIFEST.MF");
-         Manifest manifest = new Manifest(manifestFile.openStream());
+         Manifest manifest = VFSUtils.readManifest(manifestFile);
          String actual = manifest.getMainAttributes().getValue("test");
          assertEquals("VFS found the wrong manifest", "v2", actual);
       }
@@ -113,7 +114,7 @@
       {
          vf = VFS.getVirtualFile(root.toURI().toURL(), "test.jar");
          VirtualFile manifestFile = vf.findChild("META-INF/MANIFEST.MF");
-         Manifest manifest = new Manifest(manifestFile.openStream());
+         Manifest manifest = VFSUtils.readManifest(manifestFile);
          String actual = manifest.getMainAttributes().getValue("test");
          assertEquals("VFS found the wrong manifest", "v2", actual);
       }




More information about the jboss-cvs-commits mailing list