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
{{ message }}
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.
Gson serializes and deserializes dates based on locale.
This can cause issues like the following stacktrace.
We should change the default settings in Gson but upgrading may require a custom type adapter.
com.google.gson.JsonSyntaxException: Jan 6, 2020, 9:39:24 AM
at com.google.gson.internal.bind.DateTypeAdapter.deserializeToDate(DateTypeAdapter.java:74) ~[spigot.jar:git-Spigot-1a3504a-84f3da3]
at com.google.gson.internal.bind.DateTypeAdapter.read(DateTypeAdapter.java:59) ~[spigot.jar:git-Spigot-1a3504a-84f3da3]
at com.google.gson.internal.bind.DateTypeAdapter.read(DateTypeAdapter.java:41) ~[spigot.jar:git-Spigot-1a3504a-84f3da3]
at com.google.gson.internal.bind.TypeAdapters$26$1.read(TypeAdapters.java:598) ~[spigot.jar:git-Spigot-1a3504a-84f3da3]
at com.google.gson.internal.bind.TypeAdapters$26$1.read(TypeAdapters.java:596) ~[spigot.jar:git-Spigot-1a3504a-84f3da3]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) ~[spigot.jar:git-Spigot-1a3504a-84f3da3]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) ~[spigot.jar:git-Spigot-1a3504a-84f3da3]
at com.google.gson.Gson.fromJson(Gson.java:887) ~[spigot.jar:git-Spigot-1a3504a-84f3da3]
at com.google.gson.Gson.fromJson(Gson.java:952) ~[spigot.jar:git-Spigot-1a3504a-84f3da3]
at de.dytanic.cloudnet.lib.utility.document.Document.getObject(Document.java:423) ~[CloudNetAPI.jar:2.1.17]
at de.dytanic.cloudnet.api.network.packet.in.PacketInLogoutPlayer.handleInput(PacketInLogoutPlayer.java:25) ~[CloudNetAPI.jar:2.1.17]
at de.dytanic.cloudnet.lib.network.protocol.packet.PacketManager$2.run(PacketManager.java:99) ~[CloudNetAPI.jar:2.1.17]
at de.dytanic.cloudnet.lib.network.protocol.packet.PacketManager$2.run(PacketManager.java:92) ~[CloudNetAPI.jar:2.1.17]
at de.dytanic.cloudnet.lib.utility.CollectionWrapper.iterator(CollectionWrapper.java:61) ~[CloudNetAPI.jar:2.1.17]
at de.dytanic.cloudnet.lib.network.protocol.packet.PacketManager.dispatchPacket(PacketManager.java:92) ~[CloudNetAPI.jar:2.1.17]
at de.dytanic.cloudnet.lib.network.NetDispatcher$1.run(NetDispatcher.java:66) ~[CloudNetAPI.jar:2.1.17]
at de.dytanic.cloudnet.lib.scheduler.TaskScheduler$VoidTaskEntry$1.call(TaskScheduler.java:585) ~[CloudNetAPI.jar:2.1.17]
at de.dytanic.cloudnet.lib.scheduler.TaskScheduler$VoidTaskEntry$1.call(TaskScheduler.java:579) ~[CloudNetAPI.jar:2.1.17]
at de.dytanic.cloudnet.lib.scheduler.TaskEntry.invoke(TaskEntry.java:33) ~[CloudNetAPI.jar:2.1.17]
at de.dytanic.cloudnet.lib.scheduler.TaskScheduler$Worker.execute(TaskScheduler.java:527) [CloudNetAPI.jar:2.1.17]
at de.dytanic.cloudnet.lib.scheduler.TaskScheduler$Worker.run(TaskScheduler.java:490) [CloudNetAPI.jar:2.1.17]
Caused by: java.text.ParseException: Failed to parse date ["Jan 6, 2020, 9:39:24 AM']: Invalid number: Jan
at com.google.gson.internal.bind.util.ISO8601Utils.parse(ISO8601Utils.java:274) ~[spigot.jar:git-Spigot-1a3504a-84f3da3]
at com.google.gson.internal.bind.DateTypeAdapter.deserializeToDate(DateTypeAdapter.java:72) ~[spigot.jar:git-Spigot-1a3504a-84f3da3]
... 20 more
Caused by: java.lang.NumberFormatException: Invalid number: Jan
at com.google.gson.internal.bind.util.ISO8601Utils.parseInt(ISO8601Utils.java:311) ~[spigot.jar:git-Spigot-1a3504a-84f3da3]
at com.google.gson.internal.bind.util.ISO8601Utils.parse(ISO8601Utils.java:129) ~[spigot.jar:git-Spigot-1a3504a-84f3da3]
at com.google.gson.internal.bind.DateTypeAdapter.deserializeToDate(DateTypeAdapter.java:72) ~[spigot.jar:git-Spigot-1a3504a-84f3da3]
... 20 more
The text was updated successfully, but these errors were encountered:
Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.87. Please mark this comment with 👍 or 👎 to give our bot feedback!
Gson serializes and deserializes dates based on locale.
This can cause issues like the following stacktrace.
We should change the default settings in Gson but upgrading may require a custom type adapter.
The text was updated successfully, but these errors were encountered: