Spring cleaning: use diamond operator
This commit is contained in:
@@ -75,8 +75,8 @@ class HttpEntityTests {
|
||||
assertThat(new HttpEntity<>(map1).equals(new HttpEntity<>(map1))).isTrue();
|
||||
assertThat(new HttpEntity<>(map1).equals(new HttpEntity<>(map2))).isFalse();
|
||||
|
||||
assertThat(new HttpEntity<String>(null, null).equals(new HttpEntity<String>(null, null))).isTrue();
|
||||
assertThat(new HttpEntity<>("foo", null).equals(new HttpEntity<String>(null, null))).isFalse();
|
||||
assertThat(new HttpEntity<String>(null, null).equals(new HttpEntity<>(null, null))).isTrue();
|
||||
assertThat(new HttpEntity<>("foo", null).equals(new HttpEntity<>(null, null))).isFalse();
|
||||
assertThat(new HttpEntity<String>(null, null).equals(new HttpEntity<>("bar", null))).isFalse();
|
||||
|
||||
assertThat(new HttpEntity<>("foo", map1).equals(new HttpEntity<>("foo", map1))).isTrue();
|
||||
|
||||
@@ -53,7 +53,7 @@ class FormHttpMessageReaderTests extends AbstractLeakCheckingTests {
|
||||
MediaType.APPLICATION_FORM_URLENCODED)).isTrue();
|
||||
|
||||
assertThat(this.reader.canRead(
|
||||
ResolvableType.forInstance(new LinkedMultiValueMap<String, String>()),
|
||||
ResolvableType.forInstance(new LinkedMultiValueMap<>()),
|
||||
MediaType.APPLICATION_FORM_URLENCODED)).isTrue();
|
||||
|
||||
assertThat(this.reader.canRead(
|
||||
|
||||
@@ -52,7 +52,7 @@ class FormHttpMessageWriterTests extends AbstractLeakCheckingTests {
|
||||
|
||||
// No generic information
|
||||
assertThat(this.writer.canWrite(
|
||||
ResolvableType.forInstance(new LinkedMultiValueMap<String, String>()),
|
||||
ResolvableType.forInstance(new LinkedMultiValueMap<>()),
|
||||
MediaType.APPLICATION_FORM_URLENCODED)).isTrue();
|
||||
|
||||
assertThat(this.writer.canWrite(
|
||||
|
||||
@@ -72,7 +72,7 @@ class WebAsyncManagerTests {
|
||||
.withMessage("AsyncWebRequest must not be null");
|
||||
|
||||
assertThatIllegalStateException()
|
||||
.isThrownBy(() -> manager.startDeferredResultProcessing(new DeferredResult<String>()))
|
||||
.isThrownBy(() -> manager.startDeferredResultProcessing(new DeferredResult<>()))
|
||||
.withMessage("AsyncWebRequest must not be null");
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ class ModelFactoryOrderingTests {
|
||||
|
||||
@BeforeEach
|
||||
void setup() {
|
||||
this.mavContainer.addAttribute("methods", new ArrayList<String>());
|
||||
this.mavContainer.addAttribute("methods", new ArrayList<>());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user