From 5a0ab689c3ec8f70702a728eec19345a76f68981 Mon Sep 17 00:00:00 2001 From: Louis Bergelson Date: Tue, 8 Jan 2019 15:58:17 -0500 Subject: [PATCH] Fix nitpick in IntervalKeepPairFilterTest (#1254) --- .../filter/IntervalKeepPairFilterTest.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test/java/htsjdk/samtools/filter/IntervalKeepPairFilterTest.java b/src/test/java/htsjdk/samtools/filter/IntervalKeepPairFilterTest.java index 187313d0a0..91e682c39d 100644 --- a/src/test/java/htsjdk/samtools/filter/IntervalKeepPairFilterTest.java +++ b/src/test/java/htsjdk/samtools/filter/IntervalKeepPairFilterTest.java @@ -3,14 +3,14 @@ import htsjdk.HtsjdkTest; import htsjdk.samtools.SAMRecordSetBuilder; import htsjdk.samtools.util.CollectionUtil; +import htsjdk.samtools.util.Interval; import org.testng.Assert; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import htsjdk.samtools.util.Interval; -import java.util.List; + import java.util.ArrayList; -import java.util.stream.StreamSupport; +import java.util.List; public class IntervalKeepPairFilterTest extends HtsjdkTest { private static final int READ_LENGTH = 151; @@ -56,7 +56,7 @@ public void setUp() { public void testIntervalPairFilter(final List intervals, final long expectedPassingRecords) { final IntervalKeepPairFilter filter = new IntervalKeepPairFilter(intervals); - long actualPassingRecords = StreamSupport.stream(builder.spliterator(), false) + long actualPassingRecords = builder.getRecords().stream() .filter(rec -> !filter.filterOut(rec)) .count(); @@ -76,7 +76,7 @@ public void testUnmappedPair() { final IntervalKeepPairFilter filter = new IntervalKeepPairFilter(intervalList); - boolean unmappedPassed = StreamSupport.stream(builder.spliterator(), false) + boolean unmappedPassed = builder.getRecords().stream() .filter(rec -> !filter.filterOut(rec)) .anyMatch(rec -> rec.getReadName().equals("both_unmapped")); @@ -91,7 +91,7 @@ public void testNotPrimaryReads() { final IntervalKeepPairFilter filter = new IntervalKeepPairFilter(intervalList); - boolean notPrimary = StreamSupport.stream(builder.spliterator(), false) + boolean notPrimary = builder.getRecords().stream() .filter(rec -> !filter.filterOut(rec)) .anyMatch(rec -> rec.isSecondaryAlignment() || rec.getSupplementaryAlignmentFlag()); @@ -106,7 +106,7 @@ public void testSingleEndedReads() { final IntervalKeepPairFilter filter = new IntervalKeepPairFilter(intervalList); - boolean singleEnded = StreamSupport.stream(builder.spliterator(), false) + boolean singleEnded = builder.getRecords().stream() .filter(rec -> !filter.filterOut(rec)) .anyMatch(rec -> rec.getReadName().equals("single_ended"));