Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NoSuchMethodError thrown by ClientResponseFunctionInterceptor in reactive plugin. #10798

Closed

Conversation

JooHyukKim
Copy link

@JooHyukKim JooHyukKim commented Mar 27, 2024

Motivation

This PR fixes NoSuchMethodError thrown by ClientResponseFunctionInterceptor.
To be specific,

java.lang.NoSuchMethodError: `int org.spring....<rest-ommitted>.reactive.ClientHttpResponse.getRawStatusCode()`

Explanation

My application runs on SpringBoot 3 uses 6+ version of spring-reactive where there is no getRawStatusCode().

I understand that as per Pinpoint version 2.5.x README file, it says

* Range: org.springframework/spring-webflux [5.0.0.RELEASE, 5.3.max]

... saying it does not need to conform to version range out of range.
But since there is already method getStatusCode() from which we can achieve the same functionality, there is no reason not to use getStatusCode() instead.?

Note

I simply chained ...

response.getStatusCode().value()

... because it's never null.
LMK if we prefer null check.

image

@CLAassistant
Copy link

CLAassistant commented Mar 27, 2024

CLA assistant check
All committers have signed the CLA.

@JooHyukKim
Copy link
Author

May I ask if 2.5.x version is still in maintained, @emeroad? I am asking this because it seems like only PR's against 3.x version have been merged.

@emeroad
Copy link
Member

emeroad commented Mar 29, 2024

@intr3p1d
a4a504c#diff-22feb5f82c89d53ec5b0e346a8502d067c5d448439b86a99a7fb7e79c7f4c867
We will backport the above patch to version 2.5.x.

@JooHyukKim
Copy link
Author

JooHyukKim commented Mar 29, 2024

@intr3p1d a4a504c#diff-22feb5f82c89d53ec5b0e346a8502d067c5d448439b86a99a7fb7e79c7f4c867 We will backport the above patch to version 2.5.x.

Great, I was wondering if we should suggest backporting that commit 🙏🏼🙏🏼
Looks better than this fix, thank you!

May I ask when 2.5.4 is expected to be released?
If it takes too long, we are considering to build and use latest 2.5.x version with the patch.

Closing this one...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants