[seam-commits] Seam SVN: r7980 - trunk/src/main/org/jboss/seam/init.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Apr 18 14:54:01 EDT 2008


Author: norman.richards at jboss.com
Date: 2008-04-18 14:54:01 -0400 (Fri, 18 Apr 2008)
New Revision: 7980

Modified:
   trunk/src/main/org/jboss/seam/init/Initialization.java
Log:
JBSEAM-2775

Modified: trunk/src/main/org/jboss/seam/init/Initialization.java
===================================================================
--- trunk/src/main/org/jboss/seam/init/Initialization.java	2008-04-18 16:51:55 UTC (rev 7979)
+++ trunk/src/main/org/jboss/seam/init/Initialization.java	2008-04-18 18:54:01 UTC (rev 7980)
@@ -213,8 +213,10 @@
 	   for (Element elem : (List<Element>) rootElement.elements()) {
 		   String ns = elem.getNamespace().getURI();
 		   NamespaceDescriptor nsInfo = resolveNamespace(ns);
-		   if (nsInfo == null && !ns.equals(COMPONENT_NAMESPACE)) {
-			   log.warn("namespace declared in components.xml does not resolve to a package: " + ns);
+		   if (nsInfo == null) {
+			   if (!ns.equals(COMPONENT_NAMESPACE)) {
+			       log.warn("namespace declared in components.xml does not resolve to a package: " + ns);
+			   }
 		   } else {
 			   String name = elem.attributeValue("name");
 			   String elemName = toCamelCase(elem.getName(), true);
@@ -263,14 +265,14 @@
 				   name = Strings.isEmpty(prefix) ? 
 						   componentName : prefix + '.' + componentName;
 			   }
-
+   
 			   installComponentFromXmlElement(elem, name, className, replacements);
 		   }
 	   }
    }
 
 	private NamespaceDescriptor resolveNamespace(String namespace) {
-		if (Strings.isEmpty(namespace)) {
+		if (Strings.isEmpty(namespace) || namespace.equals(COMPONENT_NAMESPACE)) {
 			return null;
 		}
 		
@@ -358,7 +360,7 @@
    @SuppressWarnings("unchecked")
    private void installComponentFromXmlElement(Element component, String name, String className,
             Properties replacements) throws ClassNotFoundException
-   {
+   {  
       String installText = component.attributeValue("installed");
       boolean installed = false;
       if (installText == null || "true".equals(replace(installText, replacements)))
@@ -473,6 +475,7 @@
    private void addComponentDescriptor(ComponentDescriptor descriptor)
    {
       String name = descriptor.getName();
+      
       Set<ComponentDescriptor> set = componentDescriptors.get(name);
       if (set==null)
       {




More information about the seam-commits mailing list