This is an automated email from the ASF dual-hosted git repository.

cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git


The following commit(s) were added to refs/heads/master by this push:
     new 9507c2b7ea Clean up code, suppress warnings
9507c2b7ea is described below

commit 9507c2b7ea64d98da6ac3394876a45912ac01b39
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Mon Aug 14 12:08:12 2023 +0200

    Clean up code, suppress warnings
---
 .../main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java | 1 +
 .../src/main/java/org/apache/felix/webconsole/WebConsoleUtil.java     | 4 ++--
 .../org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java | 3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/webconsole/src/main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java
 
b/webconsole/src/main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java
index 133928b203..f91e666625 100644
--- 
a/webconsole/src/main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java
+++ 
b/webconsole/src/main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java
@@ -268,6 +268,7 @@ public abstract class SimpleWebConsolePlugin extends 
AbstractWebConsolePlugin
      * @param serviceName the service name to obtain
      * @return the service or <code>null</code> if missing.
      */
+    @SuppressWarnings({"rawtypes", "unchecked"})
     public final Object getService( String serviceName ) {
         ServiceTracker<?,?> serviceTracker = services.get( serviceName );
         if ( serviceTracker == null ) {
diff --git 
a/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleUtil.java 
b/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleUtil.java
index 71a5b7c3b6..4148324651 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleUtil.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleUtil.java
@@ -24,7 +24,6 @@ import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.lang.reflect.Array;
 import java.net.URLDecoder;
-import java.nio.charset.StandardCharsets;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -178,7 +177,8 @@ public final class WebConsoleUtil
             }
             catch ( FileUploadException fue )
             {
-                // TODO: log
+                // fail
+                return null;
             }
             request.setAttribute( AbstractWebConsolePlugin.ATTR_FILEUPLOAD, 
params );
         }
diff --git 
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java
 
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java
index 2d1c57c184..37aa34687d 100644
--- 
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java
+++ 
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java
@@ -59,7 +59,7 @@ public class WebConsolePluginAdapter extends 
AbstractWebConsolePlugin
      * @param plugin the plugin itself
      * @param serviceReference reference to the plugin
      */
-    public WebConsolePluginAdapter( String label, Servlet plugin, 
ServiceReference serviceReference )
+    public WebConsolePluginAdapter( String label, Servlet plugin, 
ServiceReference<Servlet> serviceReference )
     {
         this.label = label;
         this.plugin = plugin;
@@ -239,6 +239,7 @@ public class WebConsolePluginAdapter extends 
AbstractWebConsolePlugin
 
     //---------- internal
 
+    @SuppressWarnings("rawtypes")
     private String[] toStringArray( final Object value )
     {
         if ( value instanceof String )

Reply via email to