[jboss-cvs] JBossAS SVN: r69351 - in projects/vfs/trunk/src: test/java/org/jboss/test/virtual/test and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jan 25 12:09:30 EST 2008
Author: alesj
Date: 2008-01-25 12:09:30 -0500 (Fri, 25 Jan 2008)
New Revision: 69351
Modified:
projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/jar/JarEntryContents.java
projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/jar/NestedJarFromStream.java
projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test/FileVFSUnitTestCase.java
Log:
Handle nested nested createChildHandler.
Modified: projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/jar/JarEntryContents.java
===================================================================
--- projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/jar/JarEntryContents.java 2008-01-25 16:36:57 UTC (rev 69350)
+++ projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/jar/JarEntryContents.java 2008-01-25 17:09:30 UTC (rev 69351)
@@ -140,7 +140,13 @@
public VirtualFileHandler createChildHandler(String name) throws IOException
{
- return findChildHandler(name, true);
+ if (isJar)
+ {
+ initNestedJar();
+ return njar.createChildHandler(name);
+ }
+ else
+ return findChildHandler(name, true);
}
public VirtualFileHandler getChild(String path) throws IOException
Modified: projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/jar/NestedJarFromStream.java
===================================================================
--- projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/jar/NestedJarFromStream.java 2008-01-25 16:36:57 UTC (rev 69350)
+++ projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/jar/NestedJarFromStream.java 2008-01-25 17:09:30 UTC (rev 69351)
@@ -109,6 +109,12 @@
return super.getChild(path);
}
+ public VirtualFileHandler createChildHandler(String name) throws IOException
+ {
+ init();
+ return super.createChildHandler(name);
+ }
+
protected void extraWrapperInfo(ZipEntryWrapper<byte[]> wrapper) throws IOException
{
byte[] contents;
Modified: projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test/FileVFSUnitTestCase.java
===================================================================
--- projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test/FileVFSUnitTestCase.java 2008-01-25 16:36:57 UTC (rev 69350)
+++ projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test/FileVFSUnitTestCase.java 2008-01-25 17:09:30 UTC (rev 69351)
@@ -521,6 +521,23 @@
assertNull(outerJar.getChild("WEB-INF"));
}
+/*
+ public void testNestedNestedParent()
+ throws Exception
+ {
+ URL rootURL = getResource("/vfs/seam/jboss-seam-booking.ear");
+ VFS vfs = VFS.getVFS(rootURL);
+
+ // Find the outer.jar
+ VirtualFile props = vfs.getChild("jboss-seam-booking.war/WEB-INF/lib/jboss-seam-debug.jar/seam.properties");
+ assertNotNull("seam.properties", props);
+ VirtualFile debug = props.getParent();
+ assertNotNull(debug);
+ VirtualFile lib = debug.getParent();
+ assertNotNull(lib);
+ }
+*/
+
/**
* Test file resolution with nested jars
* @throws Exception
More information about the jboss-cvs-commits
mailing list