camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1442562 - in /camel/branches/camel-2.10.x: ./ components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiManagementNameStrategy.java
Date Tue, 05 Feb 2013 12:31:05 GMT
Author: davsclaus
Date: Tue Feb  5 12:31:05 2013
New Revision: 1442562

URL: http://svn.apache.org/viewvc?rev=1442562&view=rev
Log:
CAMEL-6038: Fixed potential NPE if symbolic name is null.

Modified:
    camel/branches/camel-2.10.x/   (props changed)
    camel/branches/camel-2.10.x/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiManagementNameStrategy.java

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1442561

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.10.x/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiManagementNameStrategy.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiManagementNameStrategy.java?rev=1442562&r1=1442561&r2=1442562&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiManagementNameStrategy.java
(original)
+++ camel/branches/camel-2.10.x/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiManagementNameStrategy.java
Tue Feb  5 12:31:05 2013
@@ -50,7 +50,12 @@ public class OsgiManagementNameStrategy 
     @Override
     protected String customResolveManagementName(String pattern, String answer) {
         String bundleId = "" + bundleContext.getBundle().getBundleId();
-        String symbolicName = Matcher.quoteReplacement(bundleContext.getBundle().getSymbolicName());
+        String symbolicName = bundleContext.getBundle().getSymbolicName();
+        if (symbolicName != null) {
+            symbolicName = Matcher.quoteReplacement(symbolicName);
+        } else {
+            symbolicName = "";
+        }
         String version = Matcher.quoteReplacement(bundleContext.getBundle().getVersion().toString());
 
         answer = answer.replaceFirst("#bundleId#", bundleId);



Mime
View raw message