Sourced from com.google.code.gson:gson's releases.
Gson 2.13.0
What's Changed
A bug in deserializing collections has been fixed. Previously, if you did something like this:
gson.fromJson(jsonString, new TypeToken<ImmutableList<String>>() {})then the inferred type would be
ImmutableList<String>, but Gson actually gave you anArrayList<String>. Usually that would lead to an immediateClassCastException, but in some circumstances the code might sometimes succeed despite the wrong type. Now you will see an exception like this:com.google.gson.JsonIOException: Abstract classes can't be instantiated! Adjust the R8 configuration or register an InstanceCreator or a TypeAdapter for this type. Class name: com.google.common.collect.ImmutableListbecause Gson now really is trying to create an
ImmutableListthrough its constructor, but that isn't possible. Either change the requested type (in theTypeToken) toList<String>, or register aTypeAdapterorJsonDeserializerforImmutableList.The internal classes
$Gson$Typesand$Gson$Preconditionshave been renamed to remove the$characters. Since these are internal classes (as signaled not only by the package name but by the$characters), client code should not be affected. If your code was depending on these classes then we suggest making a copy of the class (subject to the license) rather than depending on the new names.Full Changelog: https://github.com/google/gson/compare/gson-parent-2.12.1...gson-parent-2.13.0
bfe0fd5
[maven-release-plugin] prepare release gson-parent-2.13.06ed64ca
add multi-catch support to the code base (#2841)0074376
Bump the maven group with 3 updates (#2840)45e5e14
Rename $Gson$Preconditions and $Gson$Types.
(#2838)c6d4425
Remove obsolete comment in pom.xml (#2835)9afd6f8
Bump the maven group with 10 updates (#2831)ad5371e
Fix findings that are new with the latest Error Prone. (#2834)de190d7
Restructure code to avoid assignment expression warning. (#2833)3d66847
Bump the github-actions group with 3 updates (#2832)2549ba9
Fix ConstructorConstructor creating mismatching Collection and Map
instances ...