Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Coles committed Apr 19, 2021
1 parent 7e6eac8 commit e24ff8b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 23 deletions.
14 changes: 2 additions & 12 deletions pitest-entry/src/main/java/org/pitest/coverage/CoverageData.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private static Function<Entry<InstructionLocation, Set<TestInfo>>, BlockCoverage
@Override
public Collection<ClassInfo> getClassesForFile(final String sourceFile,
String packageName) {
final Collection<ClassInfo> value = this.getClassesForFileCache().get(
final Collection<ClassInfo> value = classesForFile.get(
keyFromSourceAndPackage(sourceFile, packageName));
if (value == null) {
return Collections.emptyList();
Expand All @@ -176,20 +176,11 @@ public Collection<ClassInfo> getClassesForFile(final String sourceFile,
}
}

private Map<String, Collection<ClassInfo>> getClassesForFileCache() {
return this.classesForFile;
}

@Override
public CoverageSummary createSummary() {
return new CoverageSummary(numberOfLines(), coveredLines());
}

@Override
public Map<InstructionLocation, Set<TestInfo>> getInstructionCoverage() {
return Collections.unmodifiableMap(this.instructionCoverage);
}

private BigInteger generateCoverageNumber(
final Map<ClassLine, Set<TestInfo>> coverage) {
BigInteger coverageNumber = BigInteger.ZERO;
Expand Down Expand Up @@ -323,8 +314,7 @@ private Function<Entry<InstructionLocation, Set<TestInfo>>, Stream<TestInfo>> to
return a -> a.getValue().stream();
}

private Predicate<Entry<InstructionLocation, Set<TestInfo>>> isFor(
final ClassName clazz) {
private Predicate<Entry<InstructionLocation, Set<TestInfo>>> isFor(ClassName clazz) {
return a -> a.getKey().isFor(clazz);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

import java.math.BigInteger;
import java.util.Collection;
import java.util.Map;
import java.util.Set;

public interface CoverageDatabase {

Expand All @@ -26,7 +24,4 @@ public interface CoverageDatabase {

CoverageSummary createSummary();

Map<InstructionLocation, Set<TestInfo>> getInstructionCoverage();


}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import java.math.BigInteger;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Set;

public class NoCoverage implements CoverageDatabase {
@Override
Expand Down Expand Up @@ -50,8 +48,4 @@ public CoverageSummary createSummary() {
return new CoverageSummary(0,0);
}

@Override
public Map<InstructionLocation, Set<TestInfo>> getInstructionCoverage() {
return Collections.emptyMap();
}
}

0 comments on commit e24ff8b

Please sign in to comment.