You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get this error when I use JsonApprovals.verifyAsJson() on an object with a null field of type LocalDateTime:
Cannot invoke "java.time.LocalDateTime.toString()" because "instant" is null
java.lang.NullPointerException: Cannot invoke "java.time.LocalDateTime.toString()" because "instant" is null
at com.spun.util.JsonUtils$LocalDateTimeAdapter.write(JsonUtils.java:115)
at com.spun.util.JsonUtils$LocalDateTimeAdapter.write(JsonUtils.java:110)
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:70)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:196)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:368)
at com.google.gson.Gson.toJson(Gson.java:842)
at com.google.gson.Gson.toJson(Gson.java:812)
at com.google.gson.Gson.toJson(Gson.java:759)
at com.google.gson.Gson.toJson(Gson.java:736)
at com.spun.util.JsonUtils.asJson(JsonUtils.java:53)
at com.spun.util.JsonUtils.asJson(JsonUtils.java:38)
at org.approvaltests.JsonApprovals.verifyAsJson(JsonApprovals.java:46)
at org.approvaltests.JsonApprovals.verifyAsJson(JsonApprovals.java:33)
I tried "regular verification" with Approvals.verify() and it works well. I'd expect both to be consistent.
The text was updated successfully, but these errors were encountered:
I get this error when I use
JsonApprovals.verifyAsJson()
on an object with a null field of typeLocalDateTime
:I tried "regular verification" with
Approvals.verify()
and it works well. I'd expect both to be consistent.The text was updated successfully, but these errors were encountered: