cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1423077 - /cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
Date Mon, 17 Dec 2012 18:13:06 GMT
Author: dkulp
Date: Mon Dec 17 18:13:05 2012
New Revision: 1423077

URL: http://svn.apache.org/viewvc?rev=1423077&view=rev
Log:
Merged revisions 1423071 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes

........
  r1423071 | dkulp | 2012-12-17 13:08:43 -0500 (Mon, 17 Dec 2012) | 10 lines

  Merged revisions 1423065 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/trunk

  ........
    r1423065 | dkulp | 2012-12-17 13:01:36 -0500 (Mon, 17 Dec 2012) | 2 lines

    [CXF-4699] Fix non-dom level 3 issues in BusDefParser

  ........

........

Modified:
    cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java

Modified: cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java?rev=1423077&r1=1423076&r2=1423077&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
Mon Dec 17 18:13:05 2012
@@ -78,9 +78,13 @@ public class BusDefinitionParser extends
             bean.addConstructorArgValue(bus);
         } else if (!"cxf".equals(bus)) {
             bean.getRawBeanDefinition().setBeanClass(SpringBus.class);
-            bean.getRawBeanDefinition().getPropertyValues().removePropertyValue("bus");
             bean.setDestroyMethodName("shutdown");
-            element.setUserData("ID", bus, null);
+            try {
+                element.setUserData("ID", bus, null);
+                bean.getRawBeanDefinition().getPropertyValues().removePropertyValue("bus");
+            } catch (Throwable t) {
+                //likely not DOM level 3, ignore
+            }
         } else {
             addBusWiringAttribute(bean, BusWiringType.PROPERTY, bus, ctx);
             bean.getRawBeanDefinition().setAttribute(WIRE_BUS_CREATE, 
@@ -121,7 +125,12 @@ public class BusDefinitionParser extends
     @Override
     protected String resolveId(Element element, AbstractBeanDefinition definition, 
                                ParserContext ctx) {
-        String bus = (String)element.getUserData("ID");
+        String bus = null;
+        try {
+            bus = (String)element.getUserData("ID");
+        } catch (Throwable t) {
+            //ignore
+        }
         if (bus == null) {
             bus = element.getAttribute("bus");        
             if (StringUtils.isEmpty(bus)) {
@@ -132,7 +141,11 @@ public class BusDefinitionParser extends
             } else {
                 bus = bus + ".config";
             }
-            element.setUserData("ID", bus, null);
+            try {
+                element.setUserData("ID", bus, null);
+            } catch (Throwable t) {
+                //maybe no DOM level 3, ignore, but, may have issues with the counter 
+            }
         }
         return bus;
     }



Mime
View raw message