aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1659468 - in /aries/trunk/jpa/jpa-blueprint-aries/src: main/java/org/apache/aries/jpa/blueprint/aries/impl/NSHandler.java test/resources/jpa.xml test/resources/jpa_110.xml
Date Fri, 13 Feb 2015 08:53:01 GMT
Author: cschneider
Date: Fri Feb 13 08:53:01 2015
New Revision: 1659468

URL: http://svn.apache.org/r1659468
Log:
Fixed ARIES-1023 modifing namespace expected for map element

Signed-off-by: Christian Schneider <chris@die-schneider.net>

Modified:
    aries/trunk/jpa/jpa-blueprint-aries/src/main/java/org/apache/aries/jpa/blueprint/aries/impl/NSHandler.java
    aries/trunk/jpa/jpa-blueprint-aries/src/test/resources/jpa.xml
    aries/trunk/jpa/jpa-blueprint-aries/src/test/resources/jpa_110.xml

Modified: aries/trunk/jpa/jpa-blueprint-aries/src/main/java/org/apache/aries/jpa/blueprint/aries/impl/NSHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/jpa-blueprint-aries/src/main/java/org/apache/aries/jpa/blueprint/aries/impl/NSHandler.java?rev=1659468&r1=1659467&r2=1659468&view=diff
==============================================================================
--- aries/trunk/jpa/jpa-blueprint-aries/src/main/java/org/apache/aries/jpa/blueprint/aries/impl/NSHandler.java
(original)
+++ aries/trunk/jpa/jpa-blueprint-aries/src/main/java/org/apache/aries/jpa/blueprint/aries/impl/NSHandler.java
Fri Feb 13 08:53:01 2015
@@ -377,7 +377,12 @@ public class NSHandler implements Namesp
     private Map<String, Object> parseJPAProperties(Element element,
             ParserContext context) {
         Map<String, Object> result = new HashMap<String, Object>();
-        NodeList ns = element.getElementsByTagNameNS(BLUEPRINT_NS, TAG_MAP);
+        NodeList ns = null;
+        if(NS_URI_100.equals(element.getNamespaceURI())) {
+            ns = element.getElementsByTagNameNS(NS_URI_100, TAG_MAP);
+        } else {
+            ns = element.getElementsByTagNameNS(NS_URI_110, TAG_MAP);
+        }
         // Use the parser context to parse the map for us
         for (int i = 0; i < ns.getLength(); i++) {
             MapMetadata metadata = context.parseElement(MapMetadata.class,

Modified: aries/trunk/jpa/jpa-blueprint-aries/src/test/resources/jpa.xml
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/jpa-blueprint-aries/src/test/resources/jpa.xml?rev=1659468&r1=1659467&r2=1659468&view=diff
==============================================================================
--- aries/trunk/jpa/jpa-blueprint-aries/src/test/resources/jpa.xml (original)
+++ aries/trunk/jpa/jpa-blueprint-aries/src/test/resources/jpa.xml Fri Feb 13 08:53:01 2015
@@ -36,10 +36,10 @@
   
   <bean id="contextWithProps">
     <jpa:context property="em" type="EXTENDED">
-      <map>
+      <jpa:map>
         <entry key="one" value="eins" />
         <entry key="two" value="zwo" />
-      </map>
+      </jpa:map>
     </jpa:context>
   </bean>
 

Modified: aries/trunk/jpa/jpa-blueprint-aries/src/test/resources/jpa_110.xml
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/jpa-blueprint-aries/src/test/resources/jpa_110.xml?rev=1659468&r1=1659467&r2=1659468&view=diff
==============================================================================
--- aries/trunk/jpa/jpa-blueprint-aries/src/test/resources/jpa_110.xml (original)
+++ aries/trunk/jpa/jpa-blueprint-aries/src/test/resources/jpa_110.xml Fri Feb 13 08:53:01
2015
@@ -36,10 +36,10 @@
   
   <bean id="contextWithProps">
     <jpa:context property="em" type="EXTENDED">
-      <map>
+      <jpa:map>
         <entry key="one" value="eins" />
         <entry key="two" value="zwo" />
-      </map>
+      </jpa:map>
     </jpa:context>
   </bean>
 



Mime
View raw message