Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to EISOP 3.40-eisop1 from 3.39-eisop1 #7

Merged
merged 58 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
1d1a07e
Give DataOutput::write same annotations as OutputStream classes
markro49 May 7, 2023
e57e2ab
Add `@PolySigned` on `OutputStream.write()`
mernst May 7, 2023
956f5a6
Add `@SideEffectFree`
mernst May 10, 2023
85fa8df
Relax signedness specification in `Object`
mernst May 11, 2023
e073c00
Mark `ScheduledThreadPoolExecutor` as annotated for nullness. (#37)
cpovirk Jun 5, 2023
c414784
Annotate the parameter of `List.sort` as `@Nullable`. (#40)
cpovirk Jun 9, 2023
7e9c413
Minor improvements to `Map.merge` usage of `@PolyNull` and `@NonNull`…
cpovirk Jun 11, 2023
3bef906
Remove useless `checker-qual.jar` file and update instructions (#42)
wmdietl Jun 11, 2023
8d7ef60
Annotate `PrintWriter.out` as `@Nullable`. (#43)
cpovirk Jun 12, 2023
193a4a2
Annotate recent `TreeMap` overrides of `compute` and `computeIfAbsent…
cpovirk Jun 19, 2023
9220642
Omit `@NonNull` from `merge` in maps that reject null values. (#47)
cpovirk Jun 19, 2023
193a0c4
Use `@NonNull` in `Map.computeIfPresent` (plus `@PolyNull` in recent …
cpovirk Jun 19, 2023
8e84031
Sort `@Poly*` annotations
mernst Jun 23, 2023
48353d9
have toArray annotations match superclass Collection
markro49 Jul 6, 2023
aeb6587
Use `@PolyNull` in `ConcurrentMap.getOrDefault` (but still not plain …
cpovirk Jul 12, 2023
d70ba16
Improve annotations on `PriorityQueue`. (#49)
cpovirk Jul 12, 2023
a40ff8a
Improve annotations in `PriorityBlockingQueue`. (#50)
cpovirk Jul 12, 2023
4d3d997
Annotate `ConcurrentSkipListMap` for nullness. (#51)
cpovirk Jul 19, 2023
ccdfdd4
Stream ofNullable has Nullable parameter
agentgt Aug 17, 2023
4bec906
Signedness annotations
mernst Aug 23, 2023
3272c84
Add annotations to Enums
smillst Aug 28, 2023
e2d6e22
Permit a null `password` in `KeyStore.getKey`. (#53)
cpovirk Sep 6, 2023
55fe1cd
Annotate the `arg` parameter of `Observer.update` as `@Nullable`. (#54)
cpovirk Sep 6, 2023
dca7dd6
Make `enumerate` accept `@PolyNull Thread[]` (ditto `ThreadGroup`). (…
cpovirk Sep 6, 2023
81d2dde
Annotate `java.util.Properties` better (and `Hashtable` a little, too…
cpovirk Sep 6, 2023
9674c43
Finish annotating the concurrent queues. (#57)
cpovirk Sep 6, 2023
dbd1c77
Add missing `@Nullable` annotations in `ReferenceQueue`. (#35) (#58)
cpovirk Sep 6, 2023
2ea2bba
Make `KeyStore.setKeyEntry` allow a null `password` and `chain`. (#59)
cpovirk Sep 6, 2023
6206589
Update Nullable annotations in `URI.java` (#63)
wmdietl Sep 8, 2023
0bb685c
Fix annotations of `Attributes`. (#62)
cpovirk Sep 8, 2023
b1d56d0
Add+fix annotations in zip+jar streams. (#61)
cpovirk Sep 8, 2023
fddbd35
Annotate `AtomicReference` for nullness. (#52)
cpovirk Sep 8, 2023
8d59f98
Add missing `@Nullable` annotations in serialization streams. (#60)
cpovirk Sep 9, 2023
27bb756
Make Map.entry require non-null parameters (#178)
agentgt Sep 14, 2023
767a7ba
Add missing `@Nullable` annotations on `Comparator.nullsFirst` and `n…
cpovirk Sep 25, 2023
75c7ea6
Add missing `@Nullable` annotations in `ZipEntry`. (#65)
cpovirk Sep 25, 2023
75b4b69
Add missing `@Nullable` annotations in `ClassLoader` and `URLClassLoa…
cpovirk Sep 25, 2023
24c35dd
Annotate `java.lang.reflect.Array` for nullness. (#67)
cpovirk Sep 25, 2023
70f1c79
Annotate `AttributedString` and `AbstractOwnableSynchronizer` for nul…
cpovirk Sep 25, 2023
91ecb6e
Annotate a few `nio` classes for nullness. (#69)
cpovirk Sep 25, 2023
52688e1
Annotate `InetAddress` and friends. (#70)
cpovirk Sep 26, 2023
b6b6321
Add missing `@Nullable` annotation in `Socket`, and annotate related …
cpovirk Sep 26, 2023
cbf4281
Use new `PolyInitialized` qualifier (#39)
Ao-senXiong Sep 30, 2023
7f2fadb
Annotated javax.lang.model.util.Types for nullness. (#179)
smillst Oct 5, 2023
fd93cfc
Merge commit '85fa8df89ac65908f97b735849111248d8e99ec4' of https://gi…
wmdietl Oct 6, 2023
11a1c44
Update for typetools/checker-framework 3.35.0 release (#72)
wmdietl Oct 6, 2023
d0101b8
Merge commit '3272c8497ba4c364c49c253095423d495207a6a6' of https://gi…
wmdietl Oct 16, 2023
1fc2ede
Updates for typetools/checker-framework 3.38.0 release (#73)
wmdietl Oct 17, 2023
2e95e32
Add Optional annotations for primitive numeric Optional wrappers
mernst Oct 21, 2023
1973fa0
Receiver of `orElseThrow(Supplier)` is `@MaybePresent`
mernst Oct 21, 2023
962f4d5
Merge commit '1973fa0811588dd0bb025fdc99345cdb887b3b52' of https://gi…
wmdietl Nov 22, 2023
900f1db
Remove redundant @NonNull annotations
wmdietl Nov 23, 2023
1e32ff5
Add required @NonNull annotation
wmdietl Nov 23, 2023
57f9e65
typetools/checker-framework 3.40.0 release (#76)
wmdietl Nov 24, 2023
f728b15
Remove unnecessary `@NonNull` usages from `<T extends Comparable<? su…
cpovirk Nov 24, 2023
54bd74a
Remove redundant upper bound. (#74)
cpovirk Nov 24, 2023
6ff3183
Merge branch 'merge' into checker-framework-3.39.0-eisop1
Ao-senXiong Apr 2, 2024
1049f0f
Merge branch 'eisop-3.40-test' into checker-framework-3.40.0-eisop1
Ao-senXiong Apr 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,24 @@ resolve conflicts. Then, discard the branch in the fork of jdk17u.
The java.base module contains a copy of the Checker Framework qualifiers (type annotations).
To update that copy, run from this directory:

```
(cd $CHECKERFRAMEWORK && rm -rf checker-qual/build/libs && ./gradlew :checker-qual:sourcesJar) && \
rm -f checker-qual.jar && \
cp -p $CHECKERFRAMEWORK/checker-qual/build/libs/checker-qual-*-sources.jar checker-qual.jar && \
rm -f checker-qual-sources.jar && \
cp -p $CHECKERFRAMEWORK/checker-qual/build/libs/checker-qual-*-sources.jar checker-qual-sources.jar && \
(cd src/java.base/share/classes && rm -rf org/checkerframework && \
unzip ../../../../checker-qual.jar -x 'META-INF*' && \
rm -f org/checkerframework/checker/signedness/SignednessUtilExtra.java && \
unzip ../../../../checker-qual-sources.jar -x 'META-INF*' && \
chmod -R u+w org/checkerframework) && \
jar tf checker-qual.jar | grep '\.java$' | sed 's/\/[^/]*\.java/;/' | sed 's/\//./g' | sed 's/^/ exports /' | sort | uniq
jar tf checker-qual-sources.jar | grep '\.java$' | sed 's/\/[^/]*\.java/;/' | sed 's/\//./g' | sed 's/^/ exports /' | sort | uniq
```

Copy the exports lines that were printed by the last command to
src/java.base/share/classes/module-info.java .
Commit the changes, including the changed top-level `checker-qual.jar` file.
Copy/update the exports lines that were printed by the last command to
`src/java.base/share/classes/module-info.java` .
Commit the changes. Do not include the top-level `checker-qual-source.jar` file.


## The typetools/jdk17u repository

The typetools/jdk17u repository is a merge of `openjdk/jdk17u` and `typetools/jdk`.
The `typetools/jdk17u` repository is a merge of `openjdk/jdk17u` and `typetools/jdk`.
That is, it is a fork of `openjdk/jdk17u`, with Checker Framework type annotations.

**Do not edit the `typetools/jdk17u` repository.**
Expand All @@ -150,6 +151,7 @@ Clone jdk${VER}u repositories into, say, $t/libraries/ .
Determine the last commit in both openjdk:jdk and in openjdk:jdk${VER}u:
run `git log --graph | tac` on both and find the common prefix.

```
last_common_commit=d562d3fcbe22a0443037c5b447e1a41401275814
cd $t/libraries
git clone -- git@github.com:openjdk/jdk.git jdk-fork-openjdk-commit-${last_common_commit}
Expand All @@ -158,7 +160,7 @@ git reset --hard ${last_common_commit}

cd $t/libraries/jdk-fork-${USER}-branch-jdk${VER}
git pull ../jdk-fork-openjdk-commit-${last_common_commit}

```


## Design
Expand Down
Binary file removed checker-qual.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion make/CompileInterimLangtools.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ define SetupInterimModule
DISABLED_WARNINGS := module options, \
JAVAC_FLAGS := \
--module-path $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules \
-cp $(TOPDIR)/checker-qual.jar \
-cp $(TOPDIR)/src/java.base/share/classes/ \
--add-reads $1.interim=ALL-UNNAMED \
$$(INTERIM_LANGTOOLS_ADD_EXPORTS) \
--patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \
Expand Down
2 changes: 1 addition & 1 deletion make/autoconf/spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ INTERIM_LANGTOOLS_ARGS := \
--add-modules $(INTERIM_LANGTOOLS_MODULES_COMMA) \
--module-path $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules \
--patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \
-cp $(TOPDIR)/checker-qual.jar \
-cp $(TOPDIR)/src/java.base/share/classes/ \
$(INTERIM_LANGTOOLS_ADD_EXPORTS) \
#
JAVAC_MAIN_CLASS = -m jdk.compiler.interim/com.sun.tools.javac.Main
Expand Down
3 changes: 2 additions & 1 deletion src/java.base/share/classes/java/io/DataOutput.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.checkerframework.checker.index.qual.IndexOrHigh;
import org.checkerframework.checker.index.qual.LTLengthOf;
import org.checkerframework.checker.index.qual.NonNegative;
import org.checkerframework.checker.signedness.qual.PolySigned;
import org.checkerframework.framework.qual.AnnotatedFor;

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

/**
* Writes a {@code boolean} value to this output stream.
Expand Down
3 changes: 2 additions & 1 deletion src/java.base/share/classes/java/io/ObjectInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.checkerframework.checker.index.qual.LTEqLengthOf;
import org.checkerframework.checker.index.qual.LTLengthOf;
import org.checkerframework.checker.index.qual.NonNegative;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.checkerframework.framework.qual.AnnotatedFor;

/**
Expand All @@ -54,7 +55,7 @@ public interface ObjectInput extends DataInput, AutoCloseable {
* @throws IOException If any of the usual Input/Output
* related exceptions occur.
*/
public Object readObject()
public @Nullable Object readObject()
throws ClassNotFoundException, IOException;

/**
Expand Down
10 changes: 5 additions & 5 deletions src/java.base/share/classes/java/io/ObjectInputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ protected ObjectInputStream() throws IOException, SecurityException {
* stream instead of objects.
* @throws IOException Any of the usual Input/Output related exceptions.
*/
public final Object readObject()
public final @Nullable Object readObject()
throws IOException, ClassNotFoundException {
return readObject(Object.class);
}
Expand Down Expand Up @@ -558,7 +558,7 @@ private final Object readObject(Class<?> type)
* @see #readObject()
* @since 1.2
*/
protected Object readObjectOverride()
protected @Nullable Object readObjectOverride()
throws IOException, ClassNotFoundException
{
return null;
Expand Down Expand Up @@ -613,7 +613,7 @@ protected Object readObjectOverride()
* @throws IOException if an I/O error occurs during deserialization
* @since 1.4
*/
public Object readUnshared() throws IOException, ClassNotFoundException {
public @Nullable Object readUnshared() throws IOException, ClassNotFoundException {
// if nested read, passHandle contains handle of enclosing object
int outerHandle = passHandle;
try {
Expand Down Expand Up @@ -1260,7 +1260,7 @@ public String readUTF() throws IOException {
* @return the deserialization filter for the stream; may be null
* @since 9
*/
public final ObjectInputFilter getObjectInputFilter() {
public final @Nullable ObjectInputFilter getObjectInputFilter() {
return serialFilter;
}

Expand Down Expand Up @@ -1345,7 +1345,7 @@ public final ObjectInputFilter getObjectInputFilter() {
* if the filter has already been set.
* @since 9
*/
public final void setObjectInputFilter(ObjectInputFilter filter) {
public final void setObjectInputFilter(@Nullable ObjectInputFilter filter) {
@SuppressWarnings("removal")
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ public final void writeObject(@Nullable Object obj) throws IOException {
* @see #writeObject(Object)
* @since 1.2
*/
protected void writeObjectOverride(Object obj) throws IOException {
protected void writeObjectOverride(@Nullable Object obj) throws IOException {
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/java.base/share/classes/java/io/OutputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

package java.io;

import org.checkerframework.checker.mustcall.qual.MustCall;
import org.checkerframework.checker.index.qual.IndexOrHigh;
import org.checkerframework.checker.index.qual.LTLengthOf;
import org.checkerframework.checker.index.qual.NonNegative;
import org.checkerframework.checker.interning.qual.UsesObjectEquals;
import org.checkerframework.checker.mustcall.qual.MustCall;
import org.checkerframework.checker.signedness.qual.PolySigned;
import org.checkerframework.framework.qual.AnnotatedFor;

Expand Down Expand Up @@ -88,12 +88,12 @@ private void ensureOpen() throws IOException {
}

@Override
public void write(int b) throws IOException {
public void write(@PolySigned int b) throws IOException {
ensureOpen();
}

@Override
public void write(byte b[], int off, int len) throws IOException {
public void write(@PolySigned byte b[], int off, int len) throws IOException {
Objects.checkFromIndexSize(off, len, b.length);
ensureOpen();
}
Expand Down
2 changes: 1 addition & 1 deletion src/java.base/share/classes/java/io/PrintWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class PrintWriter extends Writer {
*
* @since 1.2
*/
protected Writer out;
protected @Nullable Writer out;

private final boolean autoFlush;
private boolean trouble = false;
Expand Down
12 changes: 6 additions & 6 deletions src/java.base/share/classes/java/lang/Byte.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private ByteCache() {}
@Pure
@StaticallyExecutable
@IntrinsicCandidate
public static @Interned @NewObject @PolyIndex @PolyValue @PolySigned Byte valueOf(@PolyIndex @PolyValue @PolySigned byte b) {
public static @Interned @NewObject @PolyIndex @PolySigned @PolyValue Byte valueOf(@PolyIndex @PolySigned @PolyValue byte b) {
final int offset = 128;
return ByteCache.cache[(int)b + offset];
}
Expand Down Expand Up @@ -380,7 +380,7 @@ public static byte parseByte(String s) throws NumberFormatException {
*/
@StaticallyExecutable
@Deprecated(since="9", forRemoval = true)
public @PolyIndex @PolyValue @PolySigned Byte(@PolyIndex @PolyValue @PolySigned byte value) {
public @PolyIndex @PolySigned @PolyValue Byte(@PolyIndex @PolySigned @PolyValue byte value) {
this.value = value;
}

Expand Down Expand Up @@ -415,7 +415,7 @@ public Byte(String s) throws NumberFormatException {
@Pure
@StaticallyExecutable
@IntrinsicCandidate
public @PolyIndex @PolyValue @PolySigned byte byteValue(@PolyIndex @PolyValue @PolySigned Byte this) {
public @PolyIndex @PolySigned @PolyValue byte byteValue(@PolyIndex @PolySigned @PolyValue Byte this) {
return value;
}

Expand All @@ -426,7 +426,7 @@ public Byte(String s) throws NumberFormatException {
*/
@Pure
@StaticallyExecutable
public @PolyIndex @PolyValue @PolySigned short shortValue(@PolyIndex @PolyValue @PolySigned Byte this) {
public @PolyIndex @PolySigned @PolyValue short shortValue(@PolyIndex @PolySigned @PolyValue Byte this) {
return (short)value;
}

Expand All @@ -437,7 +437,7 @@ public Byte(String s) throws NumberFormatException {
*/
@Pure
@StaticallyExecutable
public @PolyIndex @PolyValue @PolySigned int intValue(@PolyIndex @PolyValue @PolySigned Byte this) {
public @PolyIndex @PolySigned @PolyValue int intValue(@PolyIndex @PolySigned @PolyValue Byte this) {
return (int)value;
}

Expand All @@ -448,7 +448,7 @@ public Byte(String s) throws NumberFormatException {
*/
@Pure
@StaticallyExecutable
public @PolyIndex @PolyValue @PolySigned long longValue(@PolyIndex @PolyValue @PolySigned Byte this) {
public @PolyIndex @PolySigned @PolyValue long longValue(@PolyIndex @PolySigned @PolyValue Byte this) {
return (long)value;
}

Expand Down
3 changes: 2 additions & 1 deletion src/java.base/share/classes/java/lang/Class.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.checkerframework.checker.signature.qual.ClassGetName;
import org.checkerframework.checker.signature.qual.ClassGetSimpleName;
import org.checkerframework.checker.signature.qual.DotSeparatedIdentifiers;
import org.checkerframework.checker.signedness.qual.Signed;
import org.checkerframework.common.reflection.qual.ForName;
import org.checkerframework.common.reflection.qual.GetConstructor;
import org.checkerframework.common.reflection.qual.GetMethod;
Expand Down Expand Up @@ -3947,7 +3948,7 @@ public Void run() {
*/
@SuppressWarnings("unchecked")
@IntrinsicCandidate
public @PolyNull T cast(@PolyNull Object obj) {
public @PolyNull @Signed T cast(@PolyNull Object obj) {
if (obj != null && !isInstance(obj))
throw new ClassCastException(cannotCastMsg(obj));
return (T) obj;
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/classes/java/lang/ClassLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ private static String nameAndId(ClassLoader ld) {
*
* @since 9
*/
protected ClassLoader(String name, ClassLoader parent) {
protected ClassLoader(@Nullable String name, @Nullable ClassLoader parent) {
this(checkCreateClassLoader(name), name, parent);
}

Expand Down Expand Up @@ -499,7 +499,7 @@ protected ClassLoader() {
*
* @since 9
*/
public String getName() {
public @Nullable String getName() {
return name;
}

Expand Down
10 changes: 7 additions & 3 deletions src/java.base/share/classes/java/lang/Enum.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@

import org.checkerframework.checker.index.qual.NonNegative;
import org.checkerframework.checker.initialization.qual.UnknownInitialization;
import org.checkerframework.checker.nullness.qual.UnknownKeyFor;
import org.checkerframework.checker.lock.qual.GuardSatisfied;
import org.checkerframework.checker.lock.qual.GuardedByUnknown;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.checkerframework.checker.tainting.qual.Tainted;
import org.checkerframework.common.value.qual.PolyValue;
import org.checkerframework.dataflow.qual.Pure;
import org.checkerframework.dataflow.qual.SideEffectFree;
import org.checkerframework.framework.qual.AnnotatedFor;
import org.checkerframework.framework.qual.Covariant;

import java.io.IOException;
import java.io.InvalidObjectException;
Expand Down Expand Up @@ -80,7 +83,8 @@
* @jls 8.9.3 Enum Members
* @since 1.5
*/
@AnnotatedFor({"lock", "nullness", "index", "value"})
@AnnotatedFor({"lock", "nullness", "index", "value", "tainting"})
@Covariant(0)
@SuppressWarnings("serial") // No serialVersionUID needed due to
// special-casing of enum classes.
public abstract class Enum<E extends Enum<E>>
Expand Down Expand Up @@ -208,7 +212,7 @@ protected final Object clone(@GuardSatisfied Enum<E> this) throws CloneNotSuppor
* method is the order in which the constants are declared.
*/
@SuppressWarnings({"rawtypes"})
public final int compareTo(E o) {
public final int compareTo(@UnknownKeyFor @Tainted E o) {
Enum<?> other = (Enum<?>)o;
Enum<E> self = this;
if (self.getClass() != other.getClass() && // optimization
Expand All @@ -230,7 +234,7 @@ public final int compareTo(E o) {
* enum type
*/
@SuppressWarnings("unchecked")
public final Class<E> getDeclaringClass() {
public final Class<@Tainted E> getDeclaringClass() {
Class<?> clazz = getClass();
Class<?> zuper = clazz.getSuperclass();
return (zuper == Enum.class) ? (Class<E>)clazz : (Class<E>)zuper;
Expand Down
8 changes: 4 additions & 4 deletions src/java.base/share/classes/java/lang/Integer.java
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ private IntegerCache() {}
@SideEffectFree
@StaticallyExecutable
@IntrinsicCandidate
public static @NewObject @PolyIndex @PolyValue @PolySigned Integer valueOf(@PolyIndex @PolyValue @PolySigned int i) {
public static @NewObject @PolyIndex @PolySigned @PolyValue Integer valueOf(@PolyIndex @PolySigned @PolyValue int i) {
if (i >= IntegerCache.low && i <= IntegerCache.high)
return IntegerCache.cache[i + (-IntegerCache.low)];
return new Integer(i);
Expand Down Expand Up @@ -1162,7 +1162,7 @@ private IntegerCache() {}
@SideEffectFree
@StaticallyExecutable
@Deprecated(since="9", forRemoval = true)
public @PolyIndex @PolyValue @PolySigned Integer(@PolyIndex @PolyValue @PolySigned int value) {
public @PolyIndex @PolySigned @PolyValue Integer(@PolyIndex @PolySigned @PolyValue int value) {
this.value = value;
}

Expand Down Expand Up @@ -1219,7 +1219,7 @@ public Integer(String s) throws NumberFormatException {
@Pure
@StaticallyExecutable
@IntrinsicCandidate
public @PolyIndex @PolyValue @PolySigned int intValue(@PolyIndex @PolyValue @PolySigned Integer this) {
public @PolyIndex @PolySigned @PolyValue int intValue(@PolyIndex @PolySigned @PolyValue Integer this) {
return value;
}

Expand All @@ -1231,7 +1231,7 @@ public Integer(String s) throws NumberFormatException {
*/
@Pure
@StaticallyExecutable
public @PolyIndex @PolyValue @PolySigned long longValue(@PolyIndex @PolyValue @PolySigned Integer this) {
public @PolyIndex @PolySigned @PolyValue long longValue(@PolyIndex @PolySigned @PolyValue Integer this) {
return (long)value;
}

Expand Down
6 changes: 3 additions & 3 deletions src/java.base/share/classes/java/lang/Long.java
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ private LongCache() {}
@SideEffectFree
@StaticallyExecutable
@IntrinsicCandidate
public static @NewObject @PolyValue @PolySigned Long valueOf(@PolyValue @PolySigned long l) {
public static @NewObject @PolySigned @PolyValue Long valueOf(@PolySigned @PolyValue long l) {
final int offset = 128;
if (l >= -128 && l <= 127) { // will cache
return LongCache.cache[(int)l + offset];
Expand Down Expand Up @@ -1380,7 +1380,7 @@ else if (nm.startsWith("0", index) && nm.length() > 1 + index) {
@SideEffectFree
@StaticallyExecutable
@Deprecated(since="9", forRemoval = true)
public @PolyIndex @PolyValue @PolySigned Long(@PolyIndex @PolyValue @PolySigned long value) {
public @PolyIndex @PolySigned @PolyValue Long(@PolyIndex @PolySigned @PolyValue long value) {
this.value = value;
}

Expand Down Expand Up @@ -1449,7 +1449,7 @@ public Long(String s) throws NumberFormatException {
@Pure
@StaticallyExecutable
@IntrinsicCandidate
public @PolyIndex @PolyValue @PolySigned long longValue(@PolyIndex @PolyValue @PolySigned Long this) {
public @PolyIndex @PolySigned @PolyValue long longValue(@PolyIndex @PolySigned @PolyValue Long this) {
return value;
}

Expand Down
Loading