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

read empty list of frozen violations correctly #457

Merged
merged 1 commit into from
Dec 14, 2020

Conversation

hankem
Copy link
Member

@hankem hankem commented Oct 22, 2020

By default Splitter.on(..).splitToList("") returns a list containing one element (the empty string). This leads to an inconsistent behavior, because saving no lines will in turn return one line on read. Configuring Splitter via omitEmptyStrings() we can fix this behavior by skipping all empty lines, which makes sense in general.

Resolves: #456

Signed-off-by: Manfred Hanke Manfred.Hanke@tngtech.com

By default `Splitter.on(..).splitToList("")` returns a list containing one element (the empty string). This leads to an inconsistent behavior, because saving no lines will in turn return one line on read. Configuring `Splitter` via `omitEmptyStrings()` we can fix this behavior by skipping all empty lines, which makes sense in general.

Signed-off-by: Manfred Hanke <Manfred.Hanke@tngtech.com>
Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
@codecholeric codecholeric changed the title read empty list of frozen violations correctly (resolves #456) read empty list of frozen violations correctly Dec 14, 2020
@codecholeric codecholeric merged commit e5c6b75 into master Dec 14, 2020
@codecholeric codecholeric deleted the empty-list-of-frozen-violations branch December 14, 2020 21:12
codecholeric added a commit that referenced this pull request Feb 21, 2021
By default `Splitter.on(..).splitToList("")` returns a list containing one element (the empty string). This leads to an inconsistent behavior, because saving no lines will in turn return one line on read. Configuring `Splitter` via `omitEmptyStrings()` we can fix this behavior by skipping all empty lines, which makes sense in general.

Resolves: #456

Signed-off-by: Manfred Hanke <Manfred.Hanke@tngtech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ViolationStoreFactory throws StoreUpdateFailedException when previous run = 0 violations
2 participants