Skip to content

Commit

Permalink
add close method to history store
Browse files Browse the repository at this point in the history
  • Loading branch information
hcoles committed Aug 31, 2023
1 parent 8b3689d commit 4c6f0dd
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.io.Serializable;
import java.util.Objects;
import java.util.StringJoiner;

import org.pitest.classinfo.ClassName;
import org.pitest.classinfo.HierarchicalClassId;
Expand Down Expand Up @@ -47,4 +48,12 @@ public boolean equals(final Object obj) {
return Objects.equals(id, other.id)
&& Objects.equals(coverageId, other.coverageId);
}

@Override
public String toString() {
return new StringJoiner(", ", ClassHistory.class.getSimpleName() + "[", "]")
.add("id=" + id)
.add("coverageId='" + coverageId + "'")
.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ public interface HistoryStore {

Map<ClassName, ClassHistory> getHistoricClassPath();

void close();
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void handleMutationResult(final ClassMutationResults metaData) {

@Override
public void runEnd() {

this.historyStore.close();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ public Map<ClassName, ClassHistory> getHistoricClassPath() {
return Collections.emptyMap();
}

@Override
public void close() {

}

@Override
public void recordClassPath(final Collection<HierarchicalClassId> ids,
final CoverageDatabase coverageInfo) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ public Map<ClassName, ClassHistory> getHistoricClassPath() {
return this.previousClassPath;
}

@Override
public void close() {

}

@Override
public void initialize() {
if (this.input != null) {
Expand Down

0 comments on commit 4c6f0dd

Please sign in to comment.