Use diamond operator where feasible
See gh-31916
This commit is contained in:
committed by
Stéphane Nicoll
parent
db2c532c07
commit
094479b55f
@@ -56,7 +56,8 @@ 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<String>() {}).header("baz", "qux");
|
||||
builder.asyncPart("publisherPtr", publisher, new ParameterizedTypeReference<>() {
|
||||
}).header("baz", "qux");
|
||||
|
||||
MultiValueMap<String, HttpEntity<?>> result = builder.build();
|
||||
|
||||
|
||||
@@ -169,7 +169,8 @@ class ChannelSendOperatorTests {
|
||||
return Mono.never();
|
||||
});
|
||||
|
||||
operator.subscribe(new BaseSubscriber<Void>() {});
|
||||
operator.subscribe(new BaseSubscriber<>() {
|
||||
});
|
||||
try {
|
||||
writeSubscriber.signalDemand(1); // Let cached signals ("foo" and error) be published..
|
||||
}
|
||||
|
||||
@@ -166,7 +166,8 @@ class RestClientIntegrationTests {
|
||||
ValueContainer<Pojo> result = this.restClient.get()
|
||||
.uri("/json").accept(MediaType.APPLICATION_JSON)
|
||||
.retrieve()
|
||||
.body(new ParameterizedTypeReference<ValueContainer<Pojo>>() {});
|
||||
.body(new ParameterizedTypeReference<>() {
|
||||
});
|
||||
|
||||
assertThat(result.getContainerValue()).isNotNull();
|
||||
Pojo pojo = result.getContainerValue();
|
||||
@@ -191,7 +192,8 @@ class RestClientIntegrationTests {
|
||||
ValueContainer<List<Pojo>> result = this.restClient.get()
|
||||
.uri("/json").accept(MediaType.APPLICATION_JSON)
|
||||
.retrieve()
|
||||
.body(new ParameterizedTypeReference<ValueContainer<List<Pojo>>>() {});
|
||||
.body(new ParameterizedTypeReference<>() {
|
||||
});
|
||||
|
||||
assertThat(result.containerValue).isNotNull();
|
||||
assertThat(result.containerValue).containsExactly(new Pojo("foofoo", "barbar"));
|
||||
|
||||
Reference in New Issue
Block a user