cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1383519 - in /cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension: Extension.java Messages.properties
Date Tue, 11 Sep 2012 18:38:45 GMT
Author: dkulp
Date: Tue Sep 11 18:38:45 2012
New Revision: 1383519

URL: http://svn.apache.org/viewvc?rev=1383519&view=rev
Log:
Merged revisions 1381621 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1381621 | dkulp | 2012-09-06 10:24:57 -0400 (Thu, 06 Sep 2012) | 2 lines

  Better error messages if extension class can be loaded, but object cannot be instantiated

........

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

Modified: cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java?rev=1383519&r1=1383518&r2=1383519&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java
Tue Sep 11 18:38:45 2012
@@ -185,8 +185,8 @@ public class Extension {
         return clazz;
     }
     public Object load(ClassLoader cl, Bus b) {
+        Class<?> cls = getClassObject(cl);
         try {
-            Class<?> cls = getClassObject(cl);
             if (notFound) {
                 return null;
             }
@@ -223,9 +223,9 @@ public class Extension {
         } catch (ExtensionException ex) {
             throw ex;
         } catch (IllegalAccessException ex) {
-            throw new ExtensionException(ex);
+            throw new ExtensionException(new Message("PROBLEM_CREATING_EXTENSION_CLASS",
LOG, cls.getName()), ex);
         } catch (InstantiationException ex) {
-            throw new ExtensionException(ex);
+            throw new ExtensionException(new Message("PROBLEM_CREATING_EXTENSION_CLASS",
LOG, cls.getName()), ex);
         }
         return obj;
     }

Modified: cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Messages.properties
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Messages.properties?rev=1383519&r1=1383518&r2=1383519&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Messages.properties
(original)
+++ cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/extension/Messages.properties
Tue Sep 11 18:38:45 2012
@@ -19,4 +19,5 @@
 #
 #
 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
+PROBLEM_LOADING_EXTENSION_CLASS = Could not load extension class {0}.
+PROBLEM_CREATING_EXTENSION_CLASS = Could not create object of extension class {0}.
\ No newline at end of file



Mime
View raw message