Skip to content

Commit

Permalink
Use Guava verify
Browse files Browse the repository at this point in the history
  • Loading branch information
msridhar committed Oct 6, 2023
1 parent ca23496 commit 55fadce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nullaway/src/main/java/com/uber/nullaway/GenericsChecks.java
Original file line number Diff line number Diff line change
Expand Up @@ -738,10 +738,10 @@ private static Type getTypeForSymbol(Symbol symbol, VisitorState state) {
private static Nullness getGenericMethodReturnTypeNullness(
Symbol.MethodSymbol method, Type enclosingType, VisitorState state, Config config) {
Type overriddenMethodType = state.getTypes().memberType(enclosingType, method);
if (!(overriddenMethodType instanceof ExecutableType)) {
throw new RuntimeException(
"expected ExecutableType but instead got " + overriddenMethodType.getClass());
}
verify(
overriddenMethodType instanceof ExecutableType,
"expected ExecutableType but instead got %s",
overriddenMethodType.getClass());
return getTypeNullness(overriddenMethodType.getReturnType(), config);
}

Expand Down

0 comments on commit 55fadce

Please sign in to comment.