diff --git a/check_api/src/main/java/com/google/errorprone/scanner/ErrorProneScanner.java b/check_api/src/main/java/com/google/errorprone/scanner/ErrorProneScanner.java index 3d5cbf711ade..1d40e6e53a23 100644 --- a/check_api/src/main/java/com/google/errorprone/scanner/ErrorProneScanner.java +++ b/check_api/src/main/java/com/google/errorprone/scanner/ErrorProneScanner.java @@ -185,15 +185,7 @@ public ErrorProneScanner(Iterable checkers, Map> annotationClassesBuilder = ImmutableSet.builder(); for (BugChecker checker : this.bugCheckers) { - // When disabling a check using -Xep::OFF - // its `SeverityLevel` is removed from the `severityMap` in - // com.google.errorprone.scanner.ScannerSupplier#L210 - // - // If a checker is disabled, there's no need to register the checker. - // If the checker is still registered, attempting to report any matches will result in a a - // NoSuchElementException while retrieving the - // severity level in: - // `com.google.errorprone.matchers.Description#severity()`. + // If a checker is disabled, there's no need to register it. if (!severities.containsKey(checker.canonicalName())) { continue; }