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
ViolationStoreFactory throws StoreUpdateFailedException when previous run = 0 violations #456
Labels
Comments
jbkervyn
changed the title
ViolationStoreFactory throws StoreUpdateFailedException when violations is emtpy
ViolationStoreFactory throws StoreUpdateFailedException when previous run = 0 violations
Oct 22, 2020
Thanks for the report! I can indeed reproduce the issue with the following simple example: importsimport com.tngtech.archunit.ArchConfiguration;
import com.tngtech.archunit.junit.AnalyzeClasses;
import com.tngtech.archunit.junit.ArchTest;
import com.tngtech.archunit.junit.ArchUnitRunner;
import com.tngtech.archunit.lang.ArchRule;
import org.junit.runner.RunWith;
import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.classes;
import static com.tngtech.archunit.library.freeze.FreezingArchRule.freeze;
@RunWith(ArchUnitRunner.class)
@AnalyzeClasses(packagesOf = Issue456.class) public class Issue456 {
static {
ArchConfiguration.get().setProperty("freeze.store.default.allowStoreCreation", "true");
ArchConfiguration.get().setProperty("freeze.store.default.allowStoreUpdate", "false");
}
ArchRule ruleWithoutViolations = classes().should().haveNameMatching(".*");
@ArchTest
ArchRule frozen = freeze(ruleWithoutViolations);
} |
hankem
added a commit
that referenced
this issue
Oct 22, 2020
Signed-off-by: Manfred Hanke <Manfred.Hanke@tngtech.com>
codecholeric
added a commit
that referenced
this issue
Dec 14, 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>
codecholeric
added a commit
that referenced
this issue
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
First run : no violations : emtpy file created.
Second run : no violations : StoreUpdateFailedException
CategorizedViolations the following :
this leads to removeObsoleteViolationsFromStore being called and this can trigger an StoreUpdateFailedException
The text was updated successfully, but these errors were encountered: