[jboss-cvs] JBossAS SVN: r72218 - 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 08:08:25 EDT 2008
Author: alex.loubyansky at jboss.com
Date: 2008-04-15 08:08:25 -0400 (Tue, 15 Apr 2008)
New Revision: 72218
Modified:
projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java
Log:
introduce a parse method that takes only the VirtualFile and make the callers that have been passing null as the unit parameter value call it
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 11:56:50 UTC (rev 72217)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java 2008-04-15 12:08:25 UTC (rev 72218)
@@ -196,13 +196,17 @@
if (file == null)
throw new IllegalArgumentException("Null file");
- // the unit maybe null
- if(unit != null)
- {
- VirtualFile altDD = (VirtualFile) unit.getAttachment(getOutput().getName() + ".altDD");
- if(altDD != null)
- file = altDD;
- }
+ VirtualFile altDD = (VirtualFile) unit.getAttachment(getOutput().getName() + ".altDD");
+ if(altDD != null)
+ file = altDD;
+
+ return parse(file);
+ }
+
+ protected T parse(VirtualFile file) throws Exception
+ {
+ if (file == null)
+ throw new IllegalArgumentException("Null file");
log.debug("Parsing file: "+file+" for deploymentType: " + getOutput());
Unmarshaller unmarshaller = factory.newUnmarshaller();
More information about the jboss-cvs-commits
mailing list