karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject [1/2] karaf git commit: Fix warnings
Date Mon, 06 Feb 2017 15:55:51 GMT
Repository: karaf
Updated Branches:
  refs/heads/master 9ce324f57 -> 868c68524


Fix warnings


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

Branch: refs/heads/master
Commit: e720fc771aa5a30b18c9a275f1b53ed49c4d5886
Parents: 9ce324f
Author: Christian Schneider <chris@die-schneider.net>
Authored: Mon Feb 6 16:55:10 2017 +0100
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Mon Feb 6 16:55:10 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/karaf/bundle/command/BundlesCommand.java | 2 --
 .../src/main/java/org/apache/karaf/bundle/command/Id.java    | 8 --------
 .../main/java/org/apache/karaf/bundle/command/Services.java  | 1 -
 .../org/apache/karaf/bundle/command/bundletree/Tree.java     | 4 ++--
 .../apache/karaf/bundle/core/internal/BundleWatcherImpl.java | 3 ---
 .../org/apache/karaf/bundle/command/ListServicesTest.java    | 1 -
 .../org/apache/karaf/bundle/command/bundletree/TreeTest.java | 6 +++---
 7 files changed, 5 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/e720fc77/bundle/core/src/main/java/org/apache/karaf/bundle/command/BundlesCommand.java
----------------------------------------------------------------------
diff --git a/bundle/core/src/main/java/org/apache/karaf/bundle/command/BundlesCommand.java
b/bundle/core/src/main/java/org/apache/karaf/bundle/command/BundlesCommand.java
index 25a2125..03d8dea 100644
--- a/bundle/core/src/main/java/org/apache/karaf/bundle/command/BundlesCommand.java
+++ b/bundle/core/src/main/java/org/apache/karaf/bundle/command/BundlesCommand.java
@@ -20,13 +20,11 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.karaf.bundle.core.BundleService;
-import org.apache.karaf.bundle.core.internal.BundleSelectorImpl;
 import org.apache.karaf.shell.api.action.Action;
 import org.apache.karaf.shell.api.action.Argument;
 import org.apache.karaf.shell.api.action.Option;
 import org.apache.karaf.shell.api.action.lifecycle.Reference;
 import org.apache.karaf.shell.support.MultiException;
-import org.apache.karaf.shell.support.ShellUtil;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/e720fc77/bundle/core/src/main/java/org/apache/karaf/bundle/command/Id.java
----------------------------------------------------------------------
diff --git a/bundle/core/src/main/java/org/apache/karaf/bundle/command/Id.java b/bundle/core/src/main/java/org/apache/karaf/bundle/command/Id.java
index c843263..d43284a 100644
--- a/bundle/core/src/main/java/org/apache/karaf/bundle/command/Id.java
+++ b/bundle/core/src/main/java/org/apache/karaf/bundle/command/Id.java
@@ -16,17 +16,9 @@
  */
 package org.apache.karaf.bundle.command;
 
-import java.util.List;
-
-import org.apache.karaf.bundle.core.BundleService;
-import org.apache.karaf.shell.api.action.Action;
-import org.apache.karaf.shell.api.action.Argument;
 import org.apache.karaf.shell.api.action.Command;
-import org.apache.karaf.shell.api.action.lifecycle.Reference;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
-import org.apache.karaf.shell.support.ShellUtil;
 import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
 
 @Command(scope = "bundle", name = "id", description = "Gets the bundle ID.")
 @Service

http://git-wip-us.apache.org/repos/asf/karaf/blob/e720fc77/bundle/core/src/main/java/org/apache/karaf/bundle/command/Services.java
----------------------------------------------------------------------
diff --git a/bundle/core/src/main/java/org/apache/karaf/bundle/command/Services.java b/bundle/core/src/main/java/org/apache/karaf/bundle/command/Services.java
index 5b2080d..b8b4a9b 100644
--- a/bundle/core/src/main/java/org/apache/karaf/bundle/command/Services.java
+++ b/bundle/core/src/main/java/org/apache/karaf/bundle/command/Services.java
@@ -18,7 +18,6 @@ package org.apache.karaf.bundle.command;
 
 import java.util.Arrays;
 import java.util.HashSet;
-import java.util.List;
 import java.util.Set;
 
 import org.apache.karaf.shell.api.action.Command;

http://git-wip-us.apache.org/repos/asf/karaf/blob/e720fc77/bundle/core/src/main/java/org/apache/karaf/bundle/command/bundletree/Tree.java
----------------------------------------------------------------------
diff --git a/bundle/core/src/main/java/org/apache/karaf/bundle/command/bundletree/Tree.java
b/bundle/core/src/main/java/org/apache/karaf/bundle/command/bundletree/Tree.java
index 9bb6501..8885d11 100644
--- a/bundle/core/src/main/java/org/apache/karaf/bundle/command/bundletree/Tree.java
+++ b/bundle/core/src/main/java/org/apache/karaf/bundle/command/bundletree/Tree.java
@@ -67,8 +67,8 @@ public class Tree<T> extends Node<T> {
      * @param writer the writer where to write.
      */
     public void write(PrintWriter writer) {
-        write(writer, new Converter() {
-            public String toString(Node node) {
+        write(writer, new Converter<T>() {
+            public String toString(Node<T> node) {
                 return node.getValue().toString();
             }
         });

http://git-wip-us.apache.org/repos/asf/karaf/blob/e720fc77/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundleWatcherImpl.java
----------------------------------------------------------------------
diff --git a/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundleWatcherImpl.java
b/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundleWatcherImpl.java
index 104dcba..bf0c697 100644
--- a/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundleWatcherImpl.java
+++ b/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundleWatcherImpl.java
@@ -18,7 +18,6 @@ package org.apache.karaf.bundle.core.internal;
 
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
@@ -32,7 +31,6 @@ import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 
-import org.apache.karaf.bundle.core.BundleInfo;
 import org.apache.karaf.bundle.core.BundleService;
 import org.apache.karaf.bundle.core.BundleWatcher;
 import org.apache.karaf.util.bundles.BundleUtils;
@@ -59,7 +57,6 @@ public class BundleWatcherImpl implements Runnable, BundleListener, BundleWatche
     private List<String> watchURLs = new CopyOnWriteArrayList<String>();
     private AtomicInteger counter = new AtomicInteger(0);
 
-    @SuppressWarnings("deprecation")
     public BundleWatcherImpl(BundleContext bundleContext, MavenConfigService mavenConfigService,
BundleService bundleService) {
         this.bundleContext = bundleContext;
 		this.localRepoDetector = mavenConfigService;

http://git-wip-us.apache.org/repos/asf/karaf/blob/e720fc77/bundle/core/src/test/java/org/apache/karaf/bundle/command/ListServicesTest.java
----------------------------------------------------------------------
diff --git a/bundle/core/src/test/java/org/apache/karaf/bundle/command/ListServicesTest.java
b/bundle/core/src/test/java/org/apache/karaf/bundle/command/ListServicesTest.java
index c4413b9..0d095a9 100644
--- a/bundle/core/src/test/java/org/apache/karaf/bundle/command/ListServicesTest.java
+++ b/bundle/core/src/test/java/org/apache/karaf/bundle/command/ListServicesTest.java
@@ -27,7 +27,6 @@ public class ListServicesTest {
     private BundleContext bundleContext;
     private Services listServices;
 
-    @SuppressWarnings("unchecked")
     public ListServicesTest() {
         listServices = new Services();
         bundleContext = new TestBundleFactory().createBundleContext();

http://git-wip-us.apache.org/repos/asf/karaf/blob/e720fc77/bundle/core/src/test/java/org/apache/karaf/bundle/command/bundletree/TreeTest.java
----------------------------------------------------------------------
diff --git a/bundle/core/src/test/java/org/apache/karaf/bundle/command/bundletree/TreeTest.java
b/bundle/core/src/test/java/org/apache/karaf/bundle/command/bundletree/TreeTest.java
index df0d7d6..42bb6ce 100644
--- a/bundle/core/src/test/java/org/apache/karaf/bundle/command/bundletree/TreeTest.java
+++ b/bundle/core/src/test/java/org/apache/karaf/bundle/command/bundletree/TreeTest.java
@@ -100,7 +100,7 @@ public class TreeTest {
         Tree<String> tree = new Tree<String>("root");
         Node<String> child1 = tree.addChild("child1");
         child1.addChild("grandchild");
-        Node child2 = tree.addChild("child2");
+        Node<String> child2 = tree.addChild("child2");
         child2.addChild("grandchild");
 
         Set<String> elements = tree.flatten();
@@ -117,8 +117,8 @@ public class TreeTest {
         Tree<String> tree = new Tree<String>("root");
         Node<String> child1 = tree.addChild("child1");
         child1.addChild("grandchild");
-        Node child2 = tree.addChild("child2");
-        Node node = child2.addChild("grandchild2");
+        Node<String> child2 = tree.addChild("child2");
+        Node<String> node = child2.addChild("grandchild2");
 
         assertTrue(node.hasAncestor("child2"));
         assertTrue(node.hasAncestor("root"));


Mime
View raw message