gson-comments/gson
Marcono1234 ba96d53bad
Fix missing bounds checks for JsonTreeReader.getPath() (#2001)
There are situations where the stack of JsonTreeReader contains a JsonArray
or JsonObject without a subsequent Iterator, for example after calling peek()
or nextName().
When JsonTreeReader.getPath() is called afterwards it therefore must not
assume that a JsonArray or JsonObject is always followed by an Iterator.

The only reason why this never caused an ArrayIndexOutOfBoundsException in
the past is because the stack has an even default size (32) so it would just
have read the next `null`.
However, if the stack had for example the default size 31, a user created a
JsonTreeReader for 16 JSON arrays nested inside each other, then called 15
times beginArray(), followed by peek() and getPath() the exception would
occur.
2021-10-25 12:14:41 -07:00
..
src Fix missing bounds checks for JsonTreeReader.getPath() (#2001) 2021-10-25 12:14:41 -07:00
bnd.bnd #1981: Optional OSGi bundle's dependency on sun.misc package (#1993) 2021-10-25 11:32:10 -07:00
build.gradle Fix JPMS module setup (fixes #1315) (#1402) 2018-10-18 08:49:08 -07:00
LICENSE Updating License to contain the full text. 2011-04-12 21:21:39 +00:00
pom.xml Bump bnd-maven-plugin from 5.3.0 to 6.0.0 (#1985) 2021-10-06 17:58:02 -07:00
README Adapt gson/gson/README to match with gson/README.md (#1472) 2019-03-03 11:28:00 -08:00

Gson is a Java library that can be used to convert Java Objects into their 
JSON representation. It can also be used to convert a JSON string to an 
equivalent Java object. Gson can work with arbitrary Java objects including 
pre-existing objects that you do not have source-code of.

Complete Gson documentation is available at its project page 
https://github.com/google/gson