Polish "Use diamond operator where feasible"

See gh-31916
This commit is contained in:
Stéphane Nicoll
2023-12-28 13:08:24 +01:00
parent 094479b55f
commit a6e87b40c7
17 changed files with 21 additions and 41 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -56,8 +56,7 @@ public class MultipartBodyBuilderTests {
Publisher<String> publisher = Flux.just("foo", "bar", "baz");
builder.asyncPart("publisherClass", publisher, String.class).header("baz", "qux");
builder.asyncPart("publisherPtr", publisher, new ParameterizedTypeReference<>() {
}).header("baz", "qux");
builder.asyncPart("publisherPtr", publisher, new ParameterizedTypeReference<>() {}).header("baz", "qux");
MultiValueMap<String, HttpEntity<?>> result = builder.build();

View File

@@ -169,8 +169,7 @@ class ChannelSendOperatorTests {
return Mono.never();
});
operator.subscribe(new BaseSubscriber<>() {
});
operator.subscribe(new BaseSubscriber<>() {});
try {
writeSubscriber.signalDemand(1); // Let cached signals ("foo" and error) be published..
}

View File

@@ -166,8 +166,7 @@ class RestClientIntegrationTests {
ValueContainer<Pojo> result = this.restClient.get()
.uri("/json").accept(MediaType.APPLICATION_JSON)
.retrieve()
.body(new ParameterizedTypeReference<>() {
});
.body(new ParameterizedTypeReference<>() {});
assertThat(result.getContainerValue()).isNotNull();
Pojo pojo = result.getContainerValue();
@@ -192,8 +191,7 @@ class RestClientIntegrationTests {
ValueContainer<List<Pojo>> result = this.restClient.get()
.uri("/json").accept(MediaType.APPLICATION_JSON)
.retrieve()
.body(new ParameterizedTypeReference<>() {
});
.body(new ParameterizedTypeReference<>() {});
assertThat(result.containerValue).isNotNull();
assertThat(result.containerValue).containsExactly(new Pojo("foofoo", "barbar"));