gson-comments/gson
Marcono1234 b0595c595b
Fix failing to serialize Collection or Map with inaccessible constructor (#1902)
* Remove UnsafeReflectionAccessor

Revert #1218

Usage of sun.misc.Unsafe to change internal AccessibleObject.override field
to suppress JPMS warnings goes against the intentions of the JPMS and does not
work anymore in newer versions, see #1540.
Therefore remove it and instead create a descriptive exception when making a
member accessible fails. If necessary users can also still use `java` command
line flags to open external modules.

* Fix failing to serialize Collection or Map with inaccessible constructor

Also remove tests which rely on Java implementation details.

* Don't keep reference to access exception of ConstructorConstructor

This also avoids a confusing stack trace, since the previously caught
exception might have had a complete unrelated stack trace.

* Remove Maven toolchain requirement

* Address review feedback

* Add back test for Security Manager
2021-11-09 07:16:35 -08:00
..
src Fix failing to serialize Collection or Map with inaccessible constructor (#1902) 2021-11-09 07:16:35 -08: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 Fix failing to serialize Collection or Map with inaccessible constructor (#1902) 2021-11-09 07:16:35 -08: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