From a08b661af650a961567a53602807297fac66c97a Mon Sep 17 00:00:00 2001 From: Gregor Zurowski Date: Tue, 11 Jul 2017 10:38:51 +0200 Subject: [PATCH] Remove usage of Lombok Signed-off-by: Gregor Zurowski --- .../cloud/netflix/zuul/RoutesEndpoint.java | 61 ++++++++++++++++++- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/RoutesEndpoint.java b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/RoutesEndpoint.java index d10bc9ba..9f4ba423 100644 --- a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/RoutesEndpoint.java +++ b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/RoutesEndpoint.java @@ -18,11 +18,11 @@ package org.springframework.cloud.netflix.zuul; import java.util.LinkedHashMap; import java.util.Map; +import java.util.Objects; import java.util.Set; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import lombok.Data; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.actuate.endpoint.AbstractEndpoint; import org.springframework.boot.context.properties.ConfigurationProperties; @@ -78,7 +78,6 @@ public class RoutesEndpoint extends AbstractEndpoint> { */ @JsonPropertyOrder({ "id", "fullPath", "location" }) @JsonInclude(JsonInclude.Include.NON_EMPTY) - @Data public static class RouteDetails { private String id; @@ -113,6 +112,64 @@ public class RoutesEndpoint extends AbstractEndpoint> { this.customSensitiveHeaders = route.isCustomSensitiveHeaders(); this.prefixStripped = route.isPrefixStripped(); } + + public String getId() { + return id; + } + + public String getFullPath() { + return fullPath; + } + + public String getPath() { + return path; + } + + public String getLocation() { + return location; + } + + public String getPrefix() { + return prefix; + } + + public Boolean getRetryable() { + return retryable; + } + + public Set getSensitiveHeaders() { + return sensitiveHeaders; + } + + public boolean isCustomSensitiveHeaders() { + return customSensitiveHeaders; + } + + public boolean isPrefixStripped() { + return prefixStripped; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RouteDetails that = (RouteDetails) o; + return Objects.equals(id, that.id) && + Objects.equals(fullPath, that.fullPath) && + Objects.equals(path, that.path) && + Objects.equals(location, that.location) && + Objects.equals(prefix, that.prefix) && + Objects.equals(retryable, that.retryable) && + Objects.equals(sensitiveHeaders, that.sensitiveHeaders) && + customSensitiveHeaders == that.customSensitiveHeaders && + prefixStripped == that.prefixStripped; + } + + @Override + public int hashCode() { + return Objects.hash(id, fullPath, path, location, prefix, retryable, + sensitiveHeaders, customSensitiveHeaders, prefixStripped); + } } }