/** * Returns all available issues of a given scope (regardless of whether * they are actually enabled for a given configuration etc) * * @param scope the applicable scope set * @return a list of issues */ @NonNull protected List<Issue> getIssuesForScope(@NonNull EnumSet<Scope> scope) { List<Issue> list = scopeIssues.get(scope); if (list == null) { List<Issue> issues = getIssues(); if (scope.equals(Scope.ALL)) { list = issues; } else { list = new ArrayList<>(getIssueCapacity(scope)); for (Issue issue : issues) { // Determine if the scope matches if (issue.getImplementation().isAdequate(scope)) { list.add(issue); } } } scopeIssues.put(scope, list); } return list; }