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

Wrong cast in buffer allocation (fixes #1367) #1368

Closed
wants to merge 2 commits into from

Conversation

dmandalidis
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Jul 29, 2020

Codecov Report

Merging #1368 into main will increase coverage by 0.15%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1368      +/-   ##
============================================
+ Coverage     80.05%   80.21%   +0.15%     
- Complexity     6107     6130      +23     
============================================
  Files           435      438       +3     
  Lines         20249    20291      +42     
  Branches       2268     2269       +1     
============================================
+ Hits          16211    16276      +65     
+ Misses         2977     2965      -12     
+ Partials       1061     1050      -11     
Impacted Files Coverage Δ Complexity Δ
...c/main/java/io/lettuce/core/codec/StringCodec.java 87.50% <100.00%> (+0.40%) 20.00 <2.00> (+2.00)
.../io/lettuce/core/cluster/ClusterClientOptions.java 97.91% <0.00%> (-2.09%) 16.00% <0.00%> (ø%)
src/main/java/io/lettuce/core/ClientOptions.java 97.43% <0.00%> (-1.69%) 22.00% <0.00%> (ø%)
.../io/lettuce/core/dynamic/ReactiveTypeAdapters.java 87.39% <0.00%> (-0.44%) 1.00% <0.00%> (ø%)
...a/io/lettuce/core/pubsub/PubSubCommandHandler.java 86.60% <0.00%> (-0.43%) 39.00% <0.00%> (ø%)
.../lettuce/core/resource/DefaultClientResources.java 92.04% <0.00%> (ø) 35.00% <0.00%> (ø%)
...ce/core/cluster/ClusterTopologyRefreshOptions.java 93.90% <0.00%> (ø) 14.00% <0.00%> (ø%)
...io/lettuce/core/protocol/DecodeBufferPolicies.java 100.00% <0.00%> (ø) 4.00% <0.00%> (?%)
...a/io/lettuce/core/protocol/DecodeBufferPolicy.java 0.00% <0.00%> (ø) 0.00% <0.00%> (?%)
...lettuce/core/protocol/RatioDecodeBufferPolicy.java 92.85% <0.00%> (ø) 6.00% <0.00%> (?%)
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a731e82...094e392. Read the comment docs.

mp911de pushed a commit that referenced this pull request Jul 30, 2020
mp911de added a commit that referenced this pull request Jul 30, 2020
Rename calculateStringBytes to sizeOf. Eagerly obtain averageBytesPerChar/maxBytesPerChar as these values are constant for a given encoding so that we don't need to obtain CharsetEncoder for each size estimation. Reorder methods.

Original pull request: #1368.
@mp911de
Copy link
Collaborator

mp911de commented Jul 30, 2020

Thank you for your contribution. That's merged, polished, and backported now.

mp911de pushed a commit that referenced this pull request Jul 30, 2020
mp911de added a commit that referenced this pull request Jul 30, 2020
Rename calculateStringBytes to sizeOf. Eagerly obtain averageBytesPerChar/maxBytesPerChar as these values are constant for a given encoding so that we don't need to obtain CharsetEncoder for each size estimation. Reorder methods.

Original pull request: #1368.
@mp911de mp911de closed this Jul 30, 2020
@mp911de mp911de added this to the 5.3.3 milestone Jul 30, 2020
@mp911de mp911de added the type: bug A general bug label Jul 30, 2020
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.

2 participants