Классы с полями типа SortedSet не отображаются в изменениях.
class TestClass{
String id;
Set<String> set;
SortedSet<String> sortedSet;
}
private void runTest(){
Javers javers = JaversBuilder
.javers()
.withListCompareAlgorithm(ListCompareAlgorithm.LEVENSHTEIN_DISTANCE)
.registerEntity(new EntityDefinition(TestClass.class, "id"))
.build();
TestClass tc1 = new TestClass();
tc1.id = "1";
tc1.set = new HashSet<>(Collections.singletonList("StringInSet1"));
tc1.sortedSet = new TreeSet<>(Collections.singletonList("StringInSortedSet1"));
TestClass tc2 = new TestClass();
tc2.id = "1";
tc2.set = new HashSet<>(Collections.singletonList("StringInSet2"));
tc2.sortedSet = new TreeSet<>(Collections.singletonList("StringInSortedSet2"));
Diff diff = javers.compare(tc1, tc2);
System.out.println(diff.changesSummary());
}
Фактический результат: изменения - SetChange: 1 Ожидаемый результат: изменения - SetChange: 2