Fix NullPointerException when using IterableSpec any()#341
Merged
Conversation
seongahjo
reviewed
Jun 10, 2022
seongahjo
approved these changes
Jun 13, 2022
mhyeon-lee
approved these changes
Jun 14, 2022
Contributor
|
@kshired 님 올려주신 PR 반영하여 0.3.5 배포하였습니다~ 감사합니다. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolve #323
IterableSpec any에서 size를 지정하지 않았을 때 ( 혹은 min , max 중 하나만 지정한 경우 ) , 발생하는 문제를 해결하였습니다.
#323 이슈에서 언급되었던
Arbitraries.longs().between(this.minSize, this.maxSize).sample();코드는 39179a1 에서 수정되었음을 확인했습니다.따라서 다른 곳에서 문제점이 있음을 인지하고, 파악하였으며 파악한 문제점은 아래와 같습니다.
ArbitrarySet클래스의getApplicableValue()에 의해 sample이 생성되지 않는 경우DEFAULT_ELEMENT_MAX_SIZE보다 큰 경우DEFAULT_ELEMENT_MIN_SIZE에 의해 size가 0인 list가 반환되는 경우위 3가지 문제를 해결하고, 테스트 코드를 추가하였습니다.