Mihai Nita
19f54ee6ed
Fixes #776 : Add settings for the kind of newline to use ( #2231 )
...
* Add settings for kind of newline to use
* Fix amp in javadoc
* Fixing link in javadoc
* Doc: use JSON instead of Json
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
* PR Feedback: Objects.requireNonNull
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
* PR Feedback: $next-version$, don't hardcode
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
* s/testNewlineLF/testNewlineLf/
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
* Implement PR feedback
* Round two of review
* Restore copyright year, no reason to update
* Rename OS named enum values to CR and LF
* Add javadoc to NewlineStyle.getValue()
* Implement PR feedback, round 2
* Fix typo
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
* No need for line break
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
* Shorter, cleaner doc
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
* Using a FormattingStyle for pretty print
* Fix Junit4 and Truth after merge from master
* Implement review feedback
* Double backslash in message
---------
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
2023-02-12 08:20:02 -08:00
Maicol
af21798436
Fix the equals
method of JsonPrimitive
to work with BigInteger
( #2311 )
...
* Fix the `equals` method of `JsonPrimitive` to work with BigInteger
* Improve the `equals` & `getAsBigInteger` methods in `JsonPrimitive`
2023-02-06 09:40:11 -08:00
Maicol
9f26679e7a
Adds Error Prone to the maven-compiler-plugin
( #2308 )
...
* Adds Error Prone to the `pom.xml`
* Adds Error Prone annotations to avoid compiling errors
* Adds profile to run Error Prone in JDK8
* Revert "Adds profile to run Error Prone in JDK8"
This reverts commit 61771d0da55003ea5bc8c6f086d925aec583c9a2.
* Fix Error Prone warn
* Add comment to `pom.xml`
* Fix the `@SuppressWarnings("GetClassOnClass")`
* Replace the Error Prone link in the `pom.xml`
* Disable Error Prone with jdk-15`
* Remove a new-line in `pom.xml`
2023-02-06 06:13:28 -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
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
dependabot[bot]
41de7ce75b
Bump jackson-databind from 2.14.1 to 2.14.2 ( #2306 )
...
Bumps [jackson-databind](https://github.com/FasterXML/jackson ) from 2.14.1 to 2.14.2.
- [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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-30 10:54:52 -08:00
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
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
188b2beb26
Plz
ci/woodpecker/push/woodpecker Pipeline was successful
2022-11-24 18:52:42 +01:00
a6fbfdcf21
Plz
ci/woodpecker/push/woodpecker Pipeline was successful
2022-11-24 18:50:17 +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
60191c3485
Plz
ci/woodpecker/push/woodpecker Pipeline was successful
2022-11-24 18:12:11 +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
be62121f65
Bye 2
ci/woodpecker/push/woodpecker Pipeline was successful
2022-11-24 18:00:33 +01:00
237f6a7153
Bye
ci/woodpecker/push/woodpecker Pipeline failed
2022-11-24 18:00:06 +01:00
79ae63f02a
Plz 2
ci/woodpecker/push/woodpecker Pipeline failed
2022-11-24 17:54:26 +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
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