Skip to content

Commit

Permalink
fix naming and possible NPE in lsp coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
timfel committed Nov 22, 2021
1 parent e9bddb1 commit 01f0fdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public MaterializedFrame getFrame() {
return frame;
}

public URI getCovarageUri() {
public URI getCoverageUri() {
return coverageUri;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public List<CoverageData> getCoverageData(SourceSectionReference section) {

public Set<URI> getCoverageUris(SourceSection section) {
List<CoverageData> coverageDataObjects = section2coverageData.get(SourceSectionReference.from(section));
return coverageDataObjects == null ? null : coverageDataObjects.stream().map(coverageData -> coverageData.getCovarageUri()).collect(Collectors.toSet());
return coverageDataObjects == null ? null : coverageDataObjects.stream().map(coverageData -> coverageData.getCoverageUri()).collect(Collectors.toSet());
}

public void addLocationCoverage(SourceSectionReference section, CoverageData coverageData) {
Expand All @@ -175,7 +175,7 @@ public void clearCoverage(URI runScriptUri) {
Entry<SourceSectionReference, List<CoverageData>> entry = iterator.next();
for (Iterator<CoverageData> iteratorData = entry.getValue().iterator(); iteratorData.hasNext();) {
CoverageData coverageData = iteratorData.next();
if (coverageData.getCovarageUri().equals(runScriptUri)) {
if (coverageData.getCoverageUri() != null && coverageData.getCoverageUri().equals(runScriptUri)) {
iteratorData.remove();
}
}
Expand Down

0 comments on commit 01f0fdf

Please sign in to comment.