cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1213273 - in /cxf/branches/2.4.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java
Date Mon, 12 Dec 2011 15:22:01 GMT
Author: dkulp
Date: Mon Dec 12 15:22:01 2011
New Revision: 1213273

URL: http://svn.apache.org/viewvc?rev=1213273&view=rev
Log:
Merged revisions 1212901 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1212901 | ay | 2011-12-10 17:20:13 -0500 (Sat, 10 Dec 2011) | 1 line
  
  [CXF-3971] SpringBus.getId() may fail to determine the symbolic bundle name
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java?rev=1213273&r1=1213272&r2=1213273&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java
Mon Dec 12 15:22:01 2011
@@ -104,10 +104,11 @@ public class SpringBus extends Extension
     public String getId() {
         if (id == null) {
             try {
-                Class<?> cls = Class.forName("org.osgi.framework.BundleContext");
-                Object o = getExtension(cls);
-                Object o2 = o.getClass().getMethod("getBundle").invoke(o);
-                String s = (String)o2.getClass().getMethod("getSymbolicName").invoke(o2);
+                Class<?> clsbc = Class.forName("org.osgi.framework.BundleContext");
+                Class<?> clsb = Class.forName("org.osgi.framework.Bundle");
+                Object o = getExtension(clsbc);
+                Object o2 = clsbc.getMethod("getBundle").invoke(o);
+                String s = (String)clsb.getMethod("getSymbolicName").invoke(o2);
                 id = s + "-" + DEFAULT_BUS_ID + Integer.toString(this.hashCode());
             } catch (Throwable t) {
                 id = super.getId();



Mime
View raw message