Commit Graph

3 Commits

Author SHA1 Message Date
Maicol 742fd50ff7
Fix error prone warns (#2319)
* Adds a javadoc summary to the methods in the `SerializedName` annotation

Fixes the `MissingSummary` warn given by ErrorProne

* Adds a javadoc summary to the methods of the `ExclusionStrategy` annotation

 Fixes the `MissingSummary` warn given by ErrorProne

* Adds a javadoc summary to `getDeclaringClass()` and `getName()` methods of the `FieldAttributes` class

 Fixes the `MissingSummary` warn given by ErrorProne

* Adds a javadoc summary to `getMajorJavaVersion()` and `isJava9OrLater()` methods of the `JavaVersion` class

 Fixes the `MissingSummary` warn given by ErrorProne

* Adds a comment in the empty catch block of the `AccessChecker:101` class

 Fixes the `EmptyCatch` warn given by ErrorProne

* Adds a comment in the empty catch block of the `DefaultDateTypeAdapter:158` class

 Fixes the `EmptyCatch` warn given by ErrorProne

* Adds a comment in the empty catch blocks of the `UnsafeAllocator:(67|92|113)` class

 Fixes the `EmptyCatch` warn given by ErrorProne

* Adds a comment in the empty catch block of the `DateTypeAdapter:85` class

 Fixes the `EmptyCatch` warn given by ErrorProne

* Fixes javadoc param of the `deserialize(...)` method of the `JsonDeserializer` interface

 Fixes the `InvalidParam` warn given by ErrorProne

* Adds a charset `StandardCharsets.UTF_8` in the `resourceToString()` method of the `ParseBenchmark` class

Fixes the `DefaultCharset` warn given by ErrorProne

* Fixes a typo

* Implements review feedback

* Adds blank line before @ tag.
2023-02-17 09:58:16 -08:00
Éamonn McManus 0d22e5d205
Add copyright notices to files that were missing them. (#2307)
In each case the copyright year is the year in which the file was first added.
2023-01-31 14:05:12 -08:00
Marcono1234 e82637c485
Add support for reflection access filter (#1905)
* Add support for reflection access filter

* Improve documentation

* Fix compilation errors

* Relax handling for BLOCK_ALL when invoking default constructor

* Improve handling for inherited fields

* Fix accessible test failing for static fields

* Simplify ReflectiveTypeAdapterFactory field writing

* Fix GsonBuilder changes affecting created Gson instances

* Improve documentation

* Improve handling for IllegalAccessException

For Java < 9, AccessibleObject.canAccess is not available and therefore checks
might pass even if object is not accessible, causing IllegalAccessException
later.

* Fix incorrect GsonBuilder.addReflectionAccessFilter documentation
2022-04-17 09:05:18 -07:00