Johannes Frohnmeyer
89ae8b48c2
Merge remote-tracking branch 'origin/master'
...
ci/woodpecker/push/woodpecker Pipeline was successful
Details
# Conflicts:
# extras/pom.xml
# extras/src/main/java/com/google/gson/graph/GraphAdapterBuilder.java
# extras/src/main/java/com/google/gson/interceptors/InterceptorFactory.java
# extras/src/test/java/com/google/gson/typeadapters/PostConstructAdapterFactoryTest.java
# gson/src/main/java/com/google/gson/Gson.java
# gson/src/main/java/com/google/gson/GsonBuilder.java
# gson/src/main/java/com/google/gson/util/ISO8601Utils.java
# gson/src/main/java/module-info.java
# gson/src/test/java/com/google/gson/GsonTest.java
# gson/src/test/java/com/google/gson/functional/ArrayTest.java
# gson/src/test/java/com/google/gson/functional/CustomTypeAdaptersTest.java
# gson/src/test/java/com/google/gson/functional/DefaultTypeAdaptersTest.java
# gson/src/test/java/com/google/gson/functional/EnumWithObfuscatedTest.java
# gson/src/test/java/com/google/gson/functional/InternationalizationTest.java
# gson/src/test/java/com/google/gson/functional/Java17RecordTest.java
# gson/src/test/java/com/google/gson/functional/JavaUtilConcurrentAtomicTest.java
# gson/src/test/java/com/google/gson/functional/JavaUtilTest.java
# gson/src/test/java/com/google/gson/functional/JsonAdapterAnnotationOnClassesTest.java
# gson/src/test/java/com/google/gson/functional/JsonAdapterAnnotationOnFieldsTest.java
# gson/src/test/java/com/google/gson/functional/JsonParserTest.java
# gson/src/test/java/com/google/gson/functional/MapTest.java
# gson/src/test/java/com/google/gson/functional/PrimitiveTest.java
# gson/src/test/java/com/google/gson/functional/ReflectionAccessTest.java
# gson/src/test/java/com/google/gson/functional/StreamingTypeAdaptersTest.java
# gson/src/test/java/com/google/gson/functional/TypeAdapterPrecedenceTest.java
# gson/src/test/java/com/google/gson/internal/bind/Java17ReflectiveTypeAdapterFactoryTest.java
# gson/src/test/java/com/google/gson/internal/bind/JsonTreeReaderTest.java
# gson/src/test/java/com/google/gson/internal/bind/JsonTreeWriterTest.java
# gson/src/test/java/com/google/gson/internal/reflect/Java17ReflectionHelperTest.java
# gson/src/test/java/com/google/gson/regression/JsonAdapterNullSafeTest.java
# gson/src/test/java/com/google/gson/stream/JsonReaderPathTest.java
# gson/src/test/java/com/google/gson/stream/JsonReaderTest.java
# metrics/pom.xml
# metrics/src/main/java/com/google/gson/metrics/NonUploadingCaliperRunner.java
# metrics/src/main/java/com/google/gson/metrics/ParseBenchmark.java
# pom.xml
# proto/pom.xml
2023-02-23 14:21:42 +01:00
Maicol
49b00d1a86
Port all Junit assert to Truth asserts ( #2304 )
...
* Port Junit assert to Truth in `com.google.gson.stream`
* Port Junit assert to Truth in `com.google.gson.regression`
* Port Junit assert to Truth in `om.google.gson.reflect`
* Port Junit assert to Truth in `com.google.gson.metrics`
* Port Junit assert to Truth in `com.google.gson.internal`
* Port Junit assert to Truth in `com.google.gson.internal.sql`
* Port Junit assert to Truth in `com.google.gson.internal.reflect`
* Port Junit assert to Truth in `com.google.gson.internal.bind`
* Port Junit assert to Truth in `com.google.gson.internal.bind.util`
* Port Junit assert to Truth in `com.google.gson.functional`
* Replaces `List.of` with `Arrays.asList` to grant legacy
* Simplify `==` asserts
* Simplify `.contain()` asserts + Minor fixes
* Simplify asserts
2023-01-31 11:20:54 -08:00
Johannes Frohnmeyer
b6cc63919d
Merge remote-tracking branch 'origin/master'
...
ci/woodpecker/push/woodpecker Pipeline failed
Details
# Conflicts:
# .github/ISSUE_TEMPLATE/bug_report.md
# .github/workflows/build.yml
# extras/pom.xml
# extras/src/main/java/com/google/gson/graph/GraphAdapterBuilder.java
# extras/src/main/java/com/google/gson/typeadapters/UtcDateTypeAdapter.java
# extras/src/test/java/com/google/gson/interceptors/InterceptorTest.java
# extras/src/test/java/com/google/gson/typeadapters/PostConstructAdapterFactoryTest.java
# extras/src/test/java/com/google/gson/typeadapters/RuntimeTypeAdapterFactoryTest.java
# extras/src/test/java/com/google/gson/typeadapters/UtcDateTypeAdapterTest.java
# gson/src/test/java/com/google/gson/CommentsTest.java
# gson/src/test/java/com/google/gson/ToNumberPolicyTest.java
# gson/src/test/java/com/google/gson/functional/EnumWithObfuscatedTest.java
# gson/src/test/java/com/google/gson/functional/JsonParserTest.java
# gson/src/test/java/com/google/gson/functional/LeniencyTest.java
# gson/src/test/java/com/google/gson/functional/MapTest.java
# gson/src/test/java/com/google/gson/functional/PrimitiveCharacterTest.java
# gson/src/test/java/com/google/gson/functional/ReflectionAccessTest.java
# gson/src/test/java/com/google/gson/functional/SecurityTest.java
# gson/src/test/java/com/google/gson/stream/JsonReaderTest.java
# gson/src/test/resources/testcases-proguard.conf
# metrics/pom.xml
# metrics/src/main/java/com/google/gson/metrics/BagOfPrimitives.java
# proto/pom.xml
# proto/src/test/java/com/google/gson/protobuf/functional/ProtosWithAnnotationsTest.java
# proto/src/test/java/com/google/gson/protobuf/functional/ProtosWithComplexAndRepeatedFieldsTest.java
# proto/src/test/java/com/google/gson/protobuf/functional/ProtosWithPrimitiveTypesTest.java
2023-01-21 14:24:25 +01:00
Maicol
1a2170b99c
Port tests from JUnit 3 to JUnit 4 ( #2294 )
...
* Port tests from JUnit 3 to JUnit 4
* Port tests from JUnit 3 to JUnit 4
* Add `@Test` above `@Ignore`
2022-12-22 06:04:16 -08:00
Johannes Frohnmeyer
ce02cb3bc1
Merge remote-tracking branch 'origin/master'
...
# Conflicts:
# gson/pom.xml
# gson/src/main/java/com/google/gson/Gson.java
# gson/src/main/java/com/google/gson/GsonBuilder.java
# gson/src/main/java/com/google/gson/internal/bind/ArrayTypeAdapter.java
# gson/src/main/java/com/google/gson/stream/JsonWriter.java
# gson/src/test/java/com/google/gson/functional/ArrayTest.java
# gson/src/test/java/com/google/gson/functional/MapTest.java
# pom.xml
2022-09-14 19:20:24 +02:00
Marcono1234
f7a164d98b
Fail Maven build on compiler warnings; remove some warning suppressions ( #2183 )
...
* Fail Maven build on compiler warnings; remove some warning suppressions
* Fix compiler warnings causing failure for newer JDK
* Improve placement of "raw" and "unchecked" warning suppressions
* Adjust javac documentation link
* Fix compilation error on newer JDKs
2022-08-26 17:36:18 -07:00
Johannes Frohnmeyer
dc4e61ac7b
Several breaking changes
2022-05-17 21:20:10 +02:00
Marcono1234
4dda4ec5ba
Use diamond operator when creating generic instances ( #2104 )
2022-04-17 15:27:21 -07:00
Marcono1234
49ddab9eeb
Add CodeQL GitHub code scanning workflow ( #2076 )
...
* Add CodeQL GitHub code scanning workflow
* Only compile main sources for code scanning
* Move test .proto files to test sources
`annotations.proto` also seems to be only relevant for tests because the test
explicitly registers them as extensions. By default the Proto adapter does not
consider them.
* Address some code scanning findings
* Fix some more findings
2022-02-17 18:40:40 -08:00
Marcono1234
361292f1c1
Fix warnings
2020-05-09 17:34:53 +02:00
Degubi
7845c38077
Minor cleanups in deprecations and other warnings ( #1522 )
2019-10-03 15:49:24 -07:00
Andrey Mogilev
b1fb9ca9a1
fix issue #1107 : resolve element type in wildcard collection types ( #1146 )
...
* fix issue #1107 : resolve element type in wildcard collection types
* fix Codacy warnings
* fix Codacy warnings
2017-09-21 17:50:41 -07:00
Inderjeet Singh
01944b246b
additional tests for PriorityQueue, Vector and Stack.
2015-11-06 16:16:56 -08:00
Jesse Wilson
90c9eadda1
custom-collections
2011-10-22 19:25:30 +00:00
Inderjeet Singh
31964507c1
Updated SuppressWarnings annotations to Eclipse 3.6/3.7 which is unfortunately incompatible with Eclipse 3.5 (rawtypes vs unchecked)
...
This CL eliminates all eclipse warnings.
2011-10-20 21:32:46 +00:00
Inderjeet Singh
2780a2a9bf
Fixed eclipse warnings.
2011-09-16 06:03:16 +00:00
Joel Leitch
b90b43ea47
A few minor fixes and one incompatible Java 1.6 API call.
2011-09-16 04:55:52 +00:00
Inderjeet Singh
fede584b98
Gson 2.0 converts JSON with type Object.class into something meaningful such as a Collection of primitives or Maps. Updated tests for the new behavior.
...
Changed $Gson$Types.getCollectionElementType to handle wild-card sub-classes of collections and raw collections.
2011-09-09 06:23:17 +00:00
Inderjeet Singh
337d89cf3f
Removed ObjectNavigatorFactory
2011-03-24 20:19:41 +00:00
Inderjeet Singh
005c93e383
removed unused no-args constructors
2011-03-23 18:48:03 +00:00
Jesse Wilson
e96b241556
Test that we can serialize classes whose fields are concrete collections.
2011-03-21 21:49:38 +00:00
Joel Leitch
e57ef0908b
Add method to GsonBuilder to enable complex key serialization of maps.
2011-03-15 15:37:41 +00:00
Joel Leitch
69661216a3
Minor clean-up of warnings (in 1.5) and added new test for non-Empty maps.
2011-02-11 18:22:58 +00:00
Inderjeet Singh
ed838ec104
replaced unchecked suppressed warnings token with more specific rawtypes
2010-08-20 16:20:37 +00:00
Joel Leitch
933a3e5150
Allow serialization of nulls in a "List<Object>" type.
2009-09-29 20:34:35 +00:00
Joel Leitch
8297437610
Reverting r499.
2009-09-23 19:25:50 +00:00
Joel Leitch
c6f762f36b
Fix Warnings
2009-09-23 19:09:01 +00:00
Inderjeet Singh
3b0f8f4340
Removed all the JDK warnings about unused fields in test classes or unused constructors for use by Gson or instanceof calls on parameterized types.
2009-09-23 17:45:16 +00:00
Joel Leitch
18b301dfeb
- Serializing of Object arrays.
...
- Fixed incorrect warning
2009-09-22 19:04:27 +00:00
Inderjeet Singh
82771f006c
removed Java 1.5 warnings
2009-08-31 17:51:47 +00:00
Inderjeet Singh
e340801d25
Moved enum-related tests under EnumTest class.
2009-03-30 18:36:55 +00:00
Inderjeet Singh
a595032a90
Fixed issue 100 by adding support for deserialization of collections of elements that do not implement Comparable.
2009-03-12 01:59:48 +00:00
Joel Leitch
fc65667d2f
Add support for wildcard type on Maps, Collections and other parameterized types.
2008-12-14 07:12:04 +00:00
Joel Leitch
2250afe825
Allow serialization of Object in collections. This used to be supported before restructuring the Collection type handling.
2008-11-20 01:06:21 +00:00
Inderjeet Singh
9245bebdba
For the Collection and Map types, using ObjectConstructor to create instance instead of hard-coding a specific type.
...
This helps is handling cases where the user is using their own subclass of Collection or Map.
Updated ParameterizedTypeHandlerMap to return the handler corresponding to Map and Collection for subclasses if user has not specified a specific handler.
Fixed the logic in JsonTreeNavigator to not output a comma if the first field of an object was null.
2008-11-14 02:11:46 +00:00
Inderjeet Singh
745c8e2a83
Fixed issue 58 by disabling the use of field value actual type for all cases
...
except when it is marked as Object.
2008-10-14 18:55:59 +00:00
Inderjeet Singh
57d1f32de5
moved gson as a project under trunk
2008-09-01 03:13:32 +00:00