geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r397890 - /geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/context/impl/XBeanXmlBeanDefinitionParser.java
Date Fri, 28 Apr 2006 13:14:30 GMT
Author: gnodet
Date: Fri Apr 28 06:14:26 2006
New Revision: 397890

URL: http://svn.apache.org/viewcvs?rev=397890&view=rev
Log:
XBEAN-2: XBean should throw exceptions when a namespace can not be mapped or when an element
/ attribute can not be mapped

Modified:
    geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/context/impl/XBeanXmlBeanDefinitionParser.java

Modified: geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/context/impl/XBeanXmlBeanDefinitionParser.java
URL: http://svn.apache.org/viewcvs/geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/context/impl/XBeanXmlBeanDefinitionParser.java?rev=397890&r1=397889&r2=397890&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/context/impl/XBeanXmlBeanDefinitionParser.java
(original)
+++ geronimo/xbean/trunk/xbean-spring/src/main/java/org/apache/xbean/spring/context/impl/XBeanXmlBeanDefinitionParser.java
Fri Apr 28 06:14:26 2006
@@ -142,9 +142,12 @@
                 declareLifecycleMethods(definition, metadata, element);
                 namedConstructorArgs.processParameters(definition, metadata);
                 return definition;
+            } else {
+                throw new BeanDefinitionStoreException("Unrecognized xbean element mapping:
" + localName + " in namespace " + uri);
             }
+        } else {
+            throw new BeanDefinitionStoreException("Unrecognized xbean namespace mapping:
" + uri);
         }
-        return null;
     }
 
     protected void addSpringAttributeValues(String className, Element element) {
@@ -734,7 +737,8 @@
         String uri = element.getNamespaceURI();
         String localName = getLocalName(element);
 
-        if (!isEmpty(uri) || !reservedElementNames.contains(localName)) {
+        if ((!isEmpty(uri) && !(uri.equals(SPRING_SCHEMA) || uri.equals(SPRING_SCHEMA_COMPAT)))
+                || !reservedElementNames.contains(localName)) {
             Object answer = parseBeanFromExtensionElement(element);
             if (answer != null) {
                 return answer;



Mime
View raw message