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
openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment Temurin-11.0.13+8 (build 11.0.13+8)
OpenJDK 64-Bit Server VM Temurin-11.0.13+8 (build 11.0.13+8, mixed mode)
Description
EnumMap deserialization fails with ClassCastException:
java.lang.ClassCastException: class java.util.LinkedHashMap cannot be cast to class java.util.EnumMap
The underlying issue is related to #1708, it appears special handling for EnumMap is missing.
(I am a bit surprised that this issue has not been mentioned here anywhere before.)
Gson version
e2e851c
Java / Android version
openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment Temurin-11.0.13+8 (build 11.0.13+8)
OpenJDK 64-Bit Server VM Temurin-11.0.13+8 (build 11.0.13+8, mixed mode)
Description
EnumMap
deserialization fails withClassCastException
:The underlying issue is related to #1708, it appears special handling for
EnumMap
is missing.(I am a bit surprised that this issue has not been mentioned here anywhere before.)
Reproduction steps
Test case:
Exception stack trace
Not really useful because
ClassCastException
occurs in user code.The text was updated successfully, but these errors were encountered: