[jboss-cvs] JBossAS SVN: r90105 - projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jun 11 16:38:12 EDT 2009
Author: alesj
Date: 2009-06-11 16:38:12 -0400 (Thu, 11 Jun 2009)
New Revision: 90105
Modified:
projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/MetaDataStructureModificationChecker.java
Log:
Better compatibility check/info.
Javadocs.
Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/MetaDataStructureModificationChecker.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/MetaDataStructureModificationChecker.java 2009-06-11 19:23:46 UTC (rev 90104)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/MetaDataStructureModificationChecker.java 2009-06-11 20:38:12 UTC (rev 90105)
@@ -36,6 +36,14 @@
/**
* MetaDataStructureModificationChecker.
*
+ * VFS and structure cache filter must be compatible,
+ * meaning they would return same value for equal files/paths.
+ *
+ * e.g.
+ * VirtualFile file = VFS.getVirtualFile(rootURI, "/my-app.jar/META-INF/somefile.xml");
+ * String cachedPath = "/my-app.jar/META-INF/somefile.xml";
+ * filter.accepts(file) == cacheFilter.accepts(cachedPath)
+ *
* @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
*/
public class MetaDataStructureModificationChecker extends AbstractStructureModificationChecker<Long>
@@ -79,10 +87,18 @@
*/
public void start()
{
- if (cacheFilter == null && filter instanceof StructureCacheFilter)
+ if (cacheFilter == null)
{
- cacheFilter = (StructureCacheFilter) filter;
+ if (filter instanceof StructureCacheFilter)
+ cacheFilter = (StructureCacheFilter) filter;
+ else
+ log.warn("No cache filter specified, possible non match on leaves.");
}
+ else if (cacheFilter != filter)
+ {
+ // not the same instance
+ log.debug("VFS filter and structure cache filter are not the same instance, possible compatibility issue?");
+ }
}
@Override
More information about the jboss-cvs-commits
mailing list