Commit Graph

1920 Commits

Author SHA1 Message Date
Marcono1234
08174e2019
Perform minor code clean-up (#2544)
* Perform minor code clean-up

Notable changes:
- Replace most usages of `<code>` with `{@code ...}` in Javadoc
- Add proper summary sentence to `GsonBuilder.enableComplexMapKeySerialization`
- Extend documentation for `GsonBuilder.setDateFormat` methods
- Fix `TypeToken.isAssignableFrom(Type)` throwing AssertionError in some cases
  Maybe the method should not throw an exception in the first place, but it
  might not matter much since it is deprecated already anyway.
- Remove outdated `throws NumberFormatException` from internal
  `JsonReader.nextQuotedValue`; the behavior had been changed by
  85ebaf7c35
- Fix incorrect documentation on JsonScope fields
- Fix unit tests having 'expected' and 'actual' switched
- Use dedicated Truth methods instead of `isTrue()` / `isFalse()`
- Use common helper methods in JsonWriterTest to avoid duplication

* Implement `toString()` for ReflectionAccessFilter constants

* Address most of the review comments

* Add comment about `source.scm.tag=HEAD` warning

Actually it looks like the warning is not actually caused by usage of
`HEAD` as value, but rather because the project has a snapshot version
during development (which is expected though), see
https://github.com/apache/maven-artifact-plugin/blob/maven-artifact-plugin-3.5.0/src/main/java/org/apache/maven/plugins/artifact/buildinfo/BuildInfoWriter.java#L140

But this is not a problem either since during release a non-snapshot
version is used.
2023-11-19 09:01:19 -08:00
Marcono1234
6684726476
Validate GsonBuilder.setDateFormat style arguments & extend tests (#2545)
`DateFormat` validates these arguments as well, but it is currently not
documented, see https://bugs.openjdk.org/browse/JDK-8319628.

Also moves the other tests for `setDateFormat(String)` from
DefaultTypeAdaptersTest to GsonBuilderTest.
2023-11-18 14:09:25 -08:00
Marcono1234
b7c3e1d0b8
Make Maven build reproducible (#2543)
However, it might still be necessary to use the same OS and JDK version
to actually be able to create identical artifacts.

This commit also formats the `pom.xml` files in the way the Maven Release
Plugin would.
2023-11-18 12:17:40 -08:00
Carpe-Wang
335ff0f9ae
validating the date format, add test case, since NumberFormatExceptio… (#2538)
* validating the date format, add test case, since NumberFormatException extends IllegalArgumentException, it is only necessary to write IllegalArgumentException.

* Apply code formatting with Spotless

---------

Co-authored-by: Carpe-Wang <wangcarpe@126.com>
2023-11-18 10:36:53 -08:00
dependabot[bot]
bf572581b9
Bump org.codehaus.mojo:exec-maven-plugin from 3.1.0 to 3.1.1 (#2542)
Bumps [org.codehaus.mojo:exec-maven-plugin](https://github.com/mojohaus/exec-maven-plugin) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/mojohaus/exec-maven-plugin/releases)
- [Commits](https://github.com/mojohaus/exec-maven-plugin/compare/exec-maven-plugin-3.1.0...3.1.1)

---
updated-dependencies:
- dependency-name: org.codehaus.mojo:exec-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-17 06:06:11 -08:00
dependabot[bot]
ed9f53f285
Bump com.fasterxml.jackson.core:jackson-databind from 2.15.3 to 2.16.0 (#2541)
Bumps [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson) from 2.15.3 to 2.16.0.
- [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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-16 09:05:07 -08:00
Marcono1234
c7c645db2f
Formatting follow-up (#2540)
* Formatting follow-up

- Adds formatting commits to .git-blame-ignore-revs so that they don't
  distract during Git blame
- Restores hard line breaks in Troubleshooting.md using `\` instead of
  trailing spaces
- Changes formatting of some string literals and comments
- Fixes accidental Javadoc and comment issues introduced by manual changes
  of formatting commit
- Fixes license header in $Gson$Types.java erroneously being a Javadoc
  comment and being reformatted
- Slightly changes `JsonReader` `getPath` and `getPreviousPath` documentation
  to help Javadoc detect first sentence as summary

* Remove `spotless:off` markers

* Add empty line before comment

* Check format for .github YAML files
2023-11-14 15:09:54 -08:00
Maicol
d58e2c9382
Add spotless plugin (#2537)
* Adds the `spotless` plugin

* Excludes `Java17` files

Excludes:
- Java17RecordTest.java
- Java17RecordReflectionTest.java

* Fixes formatting in `pom.xml`
2023-11-13 08:27:44 -08:00
Maicol
c2a0e4634a
Updates the line separator from CRLF to LF (#2536) 2023-11-10 12:36:42 -08:00
dependabot[bot]
ad7b6a85d6
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.1 to 3.2.2 (#2533)
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.1...surefire-3.2.2)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Éamonn McManus <emcmanus@google.com>
2023-11-07 09:11:55 -08:00
dependabot[bot]
d5952fe565
Bump org.apache.maven.plugins:maven-failsafe-plugin from 3.2.1 to 3.2.2 (#2534)
Bumps [org.apache.maven.plugins:maven-failsafe-plugin](https://github.com/apache/maven-surefire) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.1...surefire-3.2.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-failsafe-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Éamonn McManus <emcmanus@google.com>
2023-11-07 08:37:05 -08:00
dependabot[bot]
2c8bdd27c4
Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.6.0 to 3.6.2 (#2535)
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.6.0 to 3.6.2.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.6.0...maven-javadoc-plugin-3.6.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-07 08:15:56 -08:00
Éamonn McManus
5bfa7fc5ac
Restore hard line breaks in README.md. (#2532)
They were previously using the terrible convention of two spaces at the
end of a line signaling a hard break. The change here uses the
alternative syntax of a final backslash, which can actually be seen.
2023-11-06 14:45:56 -08:00
Maicol
2c94c757a6
Formats codebase (#2531)
* Formats `.java` files

* Formats `.md` files
2023-11-06 11:59:01 -08:00
dependabot[bot]
cb6643f148
Bump org.codehaus.mojo:templating-maven-plugin from 1.0.0 to 3.0.0 (#2527)
Bumps [org.codehaus.mojo:templating-maven-plugin](https://github.com/mojohaus/templating-maven-plugin) from 1.0.0 to 3.0.0.
- [Release notes](https://github.com/mojohaus/templating-maven-plugin/releases)
- [Commits](https://github.com/mojohaus/templating-maven-plugin/compare/templating-maven-plugin-1.0.0...3.0.0)

---
updated-dependencies:
- dependency-name: org.codehaus.mojo:templating-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Éamonn McManus <emcmanus@google.com>
2023-11-06 09:18:59 -08:00
dependabot[bot]
61b9806278
Bump com.github.siom79.japicmp:japicmp-maven-plugin (#2525)
Bumps [com.github.siom79.japicmp:japicmp-maven-plugin](https://github.com/siom79/japicmp) from 0.18.2 to 0.18.3.
- [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.18.2...japicmp-base-0.18.3)

---
updated-dependencies:
- dependency-name: com.github.siom79.japicmp:japicmp-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Éamonn McManus <emcmanus@google.com>
2023-11-06 07:37:44 -08:00
dependabot[bot]
d9efc1596d
Bump org.moditect:moditect-maven-plugin from 1.0.0.Final to 1.1.0 (#2526)
Bumps [org.moditect:moditect-maven-plugin](https://github.com/moditect/moditect) from 1.0.0.Final to 1.1.0.
- [Release notes](https://github.com/moditect/moditect/releases)
- [Commits](https://github.com/moditect/moditect/compare/1.0.0.Final...1.1.0)

---
updated-dependencies:
- dependency-name: org.moditect:moditect-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-06 07:32:43 -08:00
dependabot[bot]
41e97e3f6a
Bump org.junit.jupiter:junit-jupiter from 5.10.0 to 5.10.1 (#2528)
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.0 to 5.10.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.0...r5.10.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-06 07:24:00 -08:00
dependabot[bot]
e685705b2b
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.1.2 to 3.2.1 (#2518)
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.1.2 to 3.2.1.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.1.2...surefire-3.2.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 09:54:41 -07:00
dependabot[bot]
9f1c0f3d4f
Bump org.apache.maven.plugins:maven-failsafe-plugin from 3.1.2 to 3.2.1 (#2519)
Bumps [org.apache.maven.plugins:maven-failsafe-plugin](https://github.com/apache/maven-surefire) from 3.1.2 to 3.2.1.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.1.2...surefire-3.2.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-failsafe-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 09:35:50 -07:00
Marcono1234
6a9d240f78
Add limits when deserializing BigDecimal and BigInteger (#2510)
* Add limits when deserializing `BigDecimal` and `BigInteger`

* Use assertThrows

* Don't check number limits in JsonReader
2023-10-23 13:51:29 -07:00
dependabot[bot]
802476adc1
Bump org.graalvm.buildtools:native-maven-plugin from 0.9.27 to 0.9.28 (#2517)
Bumps [org.graalvm.buildtools:native-maven-plugin](https://github.com/graalvm/native-build-tools) from 0.9.27 to 0.9.28.
- [Release notes](https://github.com/graalvm/native-build-tools/releases)
- [Commits](https://github.com/graalvm/native-build-tools/compare/0.9.27...0.9.28)

---
updated-dependencies:
- dependency-name: org.graalvm.buildtools:native-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 13:47:58 -07:00
dependabot[bot]
2de2d56484
Bump com.google.errorprone:error_prone_core from 2.22.0 to 2.23.0 (#2513)
Bumps [com.google.errorprone:error_prone_core](https://github.com/google/error-prone) from 2.22.0 to 2.23.0.
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.22.0...v2.23.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-19 17:47:27 -07:00
dependabot[bot]
e915b2e44c
Bump com.google.errorprone:error_prone_annotations from 2.22.0 to 2.23.0 (#2514)
Bumps [com.google.errorprone:error_prone_annotations](https://github.com/google/error-prone) from 2.22.0 to 2.23.0.
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.22.0...v2.23.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-19 17:46:25 -07:00
dependabot[bot]
7b5b8cfb33
Bump com.github.siom79.japicmp:japicmp-maven-plugin (#2515)
Bumps [com.github.siom79.japicmp:japicmp-maven-plugin](https://github.com/siom79/japicmp) from 0.18.1 to 0.18.2.
- [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.18.1...japicmp-base-0.18.2)

---
updated-dependencies:
- dependency-name: com.github.siom79.japicmp:japicmp-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-19 17:45:59 -07:00
Marcono1234
bd361f6d9b
Remove obsolete Native Maven Plugin plugin dependency (#2512)
Plugin had been updated to a newer version without this bug in the meantime.
2023-10-16 14:53:14 -07:00
dependabot[bot]
ce7a6101b1
Bump com.fasterxml.jackson.core:jackson-databind from 2.15.2 to 2.15.3 (#2511)
Bumps [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson) from 2.15.2 to 2.15.3.
- [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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-13 07:50:28 -07:00
dependabot[bot]
6f79800d26
Bump com.google.guava:guava-testlib from 32.1.2-jre to 32.1.3-jre (#2509)
Bumps [com.google.guava:guava-testlib](https://github.com/google/guava) from 32.1.2-jre to 32.1.3-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava-testlib
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-11 07:30:27 -07:00
dependabot[bot]
1bba75c86a
Bump com.google.guava:guava from 32.1.2-jre to 32.1.3-jre (#2508)
Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.1.2-jre to 32.1.3-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-11 07:29:58 -07:00
Marcono1234
df01e943e5
Improve formatting (#2505)
* Improve formatting

* Move `&&` to start of line
2023-10-03 09:56:07 -07:00
SP
0109f45129
issue#2436: Throw exception when registering adapter for Object or JsonElement (#2479)
* Code changes and tests for #2436 to throw exception when trying to register adapter for Object or JsonElement

* #2436 - Updates to User guide & comments to indicate exception cases and fix for 7 test cases of Parameterized Type

* #2436 - Fixes as per the review comments.

* #2436 - Refactored as per latest review comments + throwing error message.

* #2436 - added a clarifying comment in a positive test case.

* #2436 - formatting and minor changes as per review.

* Update gson/src/main/java/com/google/gson/GsonBuilder.java

Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>

* Update gson/src/test/java/com/google/gson/GsonBuilderTest.java

Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>

* Update gson/src/test/java/com/google/gson/GsonBuilderTest.java

Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>

---------

Co-authored-by: Sachin Patil <sachin.patil2@capitalone.com>
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
2023-10-03 07:29:54 -07:00
dependabot[bot]
4dfae77af3
Bump com.github.siom79.japicmp:japicmp-maven-plugin (#2504)
Bumps [com.github.siom79.japicmp:japicmp-maven-plugin](https://github.com/siom79/japicmp) from 0.18.0 to 0.18.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.18.0...japicmp-base-0.18.1)

---
updated-dependencies:
- dependency-name: com.github.siom79.japicmp:japicmp-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 10:52:48 -07:00
Marcono1234
e7cf5c4583
Only create one BoundField instance per field in ReflectiveTypeAdapterFactory (#2440)
* Only create one BoundField instance per field in ReflectiveTypeAdapterFactory

Instead of creating a BoundField for every possible name of a field (for
SerializedName usage) and then storing for that BoundField whether it is
serialized or deserialized, instead only create one BoundField and then have
a separate Map<String, BoundField> for deserialized fields, and a separate
List<BoundField> for serialized fields.

* Fix indentation
2023-09-30 13:23:31 -07:00
Éamonn McManus
45acc4db42
Suppress serialization warnings. (#2502)
Recent versions of javac emit a warning if a serializable class has
a non-transient instance field with a declared type that does not
inherit `Serializable`. In this context, we know that the actual
values will always be serializable.
2023-09-30 12:41:04 -07:00
dependabot[bot]
98077053f6
Bump com.github.siom79.japicmp:japicmp-maven-plugin (#2499)
Bumps [com.github.siom79.japicmp:japicmp-maven-plugin](https://github.com/siom79/japicmp) from 0.17.3 to 0.18.0.
- [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.17.3...japicmp-base-0.18.0)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-25 09:37:56 -07:00
dependabot[bot]
08c514c0f6
Bump org.apache.maven.plugins:maven-shade-plugin from 3.5.0 to 3.5.1 (#2500)
Bumps [org.apache.maven.plugins:maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.5.0...maven-shade-plugin-3.5.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-shade-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-25 09:37:11 -07:00
Marcono1234
ff401f1545
Remove obsolete Error Prone warning suppressions (#2497)
The latest Error Prone version fixed a bug which makes these
suppressions obsolete.
2023-09-23 08:33:09 -07:00
dependabot[bot]
8756189a14
Bump com.google.errorprone:error_prone_annotations from 2.21.1 to 2.22.0 (#2493)
Bumps [com.google.errorprone:error_prone_annotations](https://github.com/google/error-prone) from 2.21.1 to 2.22.0.
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.21.1...v2.22.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-22 17:50:33 -07:00
dependabot[bot]
6262b1fe1b
Bump com.google.errorprone:error_prone_core from 2.21.1 to 2.22.0 (#2492)
Bumps [com.google.errorprone:error_prone_core](https://github.com/google/error-prone) from 2.21.1 to 2.22.0.
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.21.1...v2.22.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-22 17:47:14 -07:00
Éamonn McManus
edfaf0c387
Add clarifying parentheses to a ternary expression. (#2496)
The latest Error Prone version issues a warning without the parentheses.
Since we build with `-Werror`, that breaks the build.
2023-09-22 17:43:14 -07:00
Marcono1234
e93fda9f17
Fix typos and improve Gson Design Document formatting (#2491)
* Fix typos and grammar issues

Most of them were found by IntelliJ

* Improve formatting and fix typos in Gson Design Document
2023-09-20 15:44:15 -07:00
dependabot[bot]
78e4bdaede
Bump org.graalvm.buildtools:native-maven-plugin from 0.9.26 to 0.9.27 (#2489)
Bumps [org.graalvm.buildtools:native-maven-plugin](https://github.com/graalvm/native-build-tools) from 0.9.26 to 0.9.27.
- [Release notes](https://github.com/graalvm/native-build-tools/releases)
- [Commits](https://github.com/graalvm/native-build-tools/commits)

---
updated-dependencies:
- dependency-name: org.graalvm.buildtools:native-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 16:52:57 -07:00
dependabot[bot]
40bc86ef17
Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.5.0 to 3.6.0 (#2490)
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.5.0...maven-javadoc-plugin-3.6.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 16:52:36 -07:00
dependabot[bot]
dda176cf80
Bump org.apache.maven.plugins:maven-enforcer-plugin from 3.4.0 to 3.4.1 (#2487)
Bumps [org.apache.maven.plugins:maven-enforcer-plugin](https://github.com/apache/maven-enforcer) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/apache/maven-enforcer/releases)
- [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.4.0...enforcer-3.4.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-enforcer-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 07:36:57 -07:00
dependabot[bot]
27d1a66acf
Bump org.graalvm.buildtools:native-maven-plugin from 0.9.25 to 0.9.26 (#2486)
Bumps [org.graalvm.buildtools:native-maven-plugin](https://github.com/graalvm/native-build-tools) from 0.9.25 to 0.9.26.
- [Release notes](https://github.com/graalvm/native-build-tools/releases)
- [Commits](https://github.com/graalvm/native-build-tools/compare/0.9.25...0.9.26)

---
updated-dependencies:
- dependency-name: org.graalvm.buildtools:native-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-08 07:39:57 -07:00
Samuel Freilich
ad5cd31498
Add shrinker-test examples with never-referenced constructors (#2478)
* Add shrinker-test examples with never-referenced constructors

R8 can do some optimizations that assume values of types whose
constructors are never referenced are `null`. (A bit confused why
the rules here are sufficient to avoid that optimization in the
case of a class whose sole constructor has arguments and is
unreferenced, since the keep rule only refers to `<init>()` instead
of `<init>(...)`. Does R8 have special behavior for `<init>()` where
attempting to keep that makes it assume a class is constructable even
if it doesn't have a no-args constructor?)

Also rename some test classes/names to refer to `NoArgs` instead of
`Default` constructors. The examples here care about whether a
no-argument constructor is present. While a no-argument
constructor (explicitly defined or not) is used by default in some
circumstances, the Java documentation consistently uses "default
constructor" to refer only to constructors whose implementation is
implicitly provided by the complier (all default constructors are
no-argument constructors, but not vice versa).

* Update shrinker-test/src/main/java/com/example/ClassWithNoArgsConstructor.java

Accept review suggestion

Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>

* Update shrinker-test/src/main/java/com/example/NoSerializedNameMain.java

Accept review suggestion

Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>

* Further adjust test class/method names for consistency

* Update shrinker-test/src/main/java/com/example/NoSerializedNameMain.java

Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>

---------

Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
2023-09-05 06:47:54 -07:00
dependabot[bot]
4654f5906c
Bump com.github.siom79.japicmp:japicmp-maven-plugin (#2484)
Bumps [com.github.siom79.japicmp:japicmp-maven-plugin](https://github.com/siom79/japicmp) from 0.17.2 to 0.17.3.
- [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.17.2...japicmp-base-0.17.3)

---
updated-dependencies:
- dependency-name: com.github.siom79.japicmp:japicmp-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 13:56:15 -07:00
Marcono1234
70bda4b9c9
Throw exception when calling JsonWriter.name outside JSON object (#2476)
Previous fix in 392cc65ff3 only covered writing
name as top level value, but not when trying to write name inside JSON array.

Removed `stackSize == 0` check from `JsonWriter.name` because that is done
already by `peek()` call.
2023-08-29 08:41:06 -07:00
dependabot[bot]
ddc76ea4cc
Bump org.graalvm.buildtools:native-maven-plugin from 0.9.24 to 0.9.25 (#2482)
Bumps [org.graalvm.buildtools:native-maven-plugin](https://github.com/graalvm/native-build-tools) from 0.9.24 to 0.9.25.
- [Release notes](https://github.com/graalvm/native-build-tools/releases)
- [Commits](https://github.com/graalvm/native-build-tools/commits)

---
updated-dependencies:
- dependency-name: org.graalvm.buildtools:native-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 07:24:43 -07:00
dependabot[bot]
2432cf7afa
Bump org.apache.maven.plugins:maven-enforcer-plugin from 3.3.0 to 3.4.0 (#2477)
Bumps [org.apache.maven.plugins:maven-enforcer-plugin](https://github.com/apache/maven-enforcer) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/apache/maven-enforcer/releases)
- [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.3.0...enforcer-3.4.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-enforcer-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-23 08:17:57 -07:00