build(deps): bump com.squareup.retrofit2:converter-gson from 2.9.0 to 2.11.0
Bumps com.squareup.retrofit2:converter-gson from 2.9.0 to 2.11.0.
Release notes
Sourced from com.squareup.retrofit2:converter-gson's releases.
2.11.0
New
- The built-in
OptionalConverterFactoryis now public to allow installing it before other converters which consume all types (e.g., Moshi, Gson, Jackson, etc.).Fixed
- Ensure that exceptions thrown from failure to parse method annotations can be observed by multiple threads/callers. Previously only the first caller would see the actual parsing exception and other callers would get a cryptic
ClassCastException.2.10.0
New
Support using
Unitas a response type. This can be used for non-body HTTP methods likeHEADor body-containing HTTP methods likeGETwhere the body will be discarded without deserialization.kotlinx.serialization converter!
This was imported from github.com/JakeWharton/retrofit2-kotlinx-serialization-converter/ and remains unchanged from its 1.0.0 release.
The Maven coordinates are
com.squareup.retrofit2:converter-kotlinx-serialization.JAXB 3 converter!
The Maven coordinates are
com.squareup.retrofit2:converter-jaxb3.
@Header,@Headers, and@HeaderMapcan now set non-ASCII values through theallowUnsafeNonAsciiValuesannotation property. These are not technically compliant with the HTTP specification, but are often supported or required by services.Publish a BOM of all modules. The Maven coordinates are
com.squareup.retrofit2:retrofit-bom.
Invocationnow exposes the serviceClass<?>and the instance on which the method was invoked. This disambiguates the source when service inheritence is used.A response type keeper annotation processor is now available for generating shrinker rules for all referenced types in your service interface. In some cases, it's impossible for static shrinker rules to keep the entirety of what Retrofit needs at runtime. This annotation processor generates those additional rules. For more info see its README.
Changed
- Add shrinker rules to retain the generic signatures of built-in types (
Call,Response, etc.) which are used via reflection at runtime.- Remove backpressure support from RxJava 2 and 3 adapters. Since we only deliver a single value and the Reactive Streams specification states that callers must request a non-zero subscription value, we never need to honor backpressure.
- Kotlin
Retrofit.createfunction now has a non-null lower bound. Even if you specified a nullable type before this function would never return null.- Suspend functions now capture and defer all
Throwablesubtypes (not justExceptionsubtypes) to avoid Java'sUndeclaredThrowableExceptionwhen thrown synchronously.- Eagerly reject
suspend funfunctions that returnCall<Body>. These are never correct, and should declare a return type ofBodydirectly.- Support for Java 14-specific and Java 16-specific reflection needed to invoke default methods on interfaces have been moved to separate versions of a class through a multi-release jar. This should have no observable impact other than the jar now contains classes which target Java 14 and Java 16 bytecode that might trip up some static analysis tools which are not aware of multi-release jars.
- Parameter names are now displayed in exception messages when available in the underlying Java bytecode.
- Jackson converter now supports binary formats by using byte streams rather than character streams in its implementation. Use the
create(ObjectMapper, MediaType)overload to supply the value of theContent-Typeheader for your format.Fixed
- Do not include synthetic methods when doing eager validation.
- Use per-method rather than per-class locking when parsing annotations. This eliminates contention when multiple calls are made in quick succession at the beginning of the process lifetime.
Changelog
Sourced from com.squareup.retrofit2:converter-gson's changelog.
[2.11.0] - 2024-03-28
New
- The built-in
OptionalConverterFactoryis now public to allow installing it before other converters which consume all types (e.g., Moshi, Gson, Jackson, etc.).Fixed
- Ensure that exceptions thrown from failure to parse method annotations can be observed by multiple threads/callers. Previously only the first caller would see the actual parsing exception and other callers would get a cryptic
ClassCastException.[2.10.0] - 2024-03-18
New
Support using
Unitas a response type. This can be used for non-body HTTP methods likeHEADor body-containing HTTP methods likeGETwhere the body will be discarded without deserialization.kotlinx.serialization converter!
This was imported from github.com/JakeWharton/retrofit2-kotlinx-serialization-converter/ and remains unchanged from its 1.0.0 release.
The Maven coordinates are
com.squareup.retrofit2:converter-kotlinx-serialization.JAXB 3 converter!
The Maven coordinates are
com.squareup.retrofit2:converter-jaxb3.
@Header,@Headers, and@HeaderMapcan now set non-ASCII values through theallowUnsafeNonAsciiValuesannotation property. These are not technically compliant with the HTTP specification, but are often supported or required by services.Publish a BOM of all modules. The Maven coordinates are
com.squareup.retrofit2:retrofit-bom.
Invocationnow exposes the serviceClass<?>and the instance on which the method was invoked. This disambiguates the source when service inheritence is used.A response type keeper annotation processor is now available for generating shrinker rules for all referenced types in your service interface. In some cases, it's impossible for static shrinker rules to keep the entirety of what Retrofit needs at runtime. This annotation processor generates those additional rules. For more info see its README.
Changed
- Add shrinker rules to retain the generic signatures of built-in types (
Call,Response, etc.) which are used via reflection at runtime.- Remove backpressure support from RxJava 2 and 3 adapters. Since we only deliver a single value and the Reactive Streams specification states that callers must request a non-zero subscription value, we never need to honor backpressure.
- Kotlin
Retrofit.createfunction now has a non-null lower bound. Even if you specified a nullable type before this function would never return null.- Suspend functions now capture and defer all
Throwablesubtypes (not justExceptionsubtypes) to avoid Java'sUndeclaredThrowableExceptionwhen thrown synchronously.- Eagerly reject
suspend funfunctions that returnCall<Body>. These are never correct, and should declare a return type ofBodydirectly.- Support for Java 14-specific and Java 16-specific reflection needed to invoke default methods on interfaces have been moved to separate versions of a class through a multi-release jar. This should have no observable impact other than the jar now contains classes which target Java 14 and Java 16 bytecode that might trip up some static analysis tools which are not aware of multi-release jars.
- Parameter names are now displayed in exception messages when available in the underlying Java bytecode.
- Jackson converter now supports binary formats by using byte streams rather than character streams in its implementation. Use the
create(ObjectMapper, MediaType)overload to supply the value of theContent-Typeheader for your format.Fixed
- Do not include synthetic methods when doing eager validation.
- Use per-method rather than per-class locking when parsing annotations. This eliminates contention when multiple calls are made in quick succession at the beginning of the process lifetime.
Commits
cc76c22Prepare version 2.11.0eba9567Merge pull request #4117 from square/jw.public-optional.2024-03-27c579693Merge pull request #4114 from square/jw.locks.2024-03-22d6eac54Make optional converter public9b5e630Merge pull request #4116 from deterclosed/trunkbab101eall: remove repetitive words80aee71Merge pull request #4115 from square/renovate/gradle-8.x83acb51Update dependency gradle to v8.7d412139Gracefully handle parse failure with locking8f5a3c9Merge pull request #4110 from jonapoul/patch-1- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Qodana Community for JVM
156 new problems were found
| Inspection name | Severity | Problems |
|---|---|---|
Unstable API Usage |
🔶 Warning | 62 |
Unused symbol |
🔶 Warning | 33 |
Incorrect string capitalization |
🔶 Warning | 21 |
Unused import directive |
🔶 Warning | 3 |
Constructor parameter is never used as a property |
🔶 Warning | 2 |
Redundant nullable return type |
🔶 Warning | 2 |
Redundant visibility modifier |
🔶 Warning | 2 |
Local 'var' is never modified and can be declared as 'val' |
🔶 Warning | 1 |
'@Deferred' result is unused |
🔶 Warning | 1 |
Field can be local |
🔶 Warning | 1 |
Redundant 'suspend' modifier |
🔶 Warning | 1 |
Redundant 'Unit' return type |
🔶 Warning | 1 |
Redundant 'if' statement |
🔶 Warning | 1 |
Useless call on not-null type |
🔶 Warning | 1 |
Property naming convention |
◽️ Notice | 6 |
Replace empty class body |
◽️ Notice | 6 |
Boolean literal argument without parameter name |
◽️ Notice | 2 |
Commented out code |
◽️ Notice | 2 |
Local variable naming convention |
◽️ Notice | 2 |
Unnecessary type argument |
◽️ Notice | 2 |
Class member can have 'private' visibility |
◽️ Notice | 1 |
Private property naming convention |
◽️ Notice | 1 |
Unnecessary parentheses in function call with lambda |
◽️ Notice | 1 |
Redundant constructor body |
◽️ Notice | 1 |
💡 Qodana analysis was run in the pull request mode: only the changed files were checked
View the detailed Qodana report
To be able to view the detailed Qodana report, you can either:
- Register at Qodana Cloud and configure the action
- Use GitHub Code Scanning with Qodana
- Host Qodana report at GitHub Pages
- Inspect and use
qodana.sarif.json(see the Qodana SARIF format for details)
To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:
- name: 'Qodana Scan'
uses: JetBrains/[email protected]
with:
upload-result: true
Contact Qodana team
Contact us at [email protected]
- Or via our issue tracker: https://jb.gg/qodana-issue
- Or share your feedback: https://jb.gg/qodana-discussions
@dependabot rebase
Looks like com.squareup.retrofit2:converter-gson is up-to-date now, so this is no longer needed.