[hibernate-commits] Hibernate SVN: r20992 - entitymanager/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/ejb/packaging.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Fri Nov 18 13:59:19 EST 2011


Author: alessandrolt
Date: 2011-11-18 13:59:19 -0500 (Fri, 18 Nov 2011)
New Revision: 20992

Modified:
   entitymanager/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/ejb/packaging/JarVisitorFactory.java
Log:
JBPAPP-7488 - 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/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/ejb/packaging/JarVisitorFactory.java
===================================================================
--- entitymanager/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/ejb/packaging/JarVisitorFactory.java	2011-11-07 18:26:21 UTC (rev 20991)
+++ entitymanager/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/ejb/packaging/JarVisitorFactory.java	2011-11-18 18:59:19 UTC (rev 20992)
@@ -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