Skip to content

Commit

Permalink
Throw exception instead of returning default value in exceptional case
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricioaniche committed Sep 25, 2024
1 parent d044fae commit d700ee3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public void onDataflowVisitReturn(
private boolean getTrueIfNonNullValue(Symbol.MethodSymbol methodSymbol) {
AnnotationMirror annot = NullabilityUtil.findAnnotation(methodSymbol, annotName, false);
if (annot == null) {
return true;
throw new RuntimeException("Annotation should not be null at this point");
}

Map<? extends ExecutableElement, ? extends AnnotationValue> elementValues =
Expand Down

0 comments on commit d700ee3

Please sign in to comment.