You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/08/05 09:42:30 UTC

[2/2] camel git commit: CAMEL-9048: Fixed CS

CAMEL-9048: Fixed CS

Conflicts:
	camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b087f164
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b087f164
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b087f164

Branch: refs/heads/camel-2.15.x
Commit: b087f1640a876056c9536637680e5281772eb8dc
Parents: 9166b94
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Aug 5 09:47:25 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Aug 5 09:49:44 2015 +0200

----------------------------------------------------------------------
 .../java/org/apache/camel/impl/osgi/Activator.java | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/b087f164/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java b/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
index df58189..db1303a 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.impl.osgi;
 
-import static org.osgi.framework.wiring.BundleRevision.PACKAGE_NAMESPACE;
-
 import java.io.BufferedInputStream;
 import java.io.BufferedReader;
 import java.io.IOException;
@@ -72,6 +70,8 @@ import org.osgi.framework.wiring.BundleWiring;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.osgi.framework.wiring.BundleRevision.PACKAGE_NAMESPACE;
+
 public class Activator implements BundleActivator, BundleTrackerCustomizer {
 
     public static final String META_INF_COMPONENT = "META-INF/services/org/apache/camel/component/";
@@ -84,10 +84,11 @@ public class Activator implements BundleActivator, BundleTrackerCustomizer {
     private static final Logger LOG = LoggerFactory.getLogger(Activator.class);
 
     private BundleTracker tracker;
-    private Map<Long, List<BaseService>> resolvers = new ConcurrentHashMap<Long, List<BaseService>>();
-    
+    private final Map<Long, List<BaseService>> resolvers = new ConcurrentHashMap<Long, List<BaseService>>();
+    private long bundleId;
+
     // Map from package name to the capability we export for this package
-    private Map<String, BundleCapability> packageCapabilities = new HashMap<>();
+    private final Map<String, BundleCapability> packageCapabilities = new HashMap<>();
 
     public void start(BundleContext context) throws Exception {
         LOG.info("Camel activator starting");
@@ -105,7 +106,6 @@ public class Activator implements BundleActivator, BundleTrackerCustomizer {
     
     /**
      * Caches the package capabilities that are needed for a set of interface classes
-     *  
      */
     private void cachePackageCapabilities(BundleContext context) {
         BundleWiring ourWiring = context.getBundle().adapt(BundleWiring.class);
@@ -207,9 +207,6 @@ public class Activator implements BundleActivator, BundleTrackerCustomizer {
     
     /**
      * Check if bundle can see the given class
-     * @param bundle
-     * @param clazz
-     * @return
      */
     protected boolean canSee(Bundle bundle, Class<?> clazz) {
         BundleCapability packageCap = packageCapabilities.get(clazz.getPackage().getName());
@@ -328,7 +325,7 @@ public class Activator implements BundleActivator, BundleTrackerCustomizer {
         public void register() {
             if (hasFallbackTypeConverter) {
                 // The FallbackTypeConverter should have a higher ranking
-                doRegister(TypeConverterLoader.class, Constants.SERVICE_RANKING, new Integer(100));
+                doRegister(TypeConverterLoader.class, Constants.SERVICE_RANKING, 100);
             } else {
                 // The default service ranking is Integer(0);
                 doRegister(TypeConverterLoader.class);