gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1873621 - in /gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy: HostResolver.java Main.java resources/LogFile.java restlets/Proxy.java
Date Wed, 05 Feb 2020 10:16:38 GMT
Author: markt
Date: Wed Feb  5 10:16:38 2020
New Revision: 1873621

URL: http://svn.apache.org/viewvc?rev=1873621&view=rev
Log:
Fix remaining IDE warnings apart from Javadoc

Modified:
    gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/HostResolver.java
    gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/Main.java
    gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/LogFile.java
    gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/restlets/Proxy.java

Modified: gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/HostResolver.java
URL: http://svn.apache.org/viewvc/gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/HostResolver.java?rev=1873621&r1=1873620&r2=1873621&view=diff
==============================================================================
--- gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/HostResolver.java (original)
+++ gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/HostResolver.java Wed Feb  5
10:16:38 2020
@@ -50,7 +50,7 @@ public class HostResolver {
     static void initialize(Properties props) {
         for (Object key : Collections.list(props.propertyNames())) {
             if (key instanceof String) {
-                @SuppressWarnings("Unchecked") String prefix = (String) key;
+                String prefix = (String) key;
                 LOG.info("Mapping " + prefix + " to "
                          + props.getProperty(prefix));
                 PREFIX_2_HOST.put(prefix, props.getProperty(prefix));

Modified: gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/Main.java
URL: http://svn.apache.org/viewvc/gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/Main.java?rev=1873621&r1=1873620&r2=1873621&view=diff
==============================================================================
--- gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/Main.java (original)
+++ gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/Main.java Wed Feb  5 10:16:38
2020
@@ -42,6 +42,7 @@ import org.restlet.Restlet;
 import org.restlet.Route;
 import org.restlet.Router;
 import org.restlet.data.Protocol;
+import org.restlet.resource.Resource;
 import org.restlet.util.Variable;
 
 /**
@@ -85,7 +86,7 @@ public class Main {
             int consumed = 0;
             if (args.length > 0) {
                 try {
-                    port = Integer.valueOf(args[0]);
+                    port = Integer.valueOf(args[0]).intValue();
                     consumed++;
                 } catch (NumberFormatException ex) {
                     // first arg is properties file
@@ -197,7 +198,7 @@ public class Main {
     }
 
     private static void attachResource(Router router, String prefix,
-                                       String uriTemplate, Class clazz) {
+                                       String uriTemplate, Class<? extends Resource>
clazz) {
         Route r = router.attach(prefix + uriTemplate, clazz);
         prepareVariables(r);
     }

Modified: gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/LogFile.java
URL: http://svn.apache.org/viewvc/gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/LogFile.java?rev=1873621&r1=1873620&r2=1873621&view=diff
==============================================================================
--- gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/LogFile.java (original)
+++ gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/LogFile.java Wed Feb
 5 10:16:38 2020
@@ -91,7 +91,7 @@ public class LogFile extends Resource {
 	for (LogEntry entry : GumpArtifact.getServedArtifacts()) {
 	    result.append(String.format(LINE_PATTERN,
 					entry.getState().getCssClass(),
-					i++, entry.getServedAt(),
+					Integer.valueOf(i++), entry.getServedAt(),
 					entry.getArtifactName(),
 					entry.getState()));
 	}

Modified: gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/restlets/Proxy.java
URL: http://svn.apache.org/viewvc/gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/restlets/Proxy.java?rev=1873621&r1=1873620&r2=1873621&view=diff
==============================================================================
--- gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/restlets/Proxy.java (original)
+++ gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/restlets/Proxy.java Wed Feb 
5 10:16:38 2020
@@ -52,6 +52,7 @@ public class Proxy extends Restlet {
     /**
      * Used when invoked as fallback
      */
+    @Override
     public void handle(Request request, Response response) {
         getRedirector(request).handle(request, response);
     }



Mime
View raw message