Commit 4b4a8a5b by Dave Syer

Fix warnings

parent afdb5a31
package org.springframework.platform.netflix.eureka.event;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.context.ApplicationEvent;
/**
* @author Spencer Gibb
*/
@Data
@EqualsAndHashCode(callSuper=false)
@SuppressWarnings("serial")
public class EurekaInstanceCanceledEvent extends ApplicationEvent {
private String appName;
private String serverId;
......
package org.springframework.platform.netflix.eureka.event;
import com.netflix.appinfo.InstanceInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.context.ApplicationEvent;
/**
* @author Spencer Gibb
*/
@Data
@EqualsAndHashCode(callSuper=false)
@SuppressWarnings("serial")
public class EurekaInstanceRegisteredEvent extends ApplicationEvent {
private InstanceInfo instanceInfo;
private int leaseDuration;
......
package org.springframework.platform.netflix.eureka.event;
import com.netflix.appinfo.InstanceInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.context.ApplicationEvent;
/**
* @author Spencer Gibb
*/
@Data
@EqualsAndHashCode(callSuper=false)
@SuppressWarnings("serial")
public class EurekaInstanceRenewedEvent extends ApplicationEvent {
private String appName;
private String serverId;
......
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.Predicate;
import com.netflix.appinfo.InstanceInfo;
import com.netflix.discovery.DiscoveryManager;
import com.netflix.discovery.shared.Application;
import com.netflix.eureka.PeerAwareInstanceRegistry;
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
......
package org.springframework.platform.netflix.zuul;
import com.netflix.zuul.FilterFileManager;
import com.netflix.zuul.FilterLoader;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.filters.FilterRegistry;
import com.netflix.zuul.groovy.GroovyCompiler;
import com.netflix.zuul.groovy.GroovyFileFilter;
import com.netflix.zuul.monitoring.MonitoringHelper;
import java.util.Map;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import java.util.List;
import java.util.Map;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.filters.FilterRegistry;
import com.netflix.zuul.monitoring.MonitoringHelper;
/**
* User: spencergibb
......
......@@ -2,7 +2,6 @@ package org.springframework.platform.netflix.zuul.filters.post;
import com.google.common.base.Throwables;
import com.netflix.config.DynamicBooleanProperty;
import com.netflix.config.DynamicIntProperty;
import com.netflix.config.DynamicPropertyFactory;
import com.netflix.util.Pair;
......@@ -13,6 +12,7 @@ import com.netflix.zuul.context.Debug;
import com.netflix.zuul.context.RequestContext;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
......@@ -143,6 +143,7 @@ public class SendResponseFilter extends ZuulFilter {
List<Pair<String, String>> zuulResponseHeaders = context.getZuulResponseHeaders();
String debugHeader = "";
@SuppressWarnings("unchecked")
List<String> rd = (List<String>) RequestContext.getCurrentContext().get("routingDebug");
for (String it : rd) {
debugHeader += "[[["+it+"]]]";
......
package org.springframework.platform.netflix.zuul.filters.post;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import java.util.List;
......@@ -30,6 +29,7 @@ public class StatsFilter extends ZuulFilter {
}
public void dumpRequestDebug() {
@SuppressWarnings("unchecked")
List<String> rd = (List<String>) RequestContext.getCurrentContext().get("requestDebug");
if (rd != null) {
for (String it : rd) {
......@@ -39,6 +39,7 @@ public class StatsFilter extends ZuulFilter {
}
public void dumpRoutingDebug() {
@SuppressWarnings("unchecked")
List<String> rd = (List<String>) RequestContext.getCurrentContext().get("routingDebug");
if (rd != null) {
for (String it : rd) {
......
......@@ -176,7 +176,7 @@ public class RibbonRoutingFilter extends ZuulFilter {
RequestContext context = RequestContext.getCurrentContext();
MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
Enumeration headerNames = request.getHeaderNames();
Enumeration<?> headerNames = request.getHeaderNames();
if (headerNames != null) {
while (headerNames.hasMoreElements()) {
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