From 121a48408b20427efe6f01b61916572fedbb726d Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Fri, 9 Feb 2024 23:16:52 -0300 Subject: [PATCH] Update AssertUtils.java.ejs --- .../src/test/java/_package_/domain/AssertUtils.java.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generators/java/templates/src/test/java/_package_/domain/AssertUtils.java.ejs b/generators/java/templates/src/test/java/_package_/domain/AssertUtils.java.ejs index aa94a9f35c39..a4483e4f5eaa 100644 --- a/generators/java/templates/src/test/java/_package_/domain/AssertUtils.java.ejs +++ b/generators/java/templates/src/test/java/_package_/domain/AssertUtils.java.ejs @@ -30,10 +30,10 @@ import java.util.function.Consumer; public class AssertUtils { public static Comparator zonedDataTimeSameInstant = (ZonedDateTime e, ZonedDateTime a) -> - Objects.compare(e, a, (e1, a2) -> e1.withZoneSameInstant(ZoneOffset.UTC).compareTo(a2.withZoneSameInstant(ZoneOffset.UTC))); + Comparator.nullsFirst((e1, a2) -> e1.withZoneSameInstant(ZoneOffset.UTC).compareTo(a2.withZoneSameInstant(ZoneOffset.UTC))); public static Comparator bigDecimalCompareTo = (BigDecimal e, BigDecimal a) -> - Objects.compare(e, a, (e1, a2) -> e1.compareTo(a2)); + Comparator.nullsFirst((e1, a2) -> e1.compareTo(a2)); public static Consumer matchUpdateOrOriginal(T update, T current) { return s ->