-
Notifications
You must be signed in to change notification settings - Fork 927
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
when calling *HeadersBuilder.build()
…
#2193
Conversation
Motivation: The following code, which calls `*HeadersBuilder.build()` twice, fails with a `ClassCastException`. HttpHeadersBuilder b = HttpHeaders.builder(); b.add("foo", "bar"); b.build(); b.build(); // Throws a ClassCastException Modifications: - Make sure the `parent` is of a desired type. Rebuild if not. Result: - Fixes line#2190
/cc @yuinacor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! @trustin
Codecov Report
@@ Coverage Diff @@
## master #2193 +/- ##
============================================
+ Coverage 73.54% 73.58% +0.03%
- Complexity 9570 9577 +7
============================================
Files 837 837
Lines 36883 36893 +10
Branches 4548 4551 +3
============================================
+ Hits 27126 27146 +20
+ Misses 7438 7419 -19
- Partials 2319 2328 +9
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
ClassCastException
when calling *HeadersBuilder.build()
twiceClassCastException
when calling *HeadersBuilder.build()
…
…e#2193) Motivation: The following code, which calls `*HeadersBuilder.build()` twice, fails with a `ClassCastException`. HttpHeadersBuilder b = HttpHeaders.builder(); b.add("foo", "bar"); b.build(); b.build(); // Throws a ClassCastException Modifications: - Make sure the `parent` is of a desired type. Rebuild if not. Result: - Fixes line#2190
Motivation:
The following code, which calls
*HeadersBuilder.build()
twice, failswith a
ClassCastException
.Modifications:
parent
is of a desired type. Rebuild if not.Result:
ClassCastException
while building aClient
with additional headers #2190