Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Rikkola committed Apr 15, 2020
1 parent 9df7ed4 commit 6554f3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
public class OverlappingRowsCheck
extends PairCheck {

// public static Map<Integer, Integer> found = new HashMap<>();

private final Index index;

public OverlappingRowsCheck(final RuleInspector ruleInspector,
Expand All @@ -76,19 +74,10 @@ protected Severity getDefaultSeverity() {

@Override
public boolean check() {
// TODO dirty, but this should not run twice atm
if (ruleInspector.getRowIndex() > other.getRowIndex()) {
return hasIssues;
}
// if (found.containsKey(other.getRowIndex()) && found.get(other.getRowIndex()).equals(ruleInspector.getRowIndex())) {
// return hasIssues;
// }

hasIssues = ruleInspector.overlaps(other);
// if (hasIssues) {
// found.put(ruleInspector.getRowIndex(),
// other.getRowIndex());
// }
return hasIssues;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.kie.dmn.validation.dtanalysis.model.Subsumption;

import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.hasSize;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
Expand Down Expand Up @@ -79,7 +80,7 @@ public void testSubsumptionRules() {
null))))));
assertThat(overlaps, hasSize(2));
// Assert OVERLAPs same values
assertThat(analysis.getOverlaps(), contains(overlaps.toArray()));
assertThat(analysis.getOverlaps(), containsInAnyOrder(overlaps.toArray()));

// Subsumption count.
assertThat(analysis.getSubsumptions(), hasSize(1));
Expand Down

0 comments on commit 6554f3b

Please sign in to comment.