diff --git a/nullaway/src/main/java/com/uber/nullaway/GenericsChecks.java b/nullaway/src/main/java/com/uber/nullaway/GenericsChecks.java index be60112492..14fde4ed1f 100644 --- a/nullaway/src/main/java/com/uber/nullaway/GenericsChecks.java +++ b/nullaway/src/main/java/com/uber/nullaway/GenericsChecks.java @@ -547,7 +547,8 @@ public Boolean visitClassType(Type.ClassType lhsType, Type rhsType) { } } // If there is an enclosing type (for non-static inner classes), its type argument nullability - // should also match + // should also match. When there is no enclosing type, getEnclosingType() returns a NoType + // object, which gets handled by the fallback visitType() method return lhsType.getEnclosingType().accept(this, rhsType.getEnclosingType()); }