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

dropRight can result in OutOfMemoryExceptions being thrown #1012

Closed
johnmcclean opened this issue Jan 28, 2019 · 2 comments
Closed

dropRight can result in OutOfMemoryExceptions being thrown #1012

johnmcclean opened this issue Jan 28, 2019 · 2 comments
Labels
Milestone

Comments

@johnmcclean
Copy link
Member

e.g. This results in OOM error

 assertThat(LazyString.of("hello world").dropRight(Integer.MAX_VALUE),equalTo(empty));

This can be solved by checking if the size of the String (or List) is less than max value.

@johnmcclean johnmcclean added this to the 10.2.0 milestone Jan 28, 2019
@johnmcclean
Copy link
Member Author

Related to #1013

@johnmcclean
Copy link
Member Author

Merged in #1016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant