Skip to content

Commit 5101064

Browse files
committed
tweak
1 parent e1fdda8 commit 5101064

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.google.common.base.Verify;
88
import com.google.errorprone.VisitorState;
99
import com.sun.tools.javac.code.Attribute;
10+
import com.sun.tools.javac.code.BoundKind;
1011
import com.sun.tools.javac.code.Symbol;
1112
import com.sun.tools.javac.code.Type;
1213
import com.sun.tools.javac.code.TypeMetadata;
@@ -293,7 +294,7 @@ public Type visitMethodType(Type.MethodType t, Type other) {
293294
@Override
294295
public Type visitClassType(Type.ClassType t, Type other) {
295296
if (other instanceof Type.WildcardType wt) {
296-
if (wt.isExtendsBound()) {
297+
if (wt.kind.equals(BoundKind.EXTENDS)) {
297298
// As a temporary measure, we restore nullability annotations from the upper bound of the
298299
// wildcard.
299300
// TODO revisit this decision when we add fuller support for inference and wildcards.

nullaway/src/test/java/com/uber/nullaway/jspecify/GenericMethodLambdaOrMethodRefArgTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,6 @@ public void genericMethodMethodRefWildCard() {
445445
import java.util.function.Function;
446446
@NullMarked
447447
class Test {
448-
class Foo<T extends @Nullable Object> {}
449448
static <T, R> R invokeWithReturn(Function <? super T, ? extends @Nullable R> mapper) {
450449
throw new RuntimeException();
451450
}

0 commit comments

Comments
 (0)