fix(deps): update dependency com.squareup.retrofit2:converter-jackson to v2.10.0 (master)#165
Open
mend-for-github-com[bot] wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.3.0→2.10.0By merging this PR, the below vulnerabilities will be automatically resolved:
Release Notes
square/retrofit (com.squareup.retrofit2:converter-jackson)
v2.10.0Compare Source
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
Call,Response, etc.) which are used via reflection at runtime.Retrofit.createfunction now has a non-null lower bound. Even if you specified a nullable type before this function would never return null.Throwablesubtypes (not justExceptionsubtypes) to avoid Java'sUndeclaredThrowableExceptionwhen thrown synchronously.suspend funfunctions that returnCall<Body>. These are never correct, and should declare a return type ofBodydirectly.create(ObjectMapper, MediaType)overload to supply the value of theContent-Typeheader for your format.Fixed
v2.9.0Compare Source
New: RxJava 3 adapter!
The Maven coordinates are
com.squareup.retrofit2:adapter-rxjava3.Unlike the RxJava 1 and RxJava 2 adapters, the RxJava 3 adapter's
create()method will produce asynchronous HTTP requests by default. For synchronous requests usecreateSynchronous()and for synchronous on a scheduler usecreateWithScheduler(..).v2.8.2This ensures that even when you're running on the JVM with Android classes present on the classpath you
get JVM semantics.
v2.8.1MethodHandles.Lookupon Android API 24 and 25. The class is only availableon Android API 26 and higher.
v2.8.0Call.timeout()which returns theokio.Timeoutof the full call.Call.awaitResponse()to accept a nullable response type.Java. That bug was fixed in Java 14, and the fix broke our workaround.
v2.7.2v2.7.1v2.7.0This release changes the minimum requirements to Java 8+ or Android 5+.
See this blog post for more information on the change.
Response.error.v2.6.4v2.6.3UndeclaredThrowableExceptionin rare cases from usingyieldan explicit dispatch which ensures that it will work even on dispatchers which do not support yielding.
v2.6.2IOExceptions being wrapped inUndeclaredThrowableExceptionin rare cases when usingResponse<..>as a return type for Kotlin 'suspend' functions.v2.6.1IOExceptions being wrapped inUndeclaredThrowableExceptionin rare cases.ResponseBodyfor responses created byResponse.error.v2.6.0New: Support
suspendmodifier on functions for Kotlin! This allows you to express the asynchrony of HTTP requestsin an idiomatic fashion for the language.
Behind the scenes this behaves as if defined as
fun user(...): Call<User>and then invoked withCall.enqueue.You can also return
Response<User>for access to the response metadata.Currently this integration only supports non-null response body types. Follow
issue 3075 for nullable type support.
New:
@Tagparameter annotation for setting tags on the underlying OkHttpRequestobject. These can be readin
CallAdapters or OkHttpInterceptors for tracing, analytics, varying behavior, and more.New:
@SkipCallbackExecutormethod annotation will result in yourCallinvoking itsCallbackon thebackground thread on which the HTTP call was made.
New: Support OkHttp's
Headerstype for@HeaderMapparameters.New: Add
Retrofit.Builder.baseUrl(URL)overload.Fix: Add embedded R8/ProGuard rule which retains Retrofit interfaces (while still allowing obfuscation). This
is needed because R8 running in 'full mode' (i.e., not in ProGuard-compatibility mode) will see that there are
no subtypes of these interfaces and rewrite any code which references instances to null.
Fix: Mark
HttpException.response()as@Nullableas serializing the exception does not retain this instance.Fix: Fatal errors (such as stack overflows, out of memory, etc.) now propagate to the OkHttp
Dispatcherthreadon which they are running.
Fix: Ensure JAX-B converter closes the response body when an exception is thrown during deserialization.
Fix: Ignore static methods when performing eager validation of interface methods.
Fix: Ensure that calling
source()twice on theResponseBodypassed to aConverteralways returns the sameinstance. Prior to the fix, intermediate buffering would cause response data to be lost.
v2.5.0Unittype. This behaves the same as Java'sVoidwhere the bodycontent is ignored and immediately discarded.
OptionalandCompletableFuturetypes. Previously the 'converter-java8'and 'adapter-java8' dependencies were needed and explicitly adding
Java8OptionalConverterFactoryand/orJava8CallAdapterFactoryto yourRetrofit.Builderin order to use these types. Support is now built-in andthose types and their artifacts are marked as deprecated.
Invocationclass provides a reference to the invoked method and argument list as a tag on theunderlying OkHttp
Call. This can be accessed from an OkHttp interceptor for things like logging, analytics,or metrics aggregation.
Retrofitwhich allows you callcreatepassing the interface type only asa generic parameter (e.g.,
retrofit.create<MyService>()).Response.successoverload which allows specifying a custom 2xx status code.Calls.failureoverload which allows passing anyThrowablesubtype.exception handler.
onSubscribe.RxJavaPluginsassembly hook when creating an RxJava 2 type.Optionalconverters delegate properly. This ensures that convertersregistered prior to the optional converter can be used for deserializing the body type.
@Pathvalues from participating in path-traversal. This ensures untrusted input passed asa path value cannot cause you to make a request to an un-intended relative URL.
RuntimeExceptionor
IOExceptionwhen it fails.now a correct exception will be thrown when detected.
@QueryNameor@QueryMapprecedes a@Urlparameter.v2.4.0Retrofit.Builderexposes mutable lists of the added converter and call adapter factories.Future.Errors from callbacks (usuallyOutOfMemoryError).hiding bugs in faulty adapters which might not have consumed the full JSON input which would
then cause failures on the next request over that connection.
Callcancelation with RxJava unsubscription/disposal. Prior tothis change, canceling of a
Callwould prevent a cancelation exception from propagating downthe Rx stream.