karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject karaf git commit: Cleanup warnings
Date Mon, 19 Dec 2016 16:38:29 GMT
Repository: karaf
Updated Branches:
  refs/heads/master aa90b3900 -> cd9dcf233


Cleanup warnings


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

Branch: refs/heads/master
Commit: cd9dcf2338b213a930c6ada900f096594af4c79c
Parents: aa90b39
Author: Christian Schneider <chris@die-schneider.net>
Authored: Mon Dec 19 17:38:16 2016 +0100
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Mon Dec 19 17:38:16 2016 +0100

----------------------------------------------------------------------
 .../karaf/config/command/ConfigPropertyCommandSupport.java     | 4 +++-
 .../java/org/apache/karaf/config/command/PropGetCommand.java   | 1 +
 .../command/completers/ConfigurationPropertyCompleter.java     | 1 -
 .../java/org/apache/karaf/config/command/EditCommandTest.java  | 6 ++----
 4 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/cd9dcf23/config/src/main/java/org/apache/karaf/config/command/ConfigPropertyCommandSupport.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/karaf/config/command/ConfigPropertyCommandSupport.java
b/config/src/main/java/org/apache/karaf/config/command/ConfigPropertyCommandSupport.java
index 2b17d48..114e7e5 100644
--- a/config/src/main/java/org/apache/karaf/config/command/ConfigPropertyCommandSupport.java
+++ b/config/src/main/java/org/apache/karaf/config/command/ConfigPropertyCommandSupport.java
@@ -32,7 +32,9 @@ public abstract class ConfigPropertyCommandSupport extends ConfigCommandSupport
     @Completion(ConfigurationCompleter.class)
     protected String pid;
 
-    @SuppressWarnings("rawtypes")
+    @SuppressWarnings({
+     "rawtypes", "unchecked"
+    })
     protected Object doExecute() throws Exception {
         Dictionary props = getEditedProps();
         if (props == null && pid == null) {

http://git-wip-us.apache.org/repos/asf/karaf/blob/cd9dcf23/config/src/main/java/org/apache/karaf/config/command/PropGetCommand.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/karaf/config/command/PropGetCommand.java b/config/src/main/java/org/apache/karaf/config/command/PropGetCommand.java
index c38b530..4656e57 100644
--- a/config/src/main/java/org/apache/karaf/config/command/PropGetCommand.java
+++ b/config/src/main/java/org/apache/karaf/config/command/PropGetCommand.java
@@ -33,6 +33,7 @@ public class PropGetCommand extends ConfigPropertyCommandSupport {
     @Completion(ConfigurationPropertyCompleter.class)
     String prop;
 
+    @SuppressWarnings("rawtypes")
     @Override
     public void propertyAction(Dictionary props) {
         System.out.println(props.get(prop));

http://git-wip-us.apache.org/repos/asf/karaf/blob/cd9dcf23/config/src/main/java/org/apache/karaf/config/command/completers/ConfigurationPropertyCompleter.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/karaf/config/command/completers/ConfigurationPropertyCompleter.java
b/config/src/main/java/org/apache/karaf/config/command/completers/ConfigurationPropertyCompleter.java
index 78d88a2..a74664d 100644
--- a/config/src/main/java/org/apache/karaf/config/command/completers/ConfigurationPropertyCompleter.java
+++ b/config/src/main/java/org/apache/karaf/config/command/completers/ConfigurationPropertyCompleter.java
@@ -53,7 +53,6 @@ public class ConfigurationPropertyCompleter implements Completer {
     @Reference
     private ConfigurationAdmin configAdmin;
 
-    @SuppressWarnings("rawtypes")
     public int complete(final Session session, final CommandLine commandLine, final List<String>
candidates) {
         StringsCompleter strings = new StringsCompleter();
         if (session != null) {

http://git-wip-us.apache.org/repos/asf/karaf/blob/cd9dcf23/config/src/test/java/org/apache/karaf/config/command/EditCommandTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/karaf/config/command/EditCommandTest.java b/config/src/test/java/org/apache/karaf/config/command/EditCommandTest.java
index 4e1d651..9737ab6 100644
--- a/config/src/test/java/org/apache/karaf/config/command/EditCommandTest.java
+++ b/config/src/test/java/org/apache/karaf/config/command/EditCommandTest.java
@@ -17,12 +17,11 @@
 package org.apache.karaf.config.command;
 
 import java.util.Dictionary;
-import java.util.Properties;
+import java.util.Hashtable;
 
 import junit.framework.TestCase;
 import org.apache.karaf.config.core.impl.ConfigRepositoryImpl;
 import org.apache.karaf.shell.api.console.Session;
-import org.osgi.framework.BundleContext;
 import org.osgi.service.cm.Configuration;
 import org.osgi.service.cm.ConfigurationAdmin;
 
@@ -38,7 +37,6 @@ public class EditCommandTest extends TestCase {
     private static final String PID = "my.test.persistent.id";
 
     private EditCommand command;
-    private BundleContext context;
     private ConfigurationAdmin admin;
     private Session session;
 
@@ -59,7 +57,7 @@ public class EditCommandTest extends TestCase {
         replay(admin);
         
         // the ConfigAdmin service returns a Dictionary for an existing PID
-        Dictionary props = new Properties();
+        Dictionary<String, Object> props = new Hashtable<String, Object>();
         expect(config.getProperties()).andReturn(props);
         replay(config);
         


Mime
View raw message