[jboss-cvs] JBossAS SVN: r83383 - projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jan 23 17:30:39 EST 2009
Author: alesj
Date: 2009-01-23 17:30:39 -0500 (Fri, 23 Jan 2009)
New Revision: 83383
Modified:
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/AbstractModificationTypeMatcher.java
Log:
[JBDEPLOY-154]; fix how we handle existing ContextInfo.
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/AbstractModificationTypeMatcher.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/AbstractModificationTypeMatcher.java 2009-01-23 21:03:59 UTC (rev 83382)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/AbstractModificationTypeMatcher.java 2009-01-23 22:30:39 UTC (rev 83383)
@@ -21,7 +21,9 @@
*/
package org.jboss.deployers.vfs.plugins.structure.modify;
+import org.jboss.deployers.spi.structure.ContextInfo;
import org.jboss.deployers.spi.structure.ModificationType;
+import org.jboss.deployers.spi.structure.StructureMetaData;
import org.jboss.deployers.vfs.spi.structure.StructureContext;
import org.jboss.logging.Logger;
@@ -42,11 +44,19 @@
boolean result = isModificationDetermined(structureContext);
if (result)
{
- StructureContext context = structureContext;
if (applyModificationToTop && structureContext.isTopLevel() == false)
- context = getTopStructureContext(context);
-
- context.setModificationType(modificationType);
+ {
+ // we need to modify an existing ContextInfo
+ StructureContext topSC = getTopStructureContext(structureContext);
+ StructureMetaData topSMD = topSC.getMetaData();
+ ContextInfo contextInfo = topSMD.getContext("");
+ contextInfo.setModificationType(modificationType);
+ }
+ else
+ {
+ // prepare the info for the actual creation
+ structureContext.setModificationType(modificationType);
+ }
}
return result;
}
More information about the jboss-cvs-commits
mailing list