Commit Graph

1825 Commits

Author SHA1 Message Date
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 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
Marcono1234 d7fb0e4a31
Add `NoSuchMethodError` section to troubleshooting guide (#2300)
* Mention exclusion of fields in troubleshooting guide

* Add `NoSuchMethodError` section to troubleshooting guide

* Add missing word
2023-01-15 16:55:46 -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
Marcono1234 4aaf1385db
Improve variable names in user guide (#2290) 2022-12-17 15:30:08 -08:00
Marcono1234 a19d53f535
Replace custom user guide header anchors (#2289)
Looks like GitHub does not support them anymore.
2022-12-17 15:28:14 -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
Alex c33e03b133
build: harden build.yml permissions (#2274)
Signed-off-by: Alex <aleksandrosansan@gmail.com>

Signed-off-by: Alex <aleksandrosansan@gmail.com>
2022-12-08 11:29:50 -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
Johannes Frohnmeyer 188b2beb26
Plz
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-11-24 18:52:42 +01:00
Johannes Frohnmeyer a6fbfdcf21
Plz
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-11-24 18:50:17 +01:00
Johannes Frohnmeyer 26ce5dd19f
Plz
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-11-24 18:48:53 +01:00
Johannes Frohnmeyer 29e5634ce8
Plz
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-11-24 18:46:44 +01:00
Johannes Frohnmeyer b357260039
Plz
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-11-24 18:45:24 +01:00
Johannes Frohnmeyer 2a87b3009d
Plz
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-11-24 18:42:46 +01:00
Johannes Frohnmeyer b48d9bacc9
Plz
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-11-24 18:40:56 +01:00
Johannes Frohnmeyer 9dc1f2d803
Plz
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-11-24 18:34:37 +01:00
Johannes Frohnmeyer ac588f8581
Plz
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-11-24 18:28:39 +01:00
Johannes Frohnmeyer bdba5f3987
Plz
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-11-24 18:26:37 +01:00
Johannes Frohnmeyer 60191c3485
Plz
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-11-24 18:12:11 +01:00
Johannes Frohnmeyer 181e4dc7b9
Plz
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-11-24 18:07:15 +01:00
Johannes Frohnmeyer 5eaa85fffa
11
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-11-24 18:06:23 +01:00
Johannes Frohnmeyer d6ad135e1d
h
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-11-24 18:05:42 +01:00
Johannes Frohnmeyer be62121f65
Bye 2
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-11-24 18:00:33 +01:00
Johannes Frohnmeyer 237f6a7153
Bye
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-11-24 18:00:06 +01:00
Johannes Frohnmeyer 79ae63f02a
Plz 2
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-11-24 17:54:26 +01:00
Johannes Frohnmeyer d6c262b583
Plz
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-11-24 17:49:25 +01:00
Johannes Frohnmeyer 7633b4cf85
Try to shade
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-11-24 17:44:55 +01:00
Johannes Frohnmeyer bf388059a3
Merge remote-tracking branch 'origin/master'
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-11-24 17:33:52 +01:00
dependabot[bot] bc04dd20b9
Bump jackson-databind from 2.14.0 to 2.14.1 (#2241)
Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.14.0 to 2.14.1.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  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>
2022-11-23 08:33:01 -08:00
dependabot[bot] 3f1e62d1e1
Bump japicmp-maven-plugin from 0.16.0 to 0.17.1 (#2238)
Bumps [japicmp-maven-plugin](https://github.com/siom79/japicmp) from 0.16.0 to 0.17.1.
- [Release notes](https://github.com/siom79/japicmp/releases)
- [Changelog](https://github.com/siom79/japicmp/blob/master/release.py)
- [Commits](https://github.com/siom79/japicmp/compare/japicmp-base-0.16.0...japicmp-base-0.17.1)

---
updated-dependencies:
- dependency-name: com.github.siom79.japicmp:japicmp-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-11-17 06:39:01 -08: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
Marcono1234 92b7ae0ca0
Mention in CHANGELOG that GitHub Releases are used in the future (#2230) 2022-11-13 09:08:06 -08:00
dependabot[bot] 94b5310da4
Bump maven-release-plugin from 3.0.0-M6 to 3.0.0-M7 (#2232)
Bumps [maven-release-plugin](https://github.com/apache/maven-release) from 3.0.0-M6 to 3.0.0-M7.
- [Release notes](https://github.com/apache/maven-release/releases)
- [Commits](https://github.com/apache/maven-release/compare/maven-release-3.0.0-M6...maven-release-3.0.0-M7)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-release-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>
2022-11-13 09:07:33 -08:00
dependabot[bot] c995c12b5a
Bump jackson-databind from 2.13.4.2 to 2.14.0 (#2234)
Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.13.4.2 to 2.14.0.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  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-11-13 09:07:11 -08:00
dependabot[bot] b504d0e9ff
Bump os-maven-plugin from 1.7.0 to 1.7.1 (#2235)
Bumps [os-maven-plugin](https://github.com/trustin/os-maven-plugin) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/trustin/os-maven-plugin/releases)
- [Commits](https://github.com/trustin/os-maven-plugin/compare/os-maven-plugin-1.7.0...os-maven-plugin-1.7.1)

---
updated-dependencies:
- dependency-name: kr.motd.maven:os-maven-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>
2022-11-13 09:06:54 -08:00
Johannes Frohnmeyer 40c97cdb6c
Remove github stuff
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-11-03 15:21:36 +01:00