You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2012/01/19 14:25:24 UTC
svn commit: r1233359 - in /cxf/branches/2.5.x-fixes: ./
api/src/main/java/org/apache/cxf/BusFactory.java
Author: sergeyb
Date: Thu Jan 19 13:25:23 2012
New Revision: 1233359
URL: http://svn.apache.org/viewvc?rev=1233359&view=rev
Log:
Merged revisions 1233355 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1233355 | sergeyb | 2012-01-19 13:23:11 +0000 (Thu, 19 Jan 2012) | 1 line
[CXF-4045] Updating BusFactory to catch NoClassDefFoundError with minor refactoring to pass the Checkstyle
........
Modified:
cxf/branches/2.5.x-fixes/ (props changed)
cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java
Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 19 13:25:23 2012
@@ -1 +1 @@
-/cxf/trunk:1233075,1233112,1233289-1233294,1233308
+/cxf/trunk:1233075,1233112,1233289-1233294,1233308,1233355
Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java?rev=1233359&r1=1233358&r2=1233359&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java (original)
+++ cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java Thu Jan 19 13:25:23 2012
@@ -298,25 +298,24 @@ public abstract class BusFactory {
busFactoryCondition = rd.readLine();
rd.close();
}
- if (isValidBusFactoryClass(busFactoryClass)) {
- if (busFactoryCondition != null) {
- try {
- Class<?> cls = ClassLoaderUtils.loadClass(busFactoryClass, BusFactory.class)
- .asSubclass(BusFactory.class);
- int idx = busFactoryCondition.indexOf(',');
- while (idx != -1) {
- cls.getClassLoader().loadClass(busFactoryCondition.substring(0, idx));
- busFactoryCondition = busFactoryCondition.substring(idx + 1);
- idx = busFactoryCondition.indexOf(',');
- }
- cls.getClassLoader().loadClass(busFactoryCondition);
- return busFactoryClass;
- } catch (ClassNotFoundException e) {
- return DEFAULT_BUS_FACTORY;
+ if (isValidBusFactoryClass(busFactoryClass)
+ && busFactoryCondition != null) {
+ try {
+ Class<?> cls = ClassLoaderUtils.loadClass(busFactoryClass, BusFactory.class)
+ .asSubclass(BusFactory.class);
+ int idx = busFactoryCondition.indexOf(',');
+ while (idx != -1) {
+ cls.getClassLoader().loadClass(busFactoryCondition.substring(0, idx));
+ busFactoryCondition = busFactoryCondition.substring(idx + 1);
+ idx = busFactoryCondition.indexOf(',');
}
- } else {
- return busFactoryClass;
+ cls.getClassLoader().loadClass(busFactoryCondition);
+ } catch (ClassNotFoundException e) {
+ busFactoryClass = DEFAULT_BUS_FACTORY;
+ } catch (NoClassDefFoundError e) {
+ busFactoryClass = DEFAULT_BUS_FACTORY;
}
+
}
return busFactoryClass;