Skip to content

Commit 600180d

Browse files
quaffmp911de
authored andcommitted
Polishing.
Add missing `@FunctionalInterface` to Specification interfaces. `SpecificationUnitTests` shouldn't be `Serializable`. Closes #3452
1 parent b5aa7de commit 600180d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/PredicateSpecification.java

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
* @author Mark Paluch
4141
* @since 4.0
4242
*/
43+
@FunctionalInterface
4344
public interface PredicateSpecification<T> extends Serializable {
4445

4546
/**

spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void specificationsShouldBeSerializable() {
8888

8989
assertThat(specification).isNotNull();
9090

91-
@SuppressWarnings({ "unchecked", "deprecation" })
91+
@SuppressWarnings({ "unchecked", "deprecation"})
9292
Specification<Object> transferredSpecification = (Specification<Object>) deserialize(serialize(specification));
9393

9494
assertThat(transferredSpecification).isNotNull();
@@ -103,7 +103,7 @@ void complexSpecificationsShouldBeSerializable() {
103103

104104
assertThat(specification).isNotNull();
105105

106-
@SuppressWarnings({ "unchecked", "deprecation" })
106+
@SuppressWarnings({ "unchecked", "deprecation"})
107107
Specification<Object> transferredSpecification = (Specification<Object>) deserialize(serialize(specification));
108108

109109
assertThat(transferredSpecification).isNotNull();

0 commit comments

Comments
 (0)