[jboss-cvs] JBossAS SVN: r72210 - projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Apr 15 06:42:51 EDT 2008


Author: alex.loubyansky at jboss.com
Date: 2008-04-15 06:42:51 -0400 (Tue, 15 Apr 2008)
New Revision: 72210

Modified:
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java
Log:
related to JBDEPLOY-27; unit maybe null

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java	2008-04-15 10:26:03 UTC (rev 72209)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java	2008-04-15 10:42:51 UTC (rev 72210)
@@ -196,10 +196,14 @@
       if (file == null)
          throw new IllegalArgumentException("Null file");
 
-      VirtualFile altDD = (VirtualFile) unit.getAttachment(getOutput().getName() + ".altDD");
-      if(altDD != null)
-         file = altDD;
-
+      // the unit maybe null
+      if(unit != null)
+      {
+         VirtualFile altDD = (VirtualFile) unit.getAttachment(getOutput().getName() + ".altDD");
+         if(altDD != null)
+            file = altDD;
+      }
+      
       log.debug("Parsing file: "+file+" for deploymentType: " + getOutput());
       Unmarshaller unmarshaller = factory.newUnmarshaller();
       unmarshaller.setSchemaValidation(isUseSchemaValidation());




More information about the jboss-cvs-commits mailing list