Polish "Use diamond operator where feasible"
See gh-31916
This commit is contained in:
@@ -60,8 +60,7 @@ class DefaultEntityResponseBuilderTests {
|
||||
void fromObjectTypeReference() {
|
||||
String body = "foo";
|
||||
EntityResponse<String> response = EntityResponse.fromObject(body,
|
||||
new ParameterizedTypeReference<>() {
|
||||
})
|
||||
new ParameterizedTypeReference<>() {})
|
||||
.build();
|
||||
|
||||
assertThat(response.entity()).isSameAs(body);
|
||||
|
||||
@@ -265,8 +265,7 @@ class DefaultServerRequestTests {
|
||||
DefaultServerRequest request = new DefaultServerRequest(servletRequest,
|
||||
List.of(new MappingJackson2HttpMessageConverter()));
|
||||
|
||||
List<String> result = request.body(new ParameterizedTypeReference<>() {
|
||||
});
|
||||
List<String> result = request.body(new ParameterizedTypeReference<>() {});
|
||||
assertThat(result).hasSize(2);
|
||||
assertThat(result).element(0).isEqualTo("foo");
|
||||
assertThat(result).element(1).isEqualTo("bar");
|
||||
|
||||
@@ -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.
|
||||
@@ -293,8 +293,7 @@ class DefaultServerResponseBuilderTests {
|
||||
List<String> body = new ArrayList<>();
|
||||
body.add("foo");
|
||||
body.add("bar");
|
||||
ServerResponse response = ServerResponse.ok().body(body, new ParameterizedTypeReference<>() {
|
||||
});
|
||||
ServerResponse response = ServerResponse.ok().body(body, new ParameterizedTypeReference<>() {});
|
||||
|
||||
MockHttpServletRequest mockRequest = new MockHttpServletRequest("GET", "https://example.com");
|
||||
MockHttpServletResponse mockResponse = new MockHttpServletResponse();
|
||||
|
||||
Reference in New Issue
Block a user