Commit 4b4a8a5b by Dave Syer

Fix warnings

parent afdb5a31
package org.springframework.platform.netflix.eureka.event; package org.springframework.platform.netflix.eureka.event;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEvent;
/** /**
* @author Spencer Gibb * @author Spencer Gibb
*/ */
@Data @Data
@EqualsAndHashCode(callSuper=false)
@SuppressWarnings("serial")
public class EurekaInstanceCanceledEvent extends ApplicationEvent { public class EurekaInstanceCanceledEvent extends ApplicationEvent {
private String appName; private String appName;
private String serverId; private String serverId;
......
package org.springframework.platform.netflix.eureka.event; package org.springframework.platform.netflix.eureka.event;
import com.netflix.appinfo.InstanceInfo; import com.netflix.appinfo.InstanceInfo;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEvent;
/** /**
* @author Spencer Gibb * @author Spencer Gibb
*/ */
@Data @Data
@EqualsAndHashCode(callSuper=false)
@SuppressWarnings("serial")
public class EurekaInstanceRegisteredEvent extends ApplicationEvent { public class EurekaInstanceRegisteredEvent extends ApplicationEvent {
private InstanceInfo instanceInfo; private InstanceInfo instanceInfo;
private int leaseDuration; private int leaseDuration;
......
package org.springframework.platform.netflix.eureka.event; package org.springframework.platform.netflix.eureka.event;
import com.netflix.appinfo.InstanceInfo; import com.netflix.appinfo.InstanceInfo;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEvent;
/** /**
* @author Spencer Gibb * @author Spencer Gibb
*/ */
@Data @Data
@EqualsAndHashCode(callSuper=false)
@SuppressWarnings("serial")
public class EurekaInstanceRenewedEvent extends ApplicationEvent { public class EurekaInstanceRenewedEvent extends ApplicationEvent {
private String appName; private String appName;
private String serverId; private String serverId;
......
package org.springframework.platform.netflix.eureka.event; package org.springframework.platform.netflix.eureka.event;
import static com.google.common.collect.Iterables.tryFind;
import java.util.List;
import javax.annotation.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import com.google.common.base.Optional; import com.google.common.base.Optional;
import com.google.common.base.Predicate; import com.google.common.base.Predicate;
import com.netflix.appinfo.InstanceInfo; import com.netflix.appinfo.InstanceInfo;
import com.netflix.discovery.DiscoveryManager;
import com.netflix.discovery.shared.Application; import com.netflix.discovery.shared.Application;
import com.netflix.eureka.PeerAwareInstanceRegistry; import com.netflix.eureka.PeerAwareInstanceRegistry;
import com.netflix.eureka.lease.LeaseManager; import com.netflix.eureka.lease.LeaseManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import javax.annotation.Nullable;
import java.util.List;
import static com.google.common.collect.Iterables.*;
/** /**
* @author Spencer Gibb * @author Spencer Gibb
......
package org.springframework.platform.netflix.zuul; package org.springframework.platform.netflix.zuul;
import com.netflix.zuul.FilterFileManager; import java.util.Map;
import com.netflix.zuul.FilterLoader;
import com.netflix.zuul.ZuulFilter; import javax.servlet.ServletContextEvent;
import com.netflix.zuul.filters.FilterRegistry; import javax.servlet.ServletContextListener;
import com.netflix.zuul.groovy.GroovyCompiler;
import com.netflix.zuul.groovy.GroovyFileFilter;
import com.netflix.zuul.monitoring.MonitoringHelper;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.ServletContextEvent; import com.netflix.zuul.ZuulFilter;
import javax.servlet.ServletContextListener; import com.netflix.zuul.filters.FilterRegistry;
import java.util.List; import com.netflix.zuul.monitoring.MonitoringHelper;
import java.util.Map;
/** /**
* User: spencergibb * User: spencergibb
......
...@@ -2,7 +2,6 @@ package org.springframework.platform.netflix.zuul.filters.post; ...@@ -2,7 +2,6 @@ package org.springframework.platform.netflix.zuul.filters.post;
import com.google.common.base.Throwables; import com.google.common.base.Throwables;
import com.netflix.config.DynamicBooleanProperty; import com.netflix.config.DynamicBooleanProperty;
import com.netflix.config.DynamicIntProperty; import com.netflix.config.DynamicIntProperty;
import com.netflix.config.DynamicPropertyFactory; import com.netflix.config.DynamicPropertyFactory;
import com.netflix.util.Pair; import com.netflix.util.Pair;
...@@ -13,6 +12,7 @@ import com.netflix.zuul.context.Debug; ...@@ -13,6 +12,7 @@ import com.netflix.zuul.context.Debug;
import com.netflix.zuul.context.RequestContext; import com.netflix.zuul.context.RequestContext;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
...@@ -143,7 +143,8 @@ public class SendResponseFilter extends ZuulFilter { ...@@ -143,7 +143,8 @@ public class SendResponseFilter extends ZuulFilter {
List<Pair<String, String>> zuulResponseHeaders = context.getZuulResponseHeaders(); List<Pair<String, String>> zuulResponseHeaders = context.getZuulResponseHeaders();
String debugHeader = ""; String debugHeader = "";
List<String> rd = (List<String>) RequestContext.getCurrentContext().get("routingDebug"); @SuppressWarnings("unchecked")
List<String> rd = (List<String>) RequestContext.getCurrentContext().get("routingDebug");
for (String it : rd) { for (String it : rd) {
debugHeader += "[[["+it+"]]]"; debugHeader += "[[["+it+"]]]";
} }
......
package org.springframework.platform.netflix.zuul.filters.post; package org.springframework.platform.netflix.zuul.filters.post;
import com.netflix.zuul.ZuulFilter; import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext; import com.netflix.zuul.context.RequestContext;
import java.util.List; import java.util.List;
...@@ -30,7 +29,8 @@ public class StatsFilter extends ZuulFilter { ...@@ -30,7 +29,8 @@ public class StatsFilter extends ZuulFilter {
} }
public void dumpRequestDebug() { public void dumpRequestDebug() {
List<String> rd = (List<String>) RequestContext.getCurrentContext().get("requestDebug"); @SuppressWarnings("unchecked")
List<String> rd = (List<String>) RequestContext.getCurrentContext().get("requestDebug");
if (rd != null) { if (rd != null) {
for (String it : rd) { for (String it : rd) {
System.out.println("REQUEST_DEBUG::" + it); System.out.println("REQUEST_DEBUG::" + it);
...@@ -39,7 +39,8 @@ public class StatsFilter extends ZuulFilter { ...@@ -39,7 +39,8 @@ public class StatsFilter extends ZuulFilter {
} }
public void dumpRoutingDebug() { public void dumpRoutingDebug() {
List<String> rd = (List<String>) RequestContext.getCurrentContext().get("routingDebug"); @SuppressWarnings("unchecked")
List<String> rd = (List<String>) RequestContext.getCurrentContext().get("routingDebug");
if (rd != null) { if (rd != null) {
for (String it : rd) { for (String it : rd) {
System.out.println("ZUUL_DEBUG::"+it); System.out.println("ZUUL_DEBUG::"+it);
......
...@@ -176,7 +176,7 @@ public class RibbonRoutingFilter extends ZuulFilter { ...@@ -176,7 +176,7 @@ public class RibbonRoutingFilter extends ZuulFilter {
RequestContext context = RequestContext.getCurrentContext(); RequestContext context = RequestContext.getCurrentContext();
MultivaluedMap<String, String> headers = new MultivaluedMapImpl(); MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
Enumeration headerNames = request.getHeaderNames(); Enumeration<?> headerNames = request.getHeaderNames();
if (headerNames != null) { if (headerNames != null) {
while (headerNames.hasMoreElements()) { while (headerNames.hasMoreElements()) {
String name = (String) headerNames.nextElement(); String name = (String) headerNames.nextElement();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment