Skip to content

Commit

Permalink
Changes for making java.lang.Integer
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunhkumar committed Nov 11, 2023
1 parent 320e17e commit 6d47bb5
Show file tree
Hide file tree
Showing 100 changed files with 508 additions and 244 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class NativeCipherBlockChaining extends FeedbackCipher {

protected final static int numContexts = 4096;
protected static long[] contexts;
protected static ArrayDeque<Integer> avStack = new ArrayDeque<Integer>(numContexts);
protected static ArrayDeque<Integer.ref> avStack = new ArrayDeque<Integer.ref>(numContexts);

private static final NativeCrypto nativeCrypto;
private static final Cleaner contextCleaner;
Expand Down
2 changes: 1 addition & 1 deletion make/CompileToolsJdk.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
DISABLED_WARNINGS := options, \
JAVAC_FLAGS := \
JAVAC_FLAGS := -XDenablePrimitiveClasses\
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
--add-exports java.base/sun.text=ALL-UNNAMED \
--add-exports java.base/sun.security.util=ALL-UNNAMED, \
Expand Down
33 changes: 33 additions & 0 deletions make/javac.20231110_055857.args
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-g
-Xlint:all
-source
21
-target
21
-implicit:none
-Xprefer:source
-XDignore.symbol.file=true
-encoding
ascii
-XDenablePrimitiveClasses
-Xdoclint:all/protected
-Xdoclint/package:java.*,javax.*
-XDenablePrimitiveClasses
-XDstringConcat=inline
--module-source-path
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/gensrc/*:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/linux/classes:/openj9-openjdk-jdk.valuetypes/src/*/linux/classes:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/unix/classes:/openj9-openjdk-jdk.valuetypes/src/*/unix/classes:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/share/classes:/openj9-openjdk-jdk.valuetypes/src/*/share/classes
--module-path

--system
none
-classpath
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/buildtools/depend
"-Xplugin:depend /openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_pubapi"
-XDinternalAPIPath=/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_internalapi
-XDLOG_LEVEL=warn
-XDmodifiedInputs=/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch.modfiles.fixed
-d
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules
-h
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/headers.java.base.tmp
@/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch.filelist
33 changes: 33 additions & 0 deletions make/javac.20231110_060543.args
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-g
-Xlint:all
-source
21
-target
21
-implicit:none
-Xprefer:source
-XDignore.symbol.file=true
-encoding
ascii
-XDenablePrimitiveClasses
-Xdoclint:all/protected
-Xdoclint/package:java.*,javax.*
-XDenablePrimitiveClasses
-XDstringConcat=inline
--module-source-path
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/gensrc/*:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/linux/classes:/openj9-openjdk-jdk.valuetypes/src/*/linux/classes:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/unix/classes:/openj9-openjdk-jdk.valuetypes/src/*/unix/classes:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/share/classes:/openj9-openjdk-jdk.valuetypes/src/*/share/classes
--module-path

--system
none
-classpath
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/buildtools/depend
"-Xplugin:depend /openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_pubapi"
-XDinternalAPIPath=/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_internalapi
-XDLOG_LEVEL=warn
-XDmodifiedInputs=/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch.modfiles.fixed
-d
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules
-h
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/headers.java.base.tmp
@/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch.filelist
33 changes: 33 additions & 0 deletions make/javac.20231110_062409.args
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-g
-Xlint:all
-source
21
-target
21
-implicit:none
-Xprefer:source
-XDignore.symbol.file=true
-encoding
ascii
-XDenablePrimitiveClasses
-Xdoclint:all/protected
-Xdoclint/package:java.*,javax.*
-XDenablePrimitiveClasses
-XDstringConcat=inline
--module-source-path
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/gensrc/*:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/linux/classes:/openj9-openjdk-jdk.valuetypes/src/*/linux/classes:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/unix/classes:/openj9-openjdk-jdk.valuetypes/src/*/unix/classes:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/share/classes:/openj9-openjdk-jdk.valuetypes/src/*/share/classes
--module-path

--system
none
-classpath
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/buildtools/depend
"-Xplugin:depend /openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_pubapi"
-XDinternalAPIPath=/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_internalapi
-XDLOG_LEVEL=warn
-XDmodifiedInputs=/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch.modfiles.fixed
-d
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules
-h
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/headers.java.base.tmp
@/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch.filelist
33 changes: 33 additions & 0 deletions make/javac.20231110_070604.args
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-g
-Xlint:all
-source
21
-target
21
-implicit:none
-Xprefer:source
-XDignore.symbol.file=true
-encoding
ascii
-XDenablePrimitiveClasses
-Xdoclint:all/protected
-Xdoclint/package:java.*,javax.*
-XDenablePrimitiveClasses
-XDstringConcat=inline
--module-source-path
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/gensrc/*:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/linux/classes:/openj9-openjdk-jdk.valuetypes/src/*/linux/classes:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/unix/classes:/openj9-openjdk-jdk.valuetypes/src/*/unix/classes:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/share/classes:/openj9-openjdk-jdk.valuetypes/src/*/share/classes
--module-path

--system
none
-classpath
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/buildtools/depend
"-Xplugin:depend /openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_pubapi"
-XDinternalAPIPath=/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_internalapi
-XDLOG_LEVEL=warn
-XDmodifiedInputs=/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch.modfiles.fixed
-d
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules
-h
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/headers.java.base.tmp
@/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch.filelist
33 changes: 33 additions & 0 deletions make/javac.20231110_112050.args
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-g
-Xlint:all
-source
21
-target
21
-implicit:none
-Xprefer:source
-XDignore.symbol.file=true
-encoding
ascii
-XDenablePrimitiveClasses
-Xdoclint:all/protected
-Xdoclint/package:java.*,javax.*
-XDenablePrimitiveClasses
-XDstringConcat=inline
--module-source-path
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/gensrc/*:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/linux/classes:/openj9-openjdk-jdk.valuetypes/src/*/linux/classes:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/unix/classes:/openj9-openjdk-jdk.valuetypes/src/*/unix/classes:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/share/classes:/openj9-openjdk-jdk.valuetypes/src/*/share/classes
--module-path

--system
none
-classpath
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/buildtools/depend
"-Xplugin:depend /openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_pubapi"
-XDinternalAPIPath=/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_internalapi
-XDLOG_LEVEL=warn
-XDmodifiedInputs=/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch.modfiles.fixed
-d
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules
-h
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/headers.java.base.tmp
@/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch.filelist
33 changes: 33 additions & 0 deletions make/javac.20231110_142616.args
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-g
-Xlint:all
-source
21
-target
21
-implicit:none
-Xprefer:source
-XDignore.symbol.file=true
-encoding
ascii
-XDenablePrimitiveClasses
-Xdoclint:all/protected
-Xdoclint/package:java.*,javax.*
-XDenablePrimitiveClasses
-XDstringConcat=inline
--module-source-path
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/gensrc/*:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/linux/classes:/openj9-openjdk-jdk.valuetypes/src/*/linux/classes:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/unix/classes:/openj9-openjdk-jdk.valuetypes/src/*/unix/classes:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/share/classes:/openj9-openjdk-jdk.valuetypes/src/*/share/classes
--module-path

--system
none
-classpath
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/buildtools/depend
"-Xplugin:depend /openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_pubapi"
-XDinternalAPIPath=/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_internalapi
-XDLOG_LEVEL=warn
-XDmodifiedInputs=/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch.modfiles.fixed
-d
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules
-h
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/headers.java.base.tmp
@/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch.filelist
33 changes: 33 additions & 0 deletions make/javac.20231110_175011.args
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-g
-Xlint:all
-source
21
-target
21
-implicit:none
-Xprefer:source
-XDignore.symbol.file=true
-encoding
ascii
-XDenablePrimitiveClasses
-Xdoclint:all/protected
-Xdoclint/package:java.*,javax.*
-XDenablePrimitiveClasses
-XDstringConcat=inline
--module-source-path
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/gensrc/*:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/linux/classes:/openj9-openjdk-jdk.valuetypes/src/*/linux/classes:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/unix/classes:/openj9-openjdk-jdk.valuetypes/src/*/unix/classes:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/share/classes:/openj9-openjdk-jdk.valuetypes/src/*/share/classes
--module-path

--system
none
-classpath
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/buildtools/depend
"-Xplugin:depend /openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_pubapi"
-XDinternalAPIPath=/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_internalapi
-XDLOG_LEVEL=warn
-XDmodifiedInputs=/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch.modfiles.fixed
-d
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules
-h
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/headers.java.base.tmp
@/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch.filelist
33 changes: 33 additions & 0 deletions make/javac.20231110_175623.args
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-g
-Xlint:all
-source
21
-target
21
-implicit:none
-Xprefer:source
-XDignore.symbol.file=true
-encoding
ascii
-XDenablePrimitiveClasses
-Xdoclint:all/protected
-Xdoclint/package:java.*,javax.*
-XDenablePrimitiveClasses
-XDstringConcat=inline
--module-source-path
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/gensrc/*:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/linux/classes:/openj9-openjdk-jdk.valuetypes/src/*/linux/classes:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/unix/classes:/openj9-openjdk-jdk.valuetypes/src/*/unix/classes:/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/j9jcl/*/share/classes:/openj9-openjdk-jdk.valuetypes/src/*/share/classes
--module-path

--system
none
-classpath
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/buildtools/depend
"-Xplugin:depend /openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_pubapi"
-XDinternalAPIPath=/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_internalapi
-XDLOG_LEVEL=warn
-XDmodifiedInputs=/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch.modfiles.fixed
-d
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules
-h
/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/support/headers.java.base.tmp
@/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/jdk/modules/java.base/_the.java.base_batch.filelist
2 changes: 1 addition & 1 deletion make/modules/jdk.compiler/Gendata.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ $(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
INCLUDES := build/tools/symbolgenerator com/sun/tools/classfile, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols, \
DISABLED_WARNINGS := options, \
JAVAC_FLAGS := \
JAVAC_FLAGS := -XDenablePrimitiveClasses\
$(INTERIM_LANGTOOLS_ARGS) \
$(COMPILECREATESYMBOLS_ADD_EXPORTS), \
))
Expand Down
2 changes: 1 addition & 1 deletion make/modules/jdk.javadoc/Gendata.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ $(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
INCLUDES := build/tools/symbolgenerator com/sun/tools/classfile, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols_javadoc, \
DISABLED_WARNINGS := options, \
JAVAC_FLAGS := \
JAVAC_FLAGS := -XDenablePrimitiveClasses\
$(INTERIM_LANGTOOLS_ARGS) \
$(COMPILECREATESYMBOLS_ADD_EXPORTS), \
))
Expand Down
2 changes: 1 addition & 1 deletion make/test/BuildFailureHandler.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ $(eval $(call SetupJavaCompilation, BUILD_FAILURE_HANDLER, \
COPY := .properties, \
CLASSPATH := $(JTREG_JAR) $(TOOLS_JAR), \
JAR := $(FH_JAR), \
JAVAC_FLAGS := -XDstringConcat=inline, \
JAVAC_FLAGS := -XDenablePrimitiveClasses -XDstringConcat=inline, \
))

TARGETS += $(BUILD_FAILURE_HANDLER)
Expand Down
4 changes: 2 additions & 2 deletions make/test/BuildMicrobenchmark.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ $(eval $(call SetupJavaCompilation, BUILD_INDIFY, \
INCLUDE_FILES := indify/Indify.java, \
DISABLED_WARNINGS := rawtypes serial options, \
BIN := $(MICROBENCHMARK_TOOLS_CLASSES), \
JAVAC_FLAGS := -XDstringConcat=inline -Xprefer:newer, \
JAVAC_FLAGS := -XDenablePrimitiveClasses -XDstringConcat=inline -Xprefer:newer, \
))

#### Compile Targets
Expand All @@ -94,7 +94,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
DISABLED_WARNINGS := processing rawtypes unchecked cast serial preview deprecation, \
SRC := $(MICROBENCHMARK_SRC), \
BIN := $(MICROBENCHMARK_CLASSES), \
JAVAC_FLAGS := --add-exports java.base/sun.security.util=ALL-UNNAMED \
JAVAC_FLAGS := -XDenablePrimitiveClasses --add-exports java.base/sun.security.util=ALL-UNNAMED \
--add-exports java.base/sun.invoke.util=ALL-UNNAMED \
--add-exports java.base/jdk.internal.vm=ALL-UNNAMED \
-XDenablePrimitiveClasses \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class EPollSelectorImpl extends SelectorImpl {
private final EventFD eventfd;

// maps file descriptor to selection key, synchronize on selector
private final Map<Integer, SelectionKeyImpl> fdToKey = new HashMap<>();
private final Map<Integer.ref, SelectionKeyImpl> fdToKey = new HashMap<>();

// pending new registrations/updates, queued by setEventOps
private final Object updateLock = new Object();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private static class Poller extends AbstractPoller {
// socketpair used to shutdown polling thread
private final int socketpair[];
// maps watch descriptor to Key
private final Map<Integer,LinuxWatchKey> wdToKey;
private final Map<Integer.ref,LinuxWatchKey> wdToKey;
// address of read buffer
private final long address;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ final class ConditionalSpecialCasing {
};

// A hash table that contains the above entries
private static final HashMap<Integer, HashSet<Entry>> entryTable = new HashMap<>();
private static final HashMap<Integer.ref, HashSet<Entry>> entryTable = new HashMap<>();
static {
// create hashtable from the entry
for (Entry cur : entry) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ protected Hashes computeValue(Class<?> type) {
};

@SuppressWarnings("serial")
private static class Hashes extends LinkedHashMap<Integer, Boolean> {
private static class Hashes extends LinkedHashMap<Integer.ref, Boolean> {
boolean add(int hash) {
return (putIfAbsent(hash, Boolean.TRUE) == null);
}
@Override
protected boolean removeEldestEntry(Map.Entry<Integer, Boolean> oldest) {
protected boolean removeEldestEntry(Map.Entry<Integer.ref, Boolean> oldest) {
// limit number of hashes
return size() > 8;
}
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/classes/java/lang/ProcessHandleImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ final class ProcessHandleImpl implements ProcessHandle {
return Executors.newCachedThreadPool(threadFactory);
});

private static class ExitCompletion extends CompletableFuture<Integer> {
private static class ExitCompletion extends CompletableFuture<Integer.ref> {
final boolean isReaping;

ExitCompletion(boolean isReaping) {
Expand Down Expand Up @@ -137,7 +137,7 @@ private static void privilegedThreadSetDaemon(Thread thread, boolean on) {
*
* @param shouldReap true if the exit value should be reaped
*/
static CompletableFuture<Integer> completion(long pid, boolean shouldReap) {
static CompletableFuture<Integer.ref> completion(long pid, boolean shouldReap) {
// check canonicalizing cache 1st
ExitCompletion completion = completions.get(pid);
// re-try until we get a completion that shouldReap => isReaping
Expand Down
Loading

0 comments on commit 6d47bb5

Please sign in to comment.