Skip to content

Commit 2bd7859

Browse files
cushonError Prone Team
authored and
Error Prone Team
committed
Add an assertion to try to help debug #4225
PiperOrigin-RevId: 595414757
1 parent 58a9e80 commit 2bd7859

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/main/java/com/google/errorprone/bugpatterns/nullness/NullnessUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import static com.sun.source.tree.Tree.Kind.PARAMETERIZED_TYPE;
3939
import static com.sun.tools.javac.parser.Tokens.TokenKind.DOT;
4040
import static java.lang.Boolean.TRUE;
41+
import static java.util.Objects.requireNonNull;
4142

4243
import com.google.auto.value.AutoValue;
4344
import com.google.common.collect.ImmutableSet;
@@ -260,6 +261,7 @@ static boolean hasExtraParameterForEnclosingInstance(MethodSymbol symbol) {
260261
return false;
261262
}
262263
ClassSymbol constructedClass = enclosingClass(symbol);
264+
requireNonNull(constructedClass, symbol::toString);
263265
return enclosingClass(constructedClass) != null && !constructedClass.isStatic();
264266
}
265267

0 commit comments

Comments
 (0)