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 ClassCastException in HttpOperations#initShortId() #3542

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

joschi
Copy link
Contributor

@joschi joschi commented Dec 11, 2024

Calling HttpOperations#initShortId() could cause a ClassCastException if the underlying connection was replaced between checking its type and casting it to AtomicLong, for example if ChannelOperations#terminate() was called on another thread.

See also:

Fixes #3541

Calling `HttpOperations#initShortId()` could cause a
`ClassCastException` if the underlying connection was replaced between
checking its type and casting it to `AtomicLong`, for example if
`ChannelOperations#terminate()` was called on another thread.

See also:
https://github.com/reactor/reactor-netty/blob/667f8c9cbf5a227a15f6d0a2f3aab7c4777613da/reactor-netty-core/src/main/java/reactor/netty/channel/ChannelOperations.java#L515

Fixes reactor#3541
@pivotal-cla
Copy link

@joschi Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@joschi
Copy link
Contributor Author

joschi commented Dec 11, 2024

@joschi Please sign the Contributor License Agreement!

IMHO this is an obvious fix, so no need to sign the CLA.

Re-ordering of objects, variables or methods within a source file

https://cla.pivotal.io/about#obvious-fixes

@joschi
Copy link
Contributor Author

joschi commented Dec 11, 2024

@pivotal-cla This is an Obvious Fix

@pivotal-cla
Copy link

@joschi This Pull Request contains an obvious fix. Signing the Contributor License Agreement is not necessary.

Copy link
Member

@violetagg violetagg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for PR!

@violetagg violetagg added the type/bug A general bug label Dec 11, 2024
@violetagg violetagg added this to the 1.1.26 milestone Dec 11, 2024
Co-authored-by: Violeta Georgieva <milesg78@gmail.com>
@violetagg violetagg merged commit 6ff03ae into reactor:main Dec 11, 2024
14 checks passed
violetagg added a commit that referenced this pull request Dec 11, 2024
Calling `HttpOperations#initShortId()` could cause a
`ClassCastException` if the underlying connection was replaced between
checking its type and casting it to `AtomicLong`, for example if
`ChannelOperations#terminate()` was called on another thread.

See also:
https://github.com/reactor/reactor-netty/blob/667f8c9cbf5a227a15f6d0a2f3aab7c4777613da/reactor-netty-core/src/main/java/reactor/netty/channel/ChannelOperations.java#L515

Fixes #3541

Co-authored-by: Violeta Georgieva <milesg78@gmail.com>
violetagg added a commit that referenced this pull request Dec 11, 2024
@joschi joschi deleted the issue-3541 branch December 11, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HttpOperations#initShortId() can suffer from ClassCastException
3 participants