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

Reduce object allocations for assertions #1068

Closed
mp911de opened this issue Jun 26, 2019 · 0 comments
Closed

Reduce object allocations for assertions #1068

mp911de opened this issue Jun 26, 2019 · 0 comments
Labels
type: feature A new feature
Milestone

Comments

@mp911de
Copy link
Collaborator

mp911de commented Jun 26, 2019

We face in a few places constructs such as:

LettuceAssert.isTrue(isValidPort(port), String.format("Port out of range: %s", port));

This leads to a lot of object creations because of eager string format parsing. We should introduce LettuceAssert methods accepting a message supplier to defer message construction.

@mp911de mp911de added the type: feature A new feature label Jun 26, 2019
@mp911de mp911de added this to the 5.2.0 milestone Jun 26, 2019
mp911de added a commit that referenced this issue Jun 26, 2019
LettuceAssert now accepts message suppliers to defer message creation so e.g. String.format is invoked lazily.
@mp911de mp911de closed this as completed Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature A new feature
Projects
None yet
Development

No branches or pull requests

1 participant