Skip to content

Commit 4bec906

Browse files
committed
Signedness annotations
1 parent ccdfdd4 commit 4bec906

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/java.base/share/classes/java/lang/Class.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import org.checkerframework.checker.signature.qual.ClassGetName;
3737
import org.checkerframework.checker.signature.qual.ClassGetSimpleName;
3838
import org.checkerframework.checker.signature.qual.DotSeparatedIdentifiers;
39+
import org.checkerframework.checker.signedness.qual.Signed;
3940
import org.checkerframework.common.reflection.qual.ForName;
4041
import org.checkerframework.common.reflection.qual.GetConstructor;
4142
import org.checkerframework.common.reflection.qual.GetMethod;
@@ -3947,7 +3948,7 @@ public Void run() {
39473948
*/
39483949
@SuppressWarnings("unchecked")
39493950
@IntrinsicCandidate
3950-
public @PolyNull T cast(@PolyNull Object obj) {
3951+
public @PolyNull @Signed T cast(@PolyNull Object obj) {
39513952
if (obj != null && !isInstance(obj))
39523953
throw new ClassCastException(cannotCastMsg(obj));
39533954
return (T) obj;

0 commit comments

Comments
 (0)