From 4db0ac2722201e881143c1778c41f57adc01bf60 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 31 Jan 2025 10:06:01 +0100 Subject: [PATCH] Polishing. Refine deprecation warnings. See #3452 --- .../data/jpa/domain/SpecificationUnitTests.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java index 11e4a479f2..368ccc7ff5 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java @@ -46,6 +46,7 @@ * @author Mark Paluch * @author Daniel Shuy */ +@SuppressWarnings("removal") @ExtendWith(MockitoExtension.class) @MockitoSettings(strictness = Strictness.LENIENT) class SpecificationUnitTests { @@ -119,7 +120,7 @@ void orConcatenatesNullSpecToSpec() { } @Test // GH-1943 - public void allOfConcatenatesNull() { + void allOfConcatenatesNull() { Specification specification = Specification.allOf(null, spec, null); @@ -128,7 +129,7 @@ public void allOfConcatenatesNull() { } @Test // GH-1943 - public void anyOfConcatenatesNull() { + void anyOfConcatenatesNull() { Specification specification = Specification.anyOf(null, spec, null); @@ -137,7 +138,7 @@ public void anyOfConcatenatesNull() { } @Test // GH-1943 - public void emptyAllOfReturnsEmptySpecification() { + void emptyAllOfReturnsEmptySpecification() { Specification specification = Specification.allOf(); @@ -146,7 +147,7 @@ public void emptyAllOfReturnsEmptySpecification() { } @Test // GH-1943 - public void emptyAnyOfReturnsEmptySpecification() { + void emptyAnyOfReturnsEmptySpecification() { Specification specification = Specification.anyOf(); @@ -162,7 +163,7 @@ void specificationsShouldBeSerializable() { assertThat(specification).isNotNull(); - @SuppressWarnings({"unchecked", "deprecation"}) + @SuppressWarnings({ "unchecked", "deprecation" }) Specification transferredSpecification = (Specification) deserialize(serialize(specification)); assertThat(transferredSpecification).isNotNull(); @@ -177,7 +178,7 @@ void complexSpecificationsShouldBeSerializable() { assertThat(specification).isNotNull(); - @SuppressWarnings({"unchecked", "deprecation"}) + @SuppressWarnings({ "unchecked", "deprecation" }) Specification transferredSpecification = (Specification) deserialize(serialize(specification)); assertThat(transferredSpecification).isNotNull();