[jboss-cvs] JBossAS SVN: r58032 - trunk/server/src/main/org/jboss/metadata/web

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Nov 2 20:11:06 EST 2006


Author: scott.stark at jboss.org
Date: 2006-11-02 20:11:04 -0500 (Thu, 02 Nov 2006)
New Revision: 58032

Modified:
   trunk/server/src/main/org/jboss/metadata/web/JBossWebMetaDataObjectFactory.java
Log:
Throw an IllegalStateException if both the root and metaData are null as its likely a deployer order problem.

Modified: trunk/server/src/main/org/jboss/metadata/web/JBossWebMetaDataObjectFactory.java
===================================================================
--- trunk/server/src/main/org/jboss/metadata/web/JBossWebMetaDataObjectFactory.java	2006-11-02 23:42:39 UTC (rev 58031)
+++ trunk/server/src/main/org/jboss/metadata/web/JBossWebMetaDataObjectFactory.java	2006-11-03 01:11:04 UTC (rev 58032)
@@ -95,6 +95,10 @@
    public Object newRoot(Object root, UnmarshallingContext navigator,
                          String namespaceURI, String localName, Attributes attrs)
    {
+      // If both the root and metaData are null the deployer is likely in the wrong order
+      if( root == null && metaData == null )
+         throw new IllegalStateException("No existing WebMetaData, check the JBossWebAppParsingDeployer order");
+
       return root == null ? metaData : root;
    }
 




More information about the jboss-cvs-commits mailing list