Skip to content

Commit

Permalink
Fixing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ark2307 committed Jan 2, 2025
1 parent c6d4841 commit 440c629
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.bson.conversions.Bson;
import org.bson.types.ObjectId;

import java.nio.file.DirectoryStream.Filter;
import java.time.Instant;
import java.util.*;
import java.util.concurrent.Executors;
Expand Down Expand Up @@ -513,7 +514,11 @@ public String fetchTestingRunResultSummary() {

private static Bson vulnerableFilter = Filters.and(
Filters.eq(TestingRunResult.VULNERABLE, true),
Filters.in(TestingRunResult.IS_IGNORED_RESULT, Arrays.asList(null, false))
Filters.or(
Filters.exists(TestingRunResult.IS_IGNORED_RESULT, false),
Filters.eq(TestingRunResult.IS_IGNORED_RESULT, false)
)

);

private List<Bson> prepareTestRunResultsFilters(ObjectId testingRunResultSummaryId, QueryMode queryMode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ public void run() {
Context.accountId.set(accountId);
try {

Map<String, Integer> countIssuesMap = new HashMap<>();
final Map<String, Integer> countIssuesMap = new HashMap<>();
countIssuesMap.put(Severity.HIGH.toString(), 0);
countIssuesMap.put(Severity.MEDIUM.toString(), 0);
countIssuesMap.put(Severity.LOW.toString(), 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ public Map<ObjectId,String> mapSummaryIdToTestingResultHexId(Set<String> testing
.map(ObjectId::new)
.collect(Collectors.toList());

// doing only for 1000 results at a time
objectIdList = objectIdList.subList(0, 1000);

List<TestingRunResult> runResults = instance.findAll(Filters.in(Constants.ID, objectIdList), Projections.include(TestingRunResult.TEST_RUN_RESULT_SUMMARY_ID));
for(TestingRunResult runResult: runResults){
finalMap.put(runResult.getTestRunResultSummaryId(), runResult.getHexId());
Expand Down

0 comments on commit 440c629

Please sign in to comment.