Skip to content

Commit 861c5e1

Browse files
committed
extract local
1 parent 5476215 commit 861c5e1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nullaway/src/main/java/com/uber/nullaway/generics/GenericsChecks.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,8 @@ public static void checkTypeParameterNullnessForFunctionReturnType(
457457
Symbol.MethodSymbol methodSymbol,
458458
NullAway analysis,
459459
VisitorState state) {
460-
if (!analysis.getConfig().isJSpecifyMode()) {
460+
Config config = analysis.getConfig();
461+
if (!config.isJSpecifyMode()) {
461462
return;
462463
}
463464

@@ -466,11 +467,10 @@ public static void checkTypeParameterNullnessForFunctionReturnType(
466467
// bail out of any checking involving raw types for now
467468
return;
468469
}
469-
Type returnExpressionType = getTreeType(retExpr, analysis.getConfig());
470+
Type returnExpressionType = getTreeType(retExpr, config);
470471
if (formalReturnType != null && returnExpressionType != null) {
471472
boolean isReturnTypeValid =
472-
subtypeParameterNullability(
473-
formalReturnType, returnExpressionType, state, analysis.getConfig());
473+
subtypeParameterNullability(formalReturnType, returnExpressionType, state, config);
474474
if (!isReturnTypeValid) {
475475
reportInvalidReturnTypeError(
476476
retExpr, formalReturnType, returnExpressionType, state, analysis);

0 commit comments

Comments
 (0)