cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1381394 - in /cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension: Extension.java Messages.properties
Date Wed, 05 Sep 2012 21:26:17 GMT
Author: dkulp
Date: Wed Sep  5 21:26:17 2012
New Revision: 1381394

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

........
  r1381386 | dkulp | 2012-09-05 17:20:19 -0400 (Wed, 05 Sep 2012) | 10 lines

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

  ........
    r1381380 | dkulp | 2012-09-05 17:18:10 -0400 (Wed, 05 Sep 2012) | 2 lines

    Cleanup the exception messages a little bit for extension loading issues.

  ........

........

Modified:
    cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java
    cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Messages.properties

Modified: cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java?rev=1381394&r1=1381393&r2=1381394&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java
Wed Sep  5 21:26:17 2012
@@ -22,12 +22,16 @@ package org.apache.cxf.bus.extension;
 import java.lang.reflect.Constructor;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.logging.Logger;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
 
 public class Extension {
-   
+    private static final Logger LOG = LogUtils.getL7dLogger(Extension.class);
+    
     protected String className;
     protected ClassLoader classloader;
     protected Class<?> clazz;
@@ -152,7 +156,7 @@ public class Extension {
                     // using the extension classloader as a fallback
                     clazz = this.getClass().getClassLoader().loadClass(className);
                 } catch (ClassNotFoundException nex) {
-                    throw new ExtensionException(nex);
+                    throw new ExtensionException(new Message("PROBLEM_LOADING_EXTENSION_CLASS",
LOG, name), nex);
                 }
             }
         }
@@ -191,6 +195,8 @@ public class Extension {
                 //ignore
             }
             obj = cls.newInstance();
+        } catch (ExtensionException ex) {
+            throw ex;
         } catch (IllegalAccessException ex) {
             throw new ExtensionException(ex);
         } catch (InstantiationException ex) {

Modified: cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Messages.properties
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Messages.properties?rev=1381394&r1=1381393&r2=1381394&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Messages.properties
(original)
+++ cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Messages.properties
Wed Sep  5 21:26:17 2012
@@ -19,3 +19,4 @@
 #
 #
 DEPRECATED_EXTENSIONS = Loading Bus extensions via {0} (found url {1}) is deprecated.  Use
{2} instead.
+PROBLEM_LOADING_EXTENSION_CLASS = Could not load extension class {0}.
\ No newline at end of file



Mime
View raw message