[hibernate-commits] Hibernate SVN: r20990 - entitymanager/patches/3.4.0.GA_CP04_JBPAPP-7491/src/main/java/org/hibernate/ejb/packaging.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Mon Nov 7 13:21:16 EST 2011


Author: alessandrolt
Date: 2011-11-07 13:21:16 -0500 (Mon, 07 Nov 2011)
New Revision: 20990

Modified:
   entitymanager/patches/3.4.0.GA_CP04_JBPAPP-7491/src/main/java/org/hibernate/ejb/packaging/JarVisitorFactory.java
Log:
JBPAPP-7491 - The method getVisitor(URL jarUrl, Filter[] filters, String entry) does not have conditionals for protocols vfs based, like vfszip or vfsfile. It returns an InputStreamZippedJarVisitor implementation for both protocols. If it is a vfszip, it will work, but will not not for vfsfile. The fix includes vfszip and vfsfile to JarVisitorFactory, so it can return FileZippedJarVisitor (more efficient than InputStreamZippedJarVisitor) for vfszip and ExplodedJarVisitor for vfsfile.

Modified: entitymanager/patches/3.4.0.GA_CP04_JBPAPP-7491/src/main/java/org/hibernate/ejb/packaging/JarVisitorFactory.java
===================================================================
--- entitymanager/patches/3.4.0.GA_CP04_JBPAPP-7491/src/main/java/org/hibernate/ejb/packaging/JarVisitorFactory.java	2011-11-06 20:27:34 UTC (rev 20989)
+++ entitymanager/patches/3.4.0.GA_CP04_JBPAPP-7491/src/main/java/org/hibernate/ejb/packaging/JarVisitorFactory.java	2011-11-07 18:21:16 UTC (rev 20990)
@@ -105,7 +105,7 @@
 		if ( "jar".equals( protocol ) ) {
 			return new JarProtocolVisitor( jarUrl, filters, entry );
 		}
-		else if ( StringHelper.isEmpty( protocol ) || "file".equals( protocol ) ) {
+		else if ( StringHelper.isEmpty( protocol ) || "file".equals( protocol ) || "vfszip".equals( protocol ) || "vfsfile".equals( protocol ) ) {
 			File file;
 			try {
 				final String filePart = jarUrl.getFile();



More information about the hibernate-commits mailing list