[jboss-cvs] JBossAS SVN: r87133 - in projects/jboss-deployers/trunk: deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Apr 10 11:49:23 EDT 2009
Author: alesj
Date: 2009-04-10 11:49:22 -0400 (Fri, 10 Apr 2009)
New Revision: 87133
Modified:
projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/SynchWrapperModificationChecker.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/AbstractSynchTest.java
Log:
Diff between original and temp attributes.
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/AbstractSynchTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/AbstractSynchTest.java 2009-04-10 15:33:18 UTC (rev 87132)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/AbstractSynchTest.java 2009-04-10 15:49:22 UTC (rev 87133)
@@ -56,8 +56,10 @@
VisitorAttributes attributes = new VisitorAttributes();
attributes.setLeavesOnly(true);
attributes.setRecurseFilter(recurseFilter);
- synch.setAttributes(attributes);
+ synch.setOriginalAttributes(attributes);
+ synch.setTempAttributes(attributes);
+
return synch;
}
Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/SynchWrapperModificationChecker.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/SynchWrapperModificationChecker.java 2009-04-10 15:33:18 UTC (rev 87132)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/SynchWrapperModificationChecker.java 2009-04-10 15:49:22 UTC (rev 87133)
@@ -46,7 +46,8 @@
private SynchAdapter synchAdapter;
/** the visitor attributes */
- private VisitorAttributes attributes;
+ private VisitorAttributes originalAttributes;
+ private VisitorAttributes tempAttributes;
public SynchWrapperModificationChecker(AbstractStructureModificationChecker<Long> delegate, SynchAdapter synchAdapter)
{
@@ -78,11 +79,11 @@
if (modified == false && root != deploymentContext.getRoot())
{
// check for update or delete
- UpdateDeleteVisitor udVisitor = new UpdateDeleteVisitor(attributes, getCache(), synchAdapter, root);
+ UpdateDeleteVisitor udVisitor = new UpdateDeleteVisitor(tempAttributes, getCache(), synchAdapter, root);
VirtualFile tempRoot = deploymentContext.getRoot();
tempRoot.visit(udVisitor);
// check for addition
- AddVisitor addVisitor = new AddVisitor(attributes, getCache(), synchAdapter, tempRoot, root.getPathName().length());
+ AddVisitor addVisitor = new AddVisitor(originalAttributes, getCache(), synchAdapter, tempRoot, root.getPathName().length());
root.visit(addVisitor);
}
return modified;
@@ -99,12 +100,22 @@
}
/**
- * Set visitor attributes.
+ * Set orignal visitor attributes.
*
* @param attributes the attributes
*/
- public void setAttributes(VisitorAttributes attributes)
+ public void setOriginalAttributes(VisitorAttributes attributes)
{
- this.attributes = attributes;
+ this.originalAttributes = attributes;
}
+
+ /**
+ * Set orignal visitor attributes.
+ *
+ * @param attributes the attributes
+ */
+ public void setTempAttributes(VisitorAttributes attributes)
+ {
+ this.tempAttributes = attributes;
+ }
}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list