422c993e99
Fix access
ci/woodpecker/push/woodpecker Pipeline was successful
2023-01-21 14:31:36 +01:00
51157e81e5
Move some stuff around
ci/woodpecker/push/woodpecker Pipeline failed
2023-01-21 14:27:59 +01:00
b6cc63919d
Merge remote-tracking branch 'origin/master'
...
ci/woodpecker/push/woodpecker Pipeline failed
# 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
be87c3fd0e
Port Junit test to Truth in the package com.google.gson
of the module gson
( #2299 )
...
* Add the Truth dependency
* Port Junit test to Truth in the package `com.google.gson` of the module `gson`
* Replace the `assertThat(e.getMessage()).isEqualTo(...)"` with `assertThat(e).hasMessageThat().isEqualTo(...)`
* Minor fixes
2023-01-17 07:59:10 -08:00
dependabot[bot]
21989d7ff8
Bump maven-surefire-plugin from 3.0.0-M7 to 3.0.0-M8 ( #2298 )
...
Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire ) from 3.0.0-M7 to 3.0.0-M8.
- [Release notes](https://github.com/apache/maven-surefire/releases )
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.0.0-M7...surefire-3.0.0-M8 )
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-12 10:59:29 -08:00
Éamonn McManus
3adf2ad748
[maven-release-plugin] prepare for next development iteration
2023-01-06 07:42:33 -08:00
Éamonn McManus
2ce6a6106c
[maven-release-plugin] prepare release gson-parent-2.10.1
2023-01-06 07:42:31 -08: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
Maicol
6c12ded70d
Rewrite the testParsingDatesFormattedWithSystemLocale()
, Fix #2199 ( #2287 )
...
* Rewrite the `testParsingDatesFormattedWithSystemLocale()`, Fix #2199
* Format the test
* Format the code following Google Java Style Guide
* Revert "Format the code following Google Java Style Guide"
This reverts commit f5e2e16b290a4bed09ed7fcc162d4a2529fe4c38.
2022-12-16 11:18:32 -08:00
Marcono1234
f2f53fbe8e
Add troubleshooting guide ( #2285 )
2022-12-15 08:27:16 -08:00
Marcono1234
f63a1b85ae
Remove EOFException special casing of JsonStreamParser.next() ( #2281 )
...
* Remove EOFException special casing of JsonStreamParser.next()
The previous behavior violated the Iterator contract where for
`JsonStreamParser("[")` a call to `hasNext()` would return true,
but `next()` would throw a NoSuchElementException.
* Fix incorrect documented thrown exception type for JsonStreamParser
2022-12-14 08:33:33 -08:00
Maicol
6c3cf22435
Unnecessary unboxing at JsonPrimitive.getAsBoolean() ( #2277 )
2022-12-13 09:33:57 -08:00
Maicol
0a42c31efe
Code cleanup ( #2282 )
...
* Simplify `if` condition in JsonReader.peekNumber()
* Remove `if` to simplify a `return` in Excluder.excludeClassChecks()
* Remove redundant variable in Gson.fromJson()
* equal condition replace by `Objects.equals()` in $Gson$Types.equal()
* equal condition replace by `Objects.equals()` in LinkedTreeMap.equal()
* Replace `switch` with `if` in UtcDateTypeAdapter.read()
* Remove redundant `throws` clause in GraphAdapterBuilder.read()
* Remove redundant `throws` clause in JsonTreeReader.UNREADABLE_READER
* Remove redundant `throws` clause in JsonTreeWriter.UNREADABLE_READER
* Remove unnecessary `.initCause()` call
* Remove redundant cast in TreeTypeAdapter.GsonContextImpl.deserialize
* Replace `StringBuilder` with `String`
* Fix the import and restore the `switch`
* Fix the import
* Add the `util.Objects` import
* Fix indentation
* Add a comment to clarify the condition
* Fix indentation
* Fix imports
* Fix indentation
* Fix indentation
* Fix indentation
2022-12-13 08:50:25 -08:00
Maicol
28affcbdb9
Remove the final
keyword from private
method ( #2276 )
2022-12-09 08:07:35 -08:00
dependabot[bot]
dcbc164cb0
Bump bnd-maven-plugin from 6.3.1 to 6.4.0 ( #2245 )
...
Bumps [bnd-maven-plugin](https://github.com/bndtools/bnd ) from 6.3.1 to 6.4.0.
- [Release notes](https://github.com/bndtools/bnd/releases )
- [Changelog](https://github.com/bndtools/bnd/blob/master/docs/ADDING_RELEASE_DOCS.md )
- [Commits](https://github.com/bndtools/bnd/compare/6.3.1...6.4.0 )
---
updated-dependencies:
- dependency-name: biz.aQute.bnd:bnd-maven-plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-09 08:03:07 -08:00
Maicol
66d934ba44
Remove already covered condition in JsonNull.equals() ( #2271 )
2022-12-06 10:43:08 -08:00
Maicol
c9c8e8f1bc
Fix the javadoc of JsonDeserializer.deserialize() ( #2243 )
2022-12-05 12:59:14 -08:00
Marcono1234
e4c3b653a6
Fix non-threadsafe creation of adapter for type with cyclic dependency ( #1832 )
...
* Fix non-threadsafe creation of adapter for type with cyclic dependency
* Improve handling of broken adapters during Gson.getAdapter(...) call
* Improve test
* Slightly improve implementation and extend tests
* Simplify getAdapter implementation
* Convert GsonTest to JUnit 4 test
* Clarify getAdapter concurrency behavior
2022-12-05 09:10:36 -08:00
Marcono1234
6c27553c83
Improve exception message for duplicate field names ( #2251 )
2022-12-04 17:27:43 -08:00
188b2beb26
Plz
ci/woodpecker/push/woodpecker Pipeline was successful
2022-11-24 18:52:42 +01:00
26ce5dd19f
Plz
ci/woodpecker/push/woodpecker Pipeline failed
2022-11-24 18:48:53 +01:00
29e5634ce8
Plz
ci/woodpecker/push/woodpecker Pipeline failed
2022-11-24 18:46:44 +01:00
b357260039
Plz
ci/woodpecker/push/woodpecker Pipeline failed
2022-11-24 18:45:24 +01:00
2a87b3009d
Plz
ci/woodpecker/push/woodpecker Pipeline failed
2022-11-24 18:42:46 +01:00
b48d9bacc9
Plz
ci/woodpecker/push/woodpecker Pipeline was successful
2022-11-24 18:40:56 +01:00
9dc1f2d803
Plz
ci/woodpecker/push/woodpecker Pipeline was successful
2022-11-24 18:34:37 +01:00
ac588f8581
Plz
ci/woodpecker/push/woodpecker Pipeline failed
2022-11-24 18:28:39 +01:00
bdba5f3987
Plz
ci/woodpecker/push/woodpecker Pipeline failed
2022-11-24 18:26:37 +01:00
181e4dc7b9
Plz
ci/woodpecker/push/woodpecker Pipeline was successful
2022-11-24 18:07:15 +01:00
5eaa85fffa
11
ci/woodpecker/push/woodpecker Pipeline failed
2022-11-24 18:06:23 +01:00
d6ad135e1d
h
ci/woodpecker/push/woodpecker Pipeline failed
2022-11-24 18:05:42 +01:00
d6c262b583
Plz
ci/woodpecker/push/woodpecker Pipeline failed
2022-11-24 17:49:25 +01:00
7633b4cf85
Try to shade
ci/woodpecker/push/woodpecker Pipeline failed
2022-11-24 17:44:55 +01:00
bf388059a3
Merge remote-tracking branch 'origin/master'
ci/woodpecker/push/woodpecker Pipeline was successful
2022-11-24 17:33:52 +01:00
Éamonn McManus
818faeeaa2
Adjust version numbers and a test to conform to the SemVer spec. ( #2237 )
...
* Adjust version numbers and a test to conform to the SemVer spec.
Gson releases since 2.8.0 have been following this spec. We mistakenly released 2.10
without the .0 patch version, and adjusted `GsonVersionDiagnosticsTest` so it would
accept that, as well as the two-digit `10`. Here we make the test no longer accept
versions without a patch number, while still accepting two-digit minor versions of course.
We also change the snapshot version to 2.11.0-SNAPSHOT instead of 2.11-SNAPSHOT.
2022-11-13 15:36:09 -08:00
Doug Hoard
ceb3b8747e
Added JsonObject method isEmpty() ( #2233 )
...
* Added isEmpty()
* Fixed Javadoc typo
* Changed test to use assertTrue() and assertFalse()
2022-11-13 12:58:30 -08:00
9409197165
Merge remote-tracking branch 'origin/master'
...
# Conflicts:
# gson/src/main/java/com/google/gson/stream/JsonReader.java
# gson/src/test/java/com/google/gson/functional/ReflectionAccessFilterTest.java
# gson/src/test/java/com/google/gson/functional/ReflectionAccessTest.java
# gson/src/test/java/com/google/gson/internal/bind/DefaultDateTypeAdapterTest.java
# pom.xml
2022-10-31 12:44:34 +01:00
Marcono1234
ff96296eea
Add 2.10 changes to CHANGELOG; minor release follow-ups ( #2229 )
...
* Add 2.10 changes to CHANGELOG; minor release follow-ups
* Use GitHub URLs in CHANGELOG
GitHub automatically displays them only as short reference with link and
additionally shows a preview when hovering over them.
* Add `id` to pom.xml developer entry
Otherwise BND plugin shows a warning.
* Run unit tests during release preparation
* Move git option before pathspec
2022-10-30 04:01:20 -07:00
Snowhite
dd6635dc61
Making consistent prefixs in PerformanceTest ( #1760 )
...
* Making consistent prefixs in PerformanceTest
change some "disable_" to "disabled_"
* Update PerformanceTest.java
2022-10-29 10:15:43 +02:00
Éamonn McManus
763e69a331
[maven-release-plugin] prepare for next development iteration
2022-10-24 18:06:57 -07:00
Éamonn McManus
dd92e49b27
[maven-release-plugin] prepare release gson-parent-2.10
2022-10-24 18:06:55 -07:00
Éamonn McManus
79c27dd885
[maven-release-plugin] prepare for next development iteration
2022-10-24 17:48:57 -07:00
Éamonn McManus
87e9ee5511
[maven-release-plugin] prepare release gson-parent-2.10
2022-10-24 17:48:55 -07:00
Éamonn McManus
4705518e12
Revise the version regex in GsonVersionDiagnosticsTest
. ( #2228 )
...
Before we can release 2.10 we must support two-digit components.
Additionally, there's no reason to require a patch number (2.10.0 rather than 2.10).
2022-10-24 17:47:38 -07:00
Éamonn McManus
7bca5c4061
[maven-release-plugin] rollback the release of gson-parent-2.10
2022-10-24 17:42:45 -07:00
Éamonn McManus
c7544a0e86
[maven-release-plugin] prepare for next development iteration
2022-10-24 17:33:36 -07:00
Éamonn McManus
9efdfad33c
[maven-release-plugin] prepare release gson-parent-2.10
2022-10-24 17:33:34 -07:00
Marcono1234
4f948dd482
Automatically replace version references on release:prepare
( #2212 )
...
* Automatically replace version references on `release:prepare`
* Specify encoding and improve placeholder replacements
* Add `since $next-version$` for `JsonArray.asList` and `JsonObject.asMap`
2022-10-24 17:26:43 -07:00
Éamonn McManus
9578583eff
Small tweaks to fix Error Prone warnings. ( #2227 )
...
* Small tweaks to fix Error Prone warnings.
* Add another suppression.
2022-10-24 10:28:25 -07:00
Marcono1234
66d9621ce8
Adjust Record adapter and extend test coverage ( #2224 )
...
* Adjust Record adapter and extend test coverage
* Address review feedback
* Make constructor string more concise
* Add tests for Gson default behavior for static fields
* Improve exception for deserializing static final field
Previously it would report "Unexpected IllegalAccessException occurred..."
due to the uncaught IllegalAccessException.
* Improve handling of exception thrown by accessor
Such an exception is not 'unexpected' (which was claimed by the previous
exception handling) because user code could throw it.
* Improve constructor invocation exception handling and add tests
2022-10-22 09:01:56 -07:00