Skip to content

Defensively access deprecated AbstractHttpClient class from Apache HttpComponents [SPR-14422] #18993

Closed

Description

@spring-projects-issues

Juergen Hoeller opened SPR-14422 and commented

During an upgrade attempt to HttpAsyncClient 4.1.2, it turns out that - under certain constellations - we get build warnings for AbstractHttpClient's use of @GuardedBy. Not diving too deep there, the root of our problem is that we're still compiling against the long-deprecated AbstractHttpClient class for legacy checks in HttpComponentsClientHttpRequestFactory and HttpComponentsHttpInvokerRequestExecutor. Since that class may go away at any time in a future HttpClient release, let's reflectively access it instead and therefore get rid of the build warnings as well as not insisting on its presence at runtime anymore. We're just using it for a legacy property check anyway which we'll remove in 5.0 for good.


Affects: 4.3 GA

Issue Links:

Referenced from: commits 4478354, 1c73664

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions