Skip to content

Commit 3080abc

Browse files
committed
fixed failing tests.
a class used in the tests was converted to records. The problem: It was used in a set and the equals/hashCode implementation of record made all instances the same.
1 parent 093e43c commit 3080abc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spring-data-relational/src/test/java/org/springframework/data/relational/core/conversion/RelationalEntityWriterUnitTests.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,12 @@ public ListContainer(Long id) {
911911
}
912912
}
913913

914-
private record Element(@Id Long id) {
914+
private static class Element {
915+
@Id final Long id;
916+
917+
public Element(Long id) {
918+
this.id = id;
919+
}
915920
}
916921

917922
private record ElementReference(Element element) {

0 commit comments

Comments
 (0)