Skip to content

Commit 85fa8df

Browse files
authored
Relax signedness specification in Object
1 parent 956f5a6 commit 85fa8df

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import org.checkerframework.checker.mustcall.qual.MustCall;
3535
import org.checkerframework.checker.nullness.qual.EnsuresNonNullIf;
3636
import org.checkerframework.checker.nullness.qual.Nullable;
37+
import org.checkerframework.checker.signedness.qual.UnknownSignedness;
3738
import org.checkerframework.checker.tainting.qual.Untainted;
3839
import org.checkerframework.common.aliasing.qual.Unique;
3940
import org.checkerframework.common.reflection.qual.GetClass;
@@ -86,7 +87,7 @@ public class Object {
8687
@SafeEffect
8788
@Pure
8889
@IntrinsicCandidate
89-
public final native Class<? extends @MustCall() Object> getClass(@PolyUI @GuardSatisfied @UnknownInitialization Object this);
90+
public final native Class<? extends @MustCall() Object> getClass(@PolyUI @GuardSatisfied @UnknownInitialization @UnknownSignedness Object this);
9091

9192
/**
9293
* Returns a hash code value for the object. This method is
@@ -123,7 +124,7 @@ public class Object {
123124
*/
124125
@Pure
125126
@IntrinsicCandidate
126-
public native int hashCode(@GuardSatisfied Object this);
127+
public native int hashCode(@GuardSatisfied @UnknownSignedness Object this);
127128

128129
/**
129130
* Indicates whether some other object is "equal to" this one.

0 commit comments

Comments
 (0)