Skip to content

Commit 11a1c44

Browse files
authored
Update for typetools/checker-framework 3.35.0 release (typetools#72)
2 parents cbf4281 + fd93cfc commit 11a1c44

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

src/java.base/share/classes/java/io/DataOutput.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import org.checkerframework.checker.index.qual.IndexOrHigh;
2929
import org.checkerframework.checker.index.qual.LTLengthOf;
3030
import org.checkerframework.checker.index.qual.NonNegative;
31+
import org.checkerframework.checker.signedness.qual.PolySigned;
3132
import org.checkerframework.framework.qual.AnnotatedFor;
3233

3334
/**
@@ -99,7 +100,7 @@ public interface DataOutput {
99100
* @param len the number of bytes to write.
100101
* @throws IOException if an I/O error occurs.
101102
*/
102-
void write(byte b[], @IndexOrHigh({"#1"}) int off, @LTLengthOf(value={"#1"}, offset={"#2 - 1"}) @NonNegative int len) throws IOException;
103+
void write(@PolySigned byte b[], @IndexOrHigh({"#1"}) int off, @LTLengthOf(value={"#1"}, offset={"#2 - 1"}) @NonNegative int len) throws IOException;
103104

104105
/**
105106
* Writes a {@code boolean} value to this output stream.

src/java.base/share/classes/java/io/OutputStream.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525

2626
package java.io;
2727

28-
import org.checkerframework.checker.mustcall.qual.MustCall;
2928
import org.checkerframework.checker.index.qual.IndexOrHigh;
3029
import org.checkerframework.checker.index.qual.LTLengthOf;
3130
import org.checkerframework.checker.index.qual.NonNegative;
3231
import org.checkerframework.checker.interning.qual.UsesObjectEquals;
32+
import org.checkerframework.checker.mustcall.qual.MustCall;
3333
import org.checkerframework.checker.signedness.qual.PolySigned;
3434
import org.checkerframework.framework.qual.AnnotatedFor;
3535

@@ -88,12 +88,12 @@ private void ensureOpen() throws IOException {
8888
}
8989

9090
@Override
91-
public void write(int b) throws IOException {
91+
public void write(@PolySigned int b) throws IOException {
9292
ensureOpen();
9393
}
9494

9595
@Override
96-
public void write(byte b[], int off, int len) throws IOException {
96+
public void write(@PolySigned byte b[], int off, int len) throws IOException {
9797
Objects.checkFromIndexSize(off, len, b.length);
9898
ensureOpen();
9999
}

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.

src/java.base/share/classes/java/util/Collections.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5825,6 +5825,7 @@ public static <T> boolean addAll(@GuardSatisfied Collection<? super T> c, T... e
58255825
* @throws IllegalArgumentException if {@code map} is not empty
58265826
* @since 1.6
58275827
*/
5828+
@SideEffectFree
58285829
public static <E> Set<E> newSetFromMap(Map<E, Boolean> map) {
58295830
return new SetFromMap<>(map);
58305831
}

0 commit comments

Comments
 (0)