fix issue with assertion in HystrixStreamTests, polish diamond operator and follow class field naming convention (#2703)

* fix assertion check

* polish: replace the type specification in this constructor call with the diamond operator ("<>"),
make EUREKA_PACKAGES final to avoid issue "static non-final field names should comply with a naming convention"
This commit is contained in:
Igor Suhorukov
2018-02-02 03:15:51 +03:00
committed by Ryan Baxter
parent b2ebfc0ecb
commit 24dfd4ae76
14 changed files with 20 additions and 20 deletions

View File

@@ -157,7 +157,7 @@ public class FeignLoadBalancer extends
@Override
public HttpHeaders getHeaders() {
Map<String, List<String>> headers = new HashMap<String, List<String>>();
Map<String, List<String>> headers = new HashMap<>();
Map<String, Collection<String>> feignHeaders = RibbonRequest.this.toRequest().headers();
for(String key : feignHeaders.keySet()) {
headers.put(key, new ArrayList<String>(feignHeaders.get(key)));

View File

@@ -83,7 +83,7 @@ public class FeignRetryPolicy extends InterceptorRetryPolicy {
FeignRetryPolicyServiceInstance(String serviceId, HttpRequest request) {
this.serviceId = serviceId;
this.request = request;
this.metadata = new HashMap<String, String>();
this.metadata = new HashMap<>();
}
@Override

View File

@@ -41,7 +41,7 @@ public class HystrixHealthIndicator extends AbstractHealthIndicator {
@Override
protected void doHealthCheck(Builder builder) throws Exception {
List<String> openCircuitBreakers = new ArrayList<String>();
List<String> openCircuitBreakers = new ArrayList<>();
// Collect all open circuit breakers from Hystrix
for (HystrixCommandMetrics metrics : HystrixCommandMetrics.getInstances()) {