diff --git a/closed/src/java.base/share/classes/com/sun/crypto/provider/NativeCipherBlockChaining.java b/closed/src/java.base/share/classes/com/sun/crypto/provider/NativeCipherBlockChaining.java index f6789c25331..9669ac25f4c 100755 --- a/closed/src/java.base/share/classes/com/sun/crypto/provider/NativeCipherBlockChaining.java +++ b/closed/src/java.base/share/classes/com/sun/crypto/provider/NativeCipherBlockChaining.java @@ -52,7 +52,7 @@ class NativeCipherBlockChaining extends FeedbackCipher { protected final static int numContexts = 4096; protected static long[] contexts; - protected static ArrayDeque avStack = new ArrayDeque(numContexts); + protected static ArrayDeque avStack = new ArrayDeque(numContexts); private static final NativeCrypto nativeCrypto; private static final Cleaner contextCleaner; diff --git a/make/CompileToolsJdk.gmk b/make/CompileToolsJdk.gmk index f56b4f3ce47..5415dbfbc8b 100755 --- a/make/CompileToolsJdk.gmk +++ b/make/CompileToolsJdk.gmk @@ -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, \ diff --git a/make/javac.20231110_055857.args b/make/javac.20231110_055857.args new file mode 100644 index 00000000000..2646ad91eea --- /dev/null +++ b/make/javac.20231110_055857.args @@ -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 diff --git a/make/javac.20231110_060543.args b/make/javac.20231110_060543.args new file mode 100644 index 00000000000..2646ad91eea --- /dev/null +++ b/make/javac.20231110_060543.args @@ -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 diff --git a/make/javac.20231110_062409.args b/make/javac.20231110_062409.args new file mode 100644 index 00000000000..2646ad91eea --- /dev/null +++ b/make/javac.20231110_062409.args @@ -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 diff --git a/make/javac.20231110_070604.args b/make/javac.20231110_070604.args new file mode 100644 index 00000000000..2646ad91eea --- /dev/null +++ b/make/javac.20231110_070604.args @@ -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 diff --git a/make/javac.20231110_112050.args b/make/javac.20231110_112050.args new file mode 100644 index 00000000000..2646ad91eea --- /dev/null +++ b/make/javac.20231110_112050.args @@ -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 diff --git a/make/javac.20231110_142616.args b/make/javac.20231110_142616.args new file mode 100644 index 00000000000..2646ad91eea --- /dev/null +++ b/make/javac.20231110_142616.args @@ -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 diff --git a/make/javac.20231110_175011.args b/make/javac.20231110_175011.args new file mode 100644 index 00000000000..2646ad91eea --- /dev/null +++ b/make/javac.20231110_175011.args @@ -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 diff --git a/make/javac.20231110_175623.args b/make/javac.20231110_175623.args new file mode 100644 index 00000000000..2646ad91eea --- /dev/null +++ b/make/javac.20231110_175623.args @@ -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 diff --git a/make/modules/jdk.compiler/Gendata.gmk b/make/modules/jdk.compiler/Gendata.gmk index 5471fa1127c..f18426a6d49 100755 --- a/make/modules/jdk.compiler/Gendata.gmk +++ b/make/modules/jdk.compiler/Gendata.gmk @@ -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), \ )) diff --git a/make/modules/jdk.javadoc/Gendata.gmk b/make/modules/jdk.javadoc/Gendata.gmk index 69c93c29468..485befc3599 100755 --- a/make/modules/jdk.javadoc/Gendata.gmk +++ b/make/modules/jdk.javadoc/Gendata.gmk @@ -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), \ )) diff --git a/make/test/BuildFailureHandler.gmk b/make/test/BuildFailureHandler.gmk index e69c9bf6fea..dbe53c8b68d 100755 --- a/make/test/BuildFailureHandler.gmk +++ b/make/test/BuildFailureHandler.gmk @@ -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) diff --git a/make/test/BuildMicrobenchmark.gmk b/make/test/BuildMicrobenchmark.gmk index 0644f073ce5..f113f7e779e 100755 --- a/make/test/BuildMicrobenchmark.gmk +++ b/make/test/BuildMicrobenchmark.gmk @@ -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 @@ -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 \ diff --git a/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java b/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java index e13fe4c93f3..c8e0236fdb3 100755 --- a/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java +++ b/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java @@ -63,7 +63,7 @@ class EPollSelectorImpl extends SelectorImpl { private final EventFD eventfd; // maps file descriptor to selection key, synchronize on selector - private final Map fdToKey = new HashMap<>(); + private final Map fdToKey = new HashMap<>(); // pending new registrations/updates, queued by setEventOps private final Object updateLock = new Object(); diff --git a/src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java b/src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java index 863b8cd7aff..802ed0583af 100755 --- a/src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java +++ b/src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java @@ -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 wdToKey; + private final Map wdToKey; // address of read buffer private final long address; diff --git a/src/java.base/share/classes/java/lang/ConditionalSpecialCasing.java b/src/java.base/share/classes/java/lang/ConditionalSpecialCasing.java index 17ec3601ec6..070118d9697 100755 --- a/src/java.base/share/classes/java/lang/ConditionalSpecialCasing.java +++ b/src/java.base/share/classes/java/lang/ConditionalSpecialCasing.java @@ -89,7 +89,7 @@ final class ConditionalSpecialCasing { }; // A hash table that contains the above entries - private static final HashMap> entryTable = new HashMap<>(); + private static final HashMap> entryTable = new HashMap<>(); static { // create hashtable from the entry for (Entry cur : entry) { diff --git a/src/java.base/share/classes/java/lang/PinnedThreadPrinter.java b/src/java.base/share/classes/java/lang/PinnedThreadPrinter.java index 02e0683a1b9..a8c230d9da9 100755 --- a/src/java.base/share/classes/java/lang/PinnedThreadPrinter.java +++ b/src/java.base/share/classes/java/lang/PinnedThreadPrinter.java @@ -60,12 +60,12 @@ protected Hashes computeValue(Class type) { }; @SuppressWarnings("serial") - private static class Hashes extends LinkedHashMap { + private static class Hashes extends LinkedHashMap { boolean add(int hash) { return (putIfAbsent(hash, Boolean.TRUE) == null); } @Override - protected boolean removeEldestEntry(Map.Entry oldest) { + protected boolean removeEldestEntry(Map.Entry oldest) { // limit number of hashes return size() > 8; } diff --git a/src/java.base/share/classes/java/lang/ProcessHandleImpl.java b/src/java.base/share/classes/java/lang/ProcessHandleImpl.java index 7dd6bf6a5e4..4add4a8d983 100755 --- a/src/java.base/share/classes/java/lang/ProcessHandleImpl.java +++ b/src/java.base/share/classes/java/lang/ProcessHandleImpl.java @@ -107,7 +107,7 @@ final class ProcessHandleImpl implements ProcessHandle { return Executors.newCachedThreadPool(threadFactory); }); - private static class ExitCompletion extends CompletableFuture { + private static class ExitCompletion extends CompletableFuture { final boolean isReaping; ExitCompletion(boolean isReaping) { @@ -137,7 +137,7 @@ private static void privilegedThreadSetDaemon(Thread thread, boolean on) { * * @param shouldReap true if the exit value should be reaped */ - static CompletableFuture completion(long pid, boolean shouldReap) { + static CompletableFuture completion(long pid, boolean shouldReap) { // check canonicalizing cache 1st ExitCompletion completion = completions.get(pid); // re-try until we get a completion that shouldReap => isReaping diff --git a/src/java.base/share/classes/java/lang/Runtime.java b/src/java.base/share/classes/java/lang/Runtime.java index 25d2351a24e..b29a5543fcb 100755 --- a/src/java.base/share/classes/java/lang/Runtime.java +++ b/src/java.base/share/classes/java/lang/Runtime.java @@ -1027,9 +1027,9 @@ public static Version version() { public static final class Version implements Comparable { - private final List version; + private final List version; private final Optional pre; - private final Optional build; + private final Optional build; private final Optional optional; /* @@ -1038,9 +1038,9 @@ public static final class Version * unmodifiable list, the caller MUST hand the list over to this * constructor and never change the underlying list. */ - private Version(List unmodifiableListOfVersions, + private Version(List unmodifiableListOfVersions, Optional pre, - Optional build, + Optional build, Optional optional) { this.version = unmodifiableListOfVersions; @@ -1249,7 +1249,7 @@ public int security() { * @return An unmodifiable list of the integers * represented in the version number */ - public List version() { + public List version() { return version; } @@ -1267,7 +1267,7 @@ public Optional pre() { * * @return The optional build number. */ - public Optional build() { + public Optional build() { return build; } diff --git a/src/java.base/share/classes/java/lang/VersionProps.java.template b/src/java.base/share/classes/java/lang/VersionProps.java.template index d58be681f55..d65dcfa3cca 100755 --- a/src/java.base/share/classes/java/lang/VersionProps.java.template +++ b/src/java.base/share/classes/java/lang/VersionProps.java.template @@ -130,7 +130,7 @@ class VersionProps { } // This method is reflectively used by regression tests. - static List parseVersionNumbers(String version) { + static List parseVersionNumbers(String version) { // Let's find the size of an array required to hold $VNUM components int size = 0; int prevIndex = 0; @@ -159,7 +159,7 @@ class VersionProps { return List.of(verNumbers); } - static List versionNumbers() { + static List versionNumbers() { return parseVersionNumbers(VERSION_NUMBER); } @@ -167,7 +167,7 @@ class VersionProps { return optionalOf(VERSION_PRE); } - static Optional build() { + static Optional build() { return VERSION_BUILD.isEmpty() ? Optional.empty() : Optional.of(Integer.parseInt(VERSION_BUILD)); diff --git a/src/java.base/share/classes/java/lang/invoke/ClassSpecializer.java b/src/java.base/share/classes/java/lang/invoke/ClassSpecializer.java index 98bd1b7c034..5caf2fc0074 100755 --- a/src/java.base/share/classes/java/lang/invoke/ClassSpecializer.java +++ b/src/java.base/share/classes/java/lang/invoke/ClassSpecializer.java @@ -609,12 +609,12 @@ public ProtectionDomain run() { private final int SPECIES_DATA_MODS = sdAccessor.getModifiers(); private final List TRANSFORM_NAMES; // derived from transformMethods private final List TRANSFORM_TYPES; - private final List TRANSFORM_MODS; + private final List TRANSFORM_MODS; { // Tear apart transformMethods to get the names, types, and modifiers. List tns = new ArrayList<>(); List tts = new ArrayList<>(); - List tms = new ArrayList<>(); + List tms = new ArrayList<>(); for (int i = 0; i < transformMethods.size(); i++) { MemberName tm = transformMethods.get(i); tns.add(tm.getName()); diff --git a/src/java.base/share/classes/java/lang/invoke/GenerateJLIClassesHelper.java b/src/java.base/share/classes/java/lang/invoke/GenerateJLIClassesHelper.java index fd5621379a7..6ba02e8095b 100755 --- a/src/java.base/share/classes/java/lang/invoke/GenerateJLIClassesHelper.java +++ b/src/java.base/share/classes/java/lang/invoke/GenerateJLIClassesHelper.java @@ -49,7 +49,7 @@ */ class GenerateJLIClassesHelper { // Map from DirectMethodHandle method type name to index to LambdForms - static final Map DMH_METHOD_TYPE_MAP = + static final Map DMH_METHOD_TYPE_MAP = Map.of( DIRECT_INVOKE_VIRTUAL.methodName, LF_INVVIRTUAL, DIRECT_INVOKE_STATIC.methodName, LF_INVSTATIC, diff --git a/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java b/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java index 4b2b7066fca..1a1ef0a0bc0 100755 --- a/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java +++ b/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java @@ -173,7 +173,7 @@ private InvokerBytecodeGenerator(String name, LambdaForm form, MethodType invoke } /** instance counters for dumped classes */ - private static final HashMap DUMP_CLASS_FILES_COUNTERS; + private static final HashMap DUMP_CLASS_FILES_COUNTERS; /** debugging flag for saving generated class files */ private static final File DUMP_CLASS_FILES_DIR; diff --git a/src/java.base/share/classes/java/lang/invoke/LambdaForm.java b/src/java.base/share/classes/java/lang/invoke/LambdaForm.java index 911756d5d1a..9703891a43a 100755 --- a/src/java.base/share/classes/java/lang/invoke/LambdaForm.java +++ b/src/java.base/share/classes/java/lang/invoke/LambdaForm.java @@ -1816,7 +1816,7 @@ private static void createFormsFor(BasicType type) { @interface Compiled { } - private static final HashMap DEBUG_NAME_COUNTERS; + private static final HashMap DEBUG_NAME_COUNTERS; private static final HashMap DEBUG_NAMES; static { if (debugEnabled()) { diff --git a/src/java.base/share/classes/java/lang/invoke/VarHandles.java b/src/java.base/share/classes/java/lang/invoke/VarHandles.java index 08099ca7548..5246f95eded 100755 --- a/src/java.base/share/classes/java/lang/invoke/VarHandles.java +++ b/src/java.base/share/classes/java/lang/invoke/VarHandles.java @@ -46,7 +46,7 @@ final class VarHandles { - static ClassValue> ADDRESS_FACTORIES = new ClassValue<>() { + static ClassValue> ADDRESS_FACTORIES = new ClassValue<>() { @Override protected ConcurrentMap computeValue(Class type) { return new ConcurrentHashMap<>(); diff --git a/src/java.base/share/classes/java/net/HttpConnectSocketImpl.java b/src/java.base/share/classes/java/net/HttpConnectSocketImpl.java index ab8429d7d51..2fd531c744e 100755 --- a/src/java.base/share/classes/java/net/HttpConnectSocketImpl.java +++ b/src/java.base/share/classes/java/net/HttpConnectSocketImpl.java @@ -53,7 +53,7 @@ private final String server; private final Socket socket; private InetSocketAddress external_address; - private HashMap optionsMap = new HashMap<>(); + private HashMap optionsMap = new HashMap<>(); static { try { diff --git a/src/java.base/share/classes/java/net/StandardSocketOptions.java b/src/java.base/share/classes/java/net/StandardSocketOptions.java index bf5a9df5797..c207f533bf1 100755 --- a/src/java.base/share/classes/java/net/StandardSocketOptions.java +++ b/src/java.base/share/classes/java/net/StandardSocketOptions.java @@ -112,8 +112,8 @@ private StandardSocketOptions() { } * * @see Socket#setSendBufferSize */ - public static final SocketOption SO_SNDBUF = - new StdSocketOption("SO_SNDBUF", Integer.class); + public static final SocketOption SO_SNDBUF = + new StdSocketOption("SO_SNDBUF", Integer.class); /** @@ -152,8 +152,8 @@ private StandardSocketOptions() { } * @see Socket#setReceiveBufferSize * @see ServerSocket#setReceiveBufferSize */ - public static final SocketOption SO_RCVBUF = - new StdSocketOption("SO_RCVBUF", Integer.class); + public static final SocketOption SO_RCVBUF = + new StdSocketOption("SO_RCVBUF", Integer.class); /** * Re-use address. @@ -238,8 +238,8 @@ private StandardSocketOptions() { } * * @see Socket#setSoLinger */ - public static final SocketOption SO_LINGER = - new StdSocketOption("SO_LINGER", Integer.class); + public static final SocketOption SO_LINGER = + new StdSocketOption("SO_LINGER", Integer.class); // -- IPPROTO_IP -- @@ -270,8 +270,8 @@ private StandardSocketOptions() { } * * @see DatagramSocket#setTrafficClass */ - public static final SocketOption IP_TOS = - new StdSocketOption("IP_TOS", Integer.class); + public static final SocketOption IP_TOS = + new StdSocketOption("IP_TOS", Integer.class); /** * The network interface for Internet Protocol (IP) multicast datagrams. @@ -319,8 +319,8 @@ private StandardSocketOptions() { } * @see java.nio.channels.MulticastChannel * @see MulticastSocket#setTimeToLive */ - public static final SocketOption IP_MULTICAST_TTL = - new StdSocketOption("IP_MULTICAST_TTL", Integer.class); + public static final SocketOption IP_MULTICAST_TTL = + new StdSocketOption("IP_MULTICAST_TTL", Integer.class); /** * Loopback for Internet Protocol (IP) multicast datagrams. diff --git a/src/java.base/share/classes/java/nio/channels/AsynchronousByteChannel.java b/src/java.base/share/classes/java/nio/channels/AsynchronousByteChannel.java index 56003d53ec7..1b4e31987b8 100755 --- a/src/java.base/share/classes/java/nio/channels/AsynchronousByteChannel.java +++ b/src/java.base/share/classes/java/nio/channels/AsynchronousByteChannel.java @@ -107,7 +107,7 @@ public interface AsynchronousByteChannel */ void read(ByteBuffer dst, A attachment, - CompletionHandler handler); + CompletionHandler handler); /** * Reads a sequence of bytes from this channel into the given buffer. @@ -133,7 +133,7 @@ void read(ByteBuffer dst, * If the channel does not allow more than one read to be outstanding * and a previous read has not completed */ - Future read(ByteBuffer dst); + Future read(ByteBuffer dst); /** * Writes a sequence of bytes to this channel from the given buffer. @@ -186,7 +186,7 @@ void read(ByteBuffer dst, */ void write(ByteBuffer src, A attachment, - CompletionHandler handler); + CompletionHandler handler); /** * Writes a sequence of bytes to this channel from the given buffer. @@ -209,5 +209,5 @@ void write(ByteBuffer src, * If the channel does not allow more than one write to be outstanding * and a previous write has not completed */ - Future write(ByteBuffer src); + Future write(ByteBuffer src); } diff --git a/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java b/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java index 2ad51f80a45..08af2dbb1ac 100755 --- a/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java +++ b/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java @@ -712,7 +712,7 @@ public final FileLock tryLock() throws IOException { public abstract void read(ByteBuffer dst, long position, A attachment, - CompletionHandler handler); + CompletionHandler handler); /** * Reads a sequence of bytes from this channel into the given buffer, @@ -744,7 +744,7 @@ public abstract void read(ByteBuffer dst, * @throws NonReadableChannelException * If this channel was not opened for reading */ - public abstract Future read(ByteBuffer dst, long position); + public abstract Future read(ByteBuffer dst, long position); /** * Writes a sequence of bytes to this channel from the given buffer, starting @@ -778,7 +778,7 @@ public abstract void read(ByteBuffer dst, public abstract void write(ByteBuffer src, long position, A attachment, - CompletionHandler handler); + CompletionHandler handler); /** * Writes a sequence of bytes to this channel from the given buffer, starting @@ -811,5 +811,5 @@ public abstract void write(ByteBuffer src, * @throws NonWritableChannelException * If this channel was not opened for writing */ - public abstract Future write(ByteBuffer src, long position); + public abstract Future write(ByteBuffer src, long position); } diff --git a/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java b/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java index 8e54704beab..d08417b842b 100755 --- a/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java +++ b/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java @@ -407,7 +407,7 @@ public abstract void read(ByteBuffer dst, long timeout, TimeUnit unit, A attachment, - CompletionHandler handler); + CompletionHandler handler); /** * @throws IllegalArgumentException {@inheritDoc} @@ -420,7 +420,7 @@ public abstract void read(ByteBuffer dst, @Override public final void read(ByteBuffer dst, A attachment, - CompletionHandler handler) + CompletionHandler handler) { read(dst, 0L, TimeUnit.MILLISECONDS, attachment, handler); } @@ -432,7 +432,7 @@ public final void read(ByteBuffer dst, * If this channel is not yet connected */ @Override - public abstract Future read(ByteBuffer dst); + public abstract Future read(ByteBuffer dst); /** * Reads a sequence of bytes from this channel into a subsequence of the @@ -564,7 +564,7 @@ public abstract void write(ByteBuffer src, long timeout, TimeUnit unit, A attachment, - CompletionHandler handler); + CompletionHandler handler); /** * @throws WritePendingException {@inheritDoc} @@ -576,7 +576,7 @@ public abstract void write(ByteBuffer src, @Override public final void write(ByteBuffer src, A attachment, - CompletionHandler handler) + CompletionHandler handler) { write(src, 0L, TimeUnit.MILLISECONDS, attachment, handler); @@ -588,7 +588,7 @@ public final void write(ByteBuffer src, * If this channel is not yet connected */ @Override - public abstract Future write(ByteBuffer src); + public abstract Future write(ByteBuffer src); /** * Writes a sequence of bytes to this channel from a subsequence of the given diff --git a/src/java.base/share/classes/java/nio/charset/CoderResult.java b/src/java.base/share/classes/java/nio/charset/CoderResult.java index 8bfbf9f54af..8989434254a 100755 --- a/src/java.base/share/classes/java/nio/charset/CoderResult.java +++ b/src/java.base/share/classes/java/nio/charset/CoderResult.java @@ -194,8 +194,8 @@ private static final class Cache { static final Cache INSTANCE = new Cache(); private Cache() {} - final Map unmappable = new ConcurrentHashMap<>(); - final Map malformed = new ConcurrentHashMap<>(); + final Map unmappable = new ConcurrentHashMap<>(); + final Map malformed = new ConcurrentHashMap<>(); } private static final CoderResult[] malformed4 = new CoderResult[] { diff --git a/src/java.base/share/classes/java/text/SimpleDateFormat.java b/src/java.base/share/classes/java/text/SimpleDateFormat.java index 4eb08f6f5f6..122630e70c5 100755 --- a/src/java.base/share/classes/java/text/SimpleDateFormat.java +++ b/src/java.base/share/classes/java/text/SimpleDateFormat.java @@ -1659,7 +1659,7 @@ private int matchString(String text, int start, int field, String[] data, Calend * String[]. */ private int matchString(String text, int start, int field, - Map data, CalendarBuilder calb) { + Map data, CalendarBuilder calb) { if (data != null) { // TODO: make this default when it's in the spec. if (data instanceof SortedMap) { @@ -2441,7 +2441,7 @@ public boolean equals(Object obj) private static final int[] REST_OF_STYLES = { Calendar.SHORT_STANDALONE, Calendar.LONG_FORMAT, Calendar.LONG_STANDALONE, }; - private Map getDisplayNamesMap(int field, Locale locale) { + private Map getDisplayNamesMap(int field, Locale locale) { Map map = calendar.getDisplayNames(field, Calendar.SHORT_FORMAT, locale); // Get all SHORT and LONG styles (avoid NARROW styles). for (int style : REST_OF_STYLES) { @@ -2457,8 +2457,8 @@ private Map getDisplayNamesMap(int field, Locale locale) { * Obtains display names map, taking the context into account. Currently only * the month name pattern 'M' is context dependent. */ - private Map getDisplayContextNamesMap(int field, Locale locale) { - Map map = calendar.getDisplayNames(field, + private Map getDisplayContextNamesMap(int field, Locale locale) { + Map map = calendar.getDisplayNames(field, forceStandaloneForm ? Calendar.SHORT_STANDALONE : Calendar.SHORT_FORMAT, locale); // Get the LONG style Map m = calendar.getDisplayNames(field, diff --git a/src/java.base/share/classes/java/time/ZoneOffset.java b/src/java.base/share/classes/java/time/ZoneOffset.java index 7cb4ce2d627..aee47618b40 100755 --- a/src/java.base/share/classes/java/time/ZoneOffset.java +++ b/src/java.base/share/classes/java/time/ZoneOffset.java @@ -135,7 +135,7 @@ public final class ZoneOffset implements TemporalAccessor, TemporalAdjuster, Comparable, Serializable { /** Cache of time-zone offset by offset in seconds. */ - private static final ConcurrentMap SECONDS_CACHE = new ConcurrentHashMap<>(16, 0.75f, 4); + private static final ConcurrentMap SECONDS_CACHE = new ConcurrentHashMap<>(16, 0.75f, 4); /** Cache of time-zone offset by ID. */ private static final ConcurrentMap ID_CACHE = new ConcurrentHashMap<>(16, 0.75f, 4); diff --git a/src/java.base/share/classes/java/time/chrono/HijrahChronology.java b/src/java.base/share/classes/java/time/chrono/HijrahChronology.java index 681333dfa9f..22372fe0cd6 100755 --- a/src/java.base/share/classes/java/time/chrono/HijrahChronology.java +++ b/src/java.base/share/classes/java/time/chrono/HijrahChronology.java @@ -943,7 +943,7 @@ private void loadCalendarData() { * @param years a Map of year to the array of 12 month lengths * @return array of epochDays for each month from min to max */ - private int[] createEpochMonths(int epochDay, int minYear, int maxYear, Map years) { + private int[] createEpochMonths(int epochDay, int minYear, int maxYear, Map years) { // Compute the size for the array of dates int numMonths = (maxYear - minYear + 1) * 12 + 1; diff --git a/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java b/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java index d45bfa03f91..b665436b72b 100755 --- a/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java +++ b/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java @@ -4515,9 +4515,9 @@ public boolean format(DateTimePrintContext context, StringBuilder buf) { } // cache per instance for now - private final Map>> + private final Map>> cachedTree = new HashMap<>(); - private final Map>> + private final Map>> cachedTreeCI = new HashMap<>(); @Override @@ -4616,8 +4616,8 @@ public boolean format(DateTimePrintContext context, StringBuilder buf) { /** * The cached tree to speed up parsing. */ - private static volatile Entry cachedPrefixTree; - private static volatile Entry cachedPrefixTreeCI; + private static volatile Entry cachedPrefixTree; + private static volatile Entry cachedPrefixTreeCI; protected PrefixTree getTree(DateTimeParseContext context) { // prepare parse tree diff --git a/src/java.base/share/classes/java/time/zone/ZoneRules.java b/src/java.base/share/classes/java/time/zone/ZoneRules.java index 480ff2bb27c..f1740aa70bc 100755 --- a/src/java.base/share/classes/java/time/zone/ZoneRules.java +++ b/src/java.base/share/classes/java/time/zone/ZoneRules.java @@ -146,7 +146,7 @@ public final class ZoneRules implements Serializable { /** * The map of recent transitions. */ - private final transient ConcurrentMap lastRulesCache; + private final transient ConcurrentMap lastRulesCache; /** * The zero-length long array. */ diff --git a/src/java.base/share/classes/java/util/Calendar.java b/src/java.base/share/classes/java/util/Calendar.java index 361733dabec..45a2bd20baa 100755 --- a/src/java.base/share/classes/java/util/Calendar.java +++ b/src/java.base/share/classes/java/util/Calendar.java @@ -2191,7 +2191,7 @@ public String getDisplayName(int field, int style, Locale locale) { * if {@code locale} is null * @since 1.6 */ - public Map getDisplayNames(int field, int style, Locale locale) { + public Map getDisplayNames(int field, int style, Locale locale) { if (!checkDisplayNameParams(field, style, ALL_STYLES, NARROW_FORMAT, locale, ERA_MASK|MONTH_MASK|DAY_OF_WEEK_MASK|AM_PM_MASK)) { return null; @@ -2220,7 +2220,7 @@ public Map getDisplayNames(int field, int style, Locale locale) return getDisplayNamesImpl(field, style, locale); } - private Map getDisplayNamesImpl(int field, int style, Locale locale) { + private Map getDisplayNamesImpl(int field, int style, Locale locale) { DateFormatSymbols symbols = DateFormatSymbols.getInstance(locale); String[] strings = getFieldStrings(field, style, symbols); if (strings != null) { diff --git a/src/java.base/share/classes/java/util/JapaneseImperialCalendar.java b/src/java.base/share/classes/java/util/JapaneseImperialCalendar.java index d275b09834a..9b505a3db66 100755 --- a/src/java.base/share/classes/java/util/JapaneseImperialCalendar.java +++ b/src/java.base/share/classes/java/util/JapaneseImperialCalendar.java @@ -1035,7 +1035,7 @@ public String getDisplayName(int field, int style, Locale locale) { } @Override - public Map getDisplayNames(int field, int style, Locale locale) { + public Map getDisplayNames(int field, int style, Locale locale) { if (!checkDisplayNameParams(field, style, ALL_STYLES, NARROW_FORMAT, locale, ERA_MASK|YEAR_MASK|MONTH_MASK|DAY_OF_WEEK_MASK|AM_PM_MASK)) { return null; diff --git a/src/java.base/share/classes/java/util/Spliterators.java b/src/java.base/share/classes/java/util/Spliterators.java index 48633e4caf0..ab128e71555 100755 --- a/src/java.base/share/classes/java/util/Spliterators.java +++ b/src/java.base/share/classes/java/util/Spliterators.java @@ -909,7 +909,7 @@ private static final class OfRef } private static final class OfInt - extends EmptySpliterator + extends EmptySpliterator implements Spliterator.OfInt { OfInt() { } } @@ -1129,7 +1129,7 @@ public int characteristics() { } @Override - public Comparator getComparator() { + public Comparator getComparator() { if (hasCharacteristics(Spliterator.SORTED)) return null; throw new IllegalStateException(); @@ -2049,7 +2049,7 @@ public long estimateSize() { public int characteristics() { return characteristics; } @Override - public Comparator getComparator() { + public Comparator getComparator() { if (hasCharacteristics(Spliterator.SORTED)) return null; throw new IllegalStateException(); diff --git a/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java b/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java index 0f0243d4348..c62894f67d8 100755 --- a/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java +++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java @@ -6169,7 +6169,7 @@ public final void compute() { @SuppressWarnings("serial") static final class MapReduceKeysToIntTask - extends BulkTask { + extends BulkTask { final ToIntFunction transformer; final IntBinaryOperator reducer; final int basis; @@ -6219,7 +6219,7 @@ public final void compute() { @SuppressWarnings("serial") static final class MapReduceValuesToIntTask - extends BulkTask { + extends BulkTask { final ToIntFunction transformer; final IntBinaryOperator reducer; final int basis; @@ -6269,7 +6269,7 @@ public final void compute() { @SuppressWarnings("serial") static final class MapReduceEntriesToIntTask - extends BulkTask { + extends BulkTask { final ToIntFunction> transformer; final IntBinaryOperator reducer; final int basis; @@ -6319,7 +6319,7 @@ public final void compute() { @SuppressWarnings("serial") static final class MapReduceMappingsToIntTask - extends BulkTask { + extends BulkTask { final ToIntBiFunction transformer; final IntBinaryOperator reducer; final int basis; diff --git a/src/java.base/share/classes/java/util/regex/MatchResult.java b/src/java.base/share/classes/java/util/regex/MatchResult.java index de44f3b7fb8..a94032857e9 100755 --- a/src/java.base/share/classes/java/util/regex/MatchResult.java +++ b/src/java.base/share/classes/java/util/regex/MatchResult.java @@ -315,7 +315,7 @@ default String group(String name) { * * @since 20 */ - default Map namedGroups() { + default Map namedGroups() { throw new UnsupportedOperationException("namedGroups()"); } diff --git a/src/java.base/share/classes/java/util/regex/Matcher.java b/src/java.base/share/classes/java/util/regex/Matcher.java index 2db0f6baa97..b290a8d22d1 100755 --- a/src/java.base/share/classes/java/util/regex/Matcher.java +++ b/src/java.base/share/classes/java/util/regex/Matcher.java @@ -230,7 +230,7 @@ public final class Matcher implements MatchResult { */ int modCount; - private Map namedGroups; + private Map namedGroups; /** * No default constructor. @@ -291,11 +291,11 @@ private static class ImmutableMatchResult implements MatchResult { private final int[] groups; private final int groupCount; private final String text; - private final Map namedGroups; + private final Map namedGroups; ImmutableMatchResult(int first, int last, int groupCount, int[] groups, String text, - Map namedGroups) + Map namedGroups) { this.first = first; this.last = last; @@ -352,7 +352,7 @@ public String group(int group) { } @Override - public Map namedGroups() { + public Map namedGroups() { return namedGroups; } @@ -1829,7 +1829,7 @@ private void checkMatch() { * @since {@inheritDoc} */ @Override - public Map namedGroups() { + public Map namedGroups() { if (namedGroups == null) { return namedGroups = parentPattern.namedGroups(); } diff --git a/src/java.base/share/classes/java/util/regex/Pattern.java b/src/java.base/share/classes/java/util/regex/Pattern.java index 03072638f60..b8c63f88701 100755 --- a/src/java.base/share/classes/java/util/regex/Pattern.java +++ b/src/java.base/share/classes/java/util/regex/Pattern.java @@ -1017,7 +1017,7 @@ public final class Pattern * Map the "name" of the "named capturing group" to its group id * node. */ - transient volatile Map namedGroups; + transient volatile Map namedGroups; /** * Temporary storage used while parsing group references. @@ -1880,7 +1880,7 @@ private void compile() { topClosureNodes = null; } - private Map namedGroupsMap() { + private Map namedGroupsMap() { Map groups = namedGroups; if (groups == null) { namedGroups = groups = new HashMap<>(2); @@ -1896,7 +1896,7 @@ private Map namedGroupsMap() { * * @since 20 */ - public Map namedGroups() { + public Map namedGroups() { return Map.copyOf(namedGroupsMap()); } diff --git a/src/java.base/share/classes/java/util/regex/PrintPattern.java b/src/java.base/share/classes/java/util/regex/PrintPattern.java index eb37043d4f4..2e26bb0f895 100755 --- a/src/java.base/share/classes/java/util/regex/PrintPattern.java +++ b/src/java.base/share/classes/java/util/regex/PrintPattern.java @@ -35,7 +35,7 @@ class PrintPattern { - private static HashMap ids = new HashMap<>(); + private static HashMap ids = new HashMap<>(); private static void print(Pattern.Node node, String text, int depth) { if (!ids.containsKey(node)) diff --git a/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java b/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java index e0ad28fc88c..87637ca0ac5 100755 --- a/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java +++ b/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java @@ -299,7 +299,7 @@ public abstract String getDisplayName(String calendarType, * if {@code locale} is {@code null} * @see Calendar#getDisplayNames(int, int, Locale) */ - public abstract Map getDisplayNames(String calendarType, + public abstract Map getDisplayNames(String calendarType, int field, int style, Locale locale); } diff --git a/src/java.base/share/classes/java/util/stream/Collectors.java b/src/java.base/share/classes/java/util/stream/Collectors.java index 992f2f4a2a3..d011bf151a2 100755 --- a/src/java.base/share/classes/java/util/stream/Collectors.java +++ b/src/java.base/share/classes/java/util/stream/Collectors.java @@ -637,7 +637,7 @@ public static Collector collectingAndThen(Collector dow * @param mapper a function extracting the property to be summed * @return a {@code Collector} that produces the sum of a derived property */ - public static Collector + public static Collector summingInt(ToIntFunction mapper) { return new CollectorImpl<>( () -> new int[1], diff --git a/src/java.base/share/classes/java/util/stream/FindOps.java b/src/java.base/share/classes/java/util/stream/FindOps.java index 131eec06236..82a1ab3a817 100755 --- a/src/java.base/share/classes/java/util/stream/FindOps.java +++ b/src/java.base/share/classes/java/util/stream/FindOps.java @@ -67,7 +67,7 @@ public static TerminalOp> makeRef(boolean mustFindFirst) { * first element in the encounter order * @return a {@code TerminalOp} implementing the find operation */ - public static TerminalOp makeInt(boolean mustFindFirst) { + public static TerminalOp makeInt(boolean mustFindFirst) { return mustFindFirst ? FindSink.OfInt.OP_FIND_FIRST : FindSink.OfInt.OP_FIND_ANY; } @@ -204,7 +204,7 @@ public Optional get() { } /** Specialization of {@code FindSink} for int streams */ - static final class OfInt extends FindSink + static final class OfInt extends FindSink implements Sink.OfInt { @Override public void accept(int value) { @@ -217,10 +217,10 @@ public OptionalInt get() { return hasValue ? OptionalInt.of(value) : null; } - static final TerminalOp OP_FIND_FIRST = new FindOp<>(true, + static final TerminalOp OP_FIND_FIRST = new FindOp<>(true, StreamShape.INT_VALUE, OptionalInt.empty(), OptionalInt::isPresent, FindSink.OfInt::new); - static final TerminalOp OP_FIND_ANY = new FindOp<>(false, + static final TerminalOp OP_FIND_ANY = new FindOp<>(false, StreamShape.INT_VALUE, OptionalInt.empty(), OptionalInt::isPresent, FindSink.OfInt::new); } diff --git a/src/java.base/share/classes/java/util/stream/ForEachOps.java b/src/java.base/share/classes/java/util/stream/ForEachOps.java index 69714ca3f85..4fdf8a9ee54 100755 --- a/src/java.base/share/classes/java/util/stream/ForEachOps.java +++ b/src/java.base/share/classes/java/util/stream/ForEachOps.java @@ -81,7 +81,7 @@ public static TerminalOp makeRef(Consumer action, * @param ordered whether an ordered traversal is requested * @return the {@code TerminalOp} instance */ - public static TerminalOp makeInt(IntConsumer action, + public static TerminalOp makeInt(IntConsumer action, boolean ordered) { Objects.requireNonNull(action); return new ForEachOp.OfInt(action, ordered); @@ -185,7 +185,7 @@ public void accept(T t) { } /** Implementation class for {@code IntStream} */ - static final class OfInt extends ForEachOp + static final class OfInt extends ForEachOp implements Sink.OfInt { final IntConsumer consumer; diff --git a/src/java.base/share/classes/java/util/stream/IntPipeline.java b/src/java.base/share/classes/java/util/stream/IntPipeline.java index 63a5c77b438..6124b95c888 100755 --- a/src/java.base/share/classes/java/util/stream/IntPipeline.java +++ b/src/java.base/share/classes/java/util/stream/IntPipeline.java @@ -56,7 +56,7 @@ * @since 1.8 */ abstract class IntPipeline - extends AbstractPipeline + extends AbstractPipeline implements IntStream { /** @@ -67,7 +67,7 @@ abstract class IntPipeline * {@link StreamOpFlag} * @param parallel {@code true} if the pipeline is parallel */ - IntPipeline(Supplier> source, + IntPipeline(Supplier> source, int sourceFlags, boolean parallel) { super(source, sourceFlags, parallel); } @@ -80,7 +80,7 @@ abstract class IntPipeline * {@link StreamOpFlag} * @param parallel {@code true} if the pipeline is parallel */ - IntPipeline(Spliterator source, + IntPipeline(Spliterator source, int sourceFlags, boolean parallel) { super(source, sourceFlags, parallel); } @@ -100,7 +100,7 @@ abstract class IntPipeline * Adapt a {@code Sink to an {@code IntConsumer}, ideally simply * by casting. */ - private static IntConsumer adapt(Sink sink) { + private static IntConsumer adapt(Sink sink) { if (sink instanceof IntConsumer) { return (IntConsumer) sink; } @@ -119,7 +119,7 @@ private static IntConsumer adapt(Sink sink) { * The implementation attempts to cast to a Spliterator.OfInt, and throws an * exception if this cast is not possible. */ - private static Spliterator.OfInt adapt(Spliterator s) { + private static Spliterator.OfInt adapt(Spliterator s) { if (s instanceof Spliterator.OfInt) { return (Spliterator.OfInt) s; } @@ -140,7 +140,7 @@ final StreamShape getOutputShape() { } @Override - final Node evaluateToNode(PipelineHelper helper, + final Node evaluateToNode(PipelineHelper helper, Spliterator spliterator, boolean flattenTree, IntFunction generator) { @@ -148,7 +148,7 @@ final Node evaluateToNode(PipelineHelper helper, } @Override - final Spliterator wrap(PipelineHelper ph, + final Spliterator wrap(PipelineHelper ph, Supplier> supplier, boolean isParallel) { return new StreamSpliterators.IntWrappingSpliterator<>(ph, supplier, isParallel); @@ -156,12 +156,12 @@ final Spliterator wrap(PipelineHelper ph, @Override @SuppressWarnings("unchecked") - final Spliterator.OfInt lazySpliterator(Supplier> supplier) { + final Spliterator.OfInt lazySpliterator(Supplier> supplier) { return new StreamSpliterators.DelegatingSpliterator.OfInt((Supplier) supplier); } @Override - final boolean forEachWithCancel(Spliterator spliterator, Sink sink) { + final boolean forEachWithCancel(Spliterator spliterator, Sink sink) { Spliterator.OfInt spl = adapt(spliterator); IntConsumer adaptedSink = adapt(sink); boolean cancelled; @@ -170,7 +170,7 @@ final boolean forEachWithCancel(Spliterator spliterator, Sink } @Override - final Node.Builder makeNodeBuilder(long exactSizeIfKnown, + final Node.Builder makeNodeBuilder(long exactSizeIfKnown, IntFunction generator) { return Nodes.intBuilder(exactSizeIfKnown); } @@ -234,7 +234,7 @@ public void accept(int t) { } @Override - public final Stream boxed() { + public final Stream boxed() { return mapToObj(Integer::valueOf, 0); } @@ -609,7 +609,7 @@ static class Head extends IntPipeline { * in {@link StreamOpFlag} * @param parallel {@code true} if the pipeline is parallel */ - Head(Supplier> source, + Head(Supplier> source, int sourceFlags, boolean parallel) { super(source, sourceFlags, parallel); } @@ -622,7 +622,7 @@ static class Head extends IntPipeline { * in {@link StreamOpFlag} * @param parallel {@code true} if the pipeline is parallel */ - Head(Spliterator source, + Head(Spliterator source, int sourceFlags, boolean parallel) { super(source, sourceFlags, parallel); } @@ -633,7 +633,7 @@ final boolean opIsStateful() { } @Override - final Sink opWrapSink(int flags, Sink sink) { + final Sink opWrapSink(int flags, Sink sink) { throw new UnsupportedOperationException(); } @@ -714,7 +714,7 @@ final boolean opIsStateful() { } @Override - abstract Node opEvaluateParallel(PipelineHelper helper, + abstract Node opEvaluateParallel(PipelineHelper helper, Spliterator spliterator, IntFunction generator); } diff --git a/src/java.base/share/classes/java/util/stream/MatchOps.java b/src/java.base/share/classes/java/util/stream/MatchOps.java index 568060d3afb..810f0a6eebb 100755 --- a/src/java.base/share/classes/java/util/stream/MatchOps.java +++ b/src/java.base/share/classes/java/util/stream/MatchOps.java @@ -105,11 +105,11 @@ public void accept(T t) { * @return a {@code TerminalOp} implementing the desired quantified match * criteria */ - public static TerminalOp makeInt(IntPredicate predicate, + public static TerminalOp makeInt(IntPredicate predicate, MatchKind matchKind) { Objects.requireNonNull(predicate); Objects.requireNonNull(matchKind); - class MatchSink extends BooleanTerminalSink implements Sink.OfInt { + class MatchSink extends BooleanTerminalSink implements Sink.OfInt { MatchSink() { super(matchKind); } diff --git a/src/java.base/share/classes/java/util/stream/Node.java b/src/java.base/share/classes/java/util/stream/Node.java index 7c4dda8adaf..8e399936a38 100755 --- a/src/java.base/share/classes/java/util/stream/Node.java +++ b/src/java.base/share/classes/java/util/stream/Node.java @@ -202,7 +202,7 @@ interface Builder extends Sink { /** * Specialized {@code Node.Builder} for int elements */ - interface OfInt extends Node.Builder, Sink.OfInt { + interface OfInt extends Node.Builder, Sink.OfInt { @Override Node.OfInt build(); } @@ -314,7 +314,7 @@ default T[] asArray(IntFunction generator) { /** * Specialized {@code Node} for int elements */ - interface OfInt extends OfPrimitive { + interface OfInt extends OfPrimitive { /** * {@inheritDoc} @@ -325,7 +325,7 @@ interface OfInt extends OfPrimitive consumer) { + default void forEach(Consumer consumer) { if (consumer instanceof IntConsumer) { forEach((IntConsumer) consumer); } diff --git a/src/java.base/share/classes/java/util/stream/Nodes.java b/src/java.base/share/classes/java/util/stream/Nodes.java index ffc5ae9cb10..79ca6ac5bc8 100755 --- a/src/java.base/share/classes/java/util/stream/Nodes.java +++ b/src/java.base/share/classes/java/util/stream/Nodes.java @@ -351,7 +351,7 @@ public static Node collect(PipelineHelper helper, * describing an array before returning * @return a {@link Node.OfInt} describing the output elements */ - public static Node.OfInt collectInt(PipelineHelper helper, + public static Node.OfInt collectInt(PipelineHelper helper, Spliterator spliterator, boolean flattenTree) { long size = helper.exactOutputSizeIfKnown(spliterator); @@ -583,7 +583,7 @@ public Spliterator spliterator() { } private static final class OfInt - extends EmptyNode + extends EmptyNode implements Node.OfInt { OfInt() { } // Avoid creation of special accessor @@ -881,7 +881,7 @@ public String toString() { } static final class OfInt - extends ConcNode.OfPrimitive + extends ConcNode.OfPrimitive implements Node.OfInt { OfInt(Node.OfInt left, Node.OfInt right) { @@ -1161,7 +1161,7 @@ public void forEachRemaining(T_CONS consumer) { } private static final class OfInt - extends OfPrimitive + extends OfPrimitive implements Spliterator.OfInt { OfInt(Node.OfInt cur) { @@ -1926,11 +1926,11 @@ public void accept(P_OUT value) { @SuppressWarnings("serial") static final class OfInt - extends SizedCollectorTask> + extends SizedCollectorTask> implements Sink.OfInt { private final int[] array; - OfInt(Spliterator spliterator, PipelineHelper helper, int[] array) { + OfInt(Spliterator spliterator, PipelineHelper helper, int[] array) { super(spliterator, helper, array.length); this.array = array; } @@ -2123,7 +2123,7 @@ void copyNodeToArray() { @SuppressWarnings("serial") private static final class OfInt - extends OfPrimitive { + extends OfPrimitive { private OfInt(Node.OfInt node, int[] array, int offset) { super(node, array, offset); } @@ -2202,8 +2202,8 @@ private static final class OfRef @SuppressWarnings("serial") private static final class OfInt - extends CollectorTask { - OfInt(PipelineHelper helper, Spliterator spliterator) { + extends CollectorTask { + OfInt(PipelineHelper helper, Spliterator spliterator) { super(helper, spliterator, Nodes::intBuilder, ConcNode.OfInt::new); } } diff --git a/src/java.base/share/classes/java/util/stream/ReduceOps.java b/src/java.base/share/classes/java/util/stream/ReduceOps.java index 64c94ef35fd..1695fe74182 100755 --- a/src/java.base/share/classes/java/util/stream/ReduceOps.java +++ b/src/java.base/share/classes/java/util/stream/ReduceOps.java @@ -282,7 +282,7 @@ public int getOpFlags() { * @param operator the combining function * @return a {@code TerminalOp} implementing the reduction */ - public static TerminalOp + public static TerminalOp makeInt(int identity, IntBinaryOperator operator) { Objects.requireNonNull(operator); class ReducingSink @@ -324,7 +324,7 @@ public ReducingSink makeSink() { * @param operator the combining function * @return a {@code TerminalOp} implementing the reduction */ - public static TerminalOp + public static TerminalOp makeInt(IntBinaryOperator operator) { Objects.requireNonNull(operator); class ReducingSink @@ -378,7 +378,7 @@ public ReducingSink makeSink() { * @param combiner a function to combine an accumulator into another * @return A {@code ReduceOp} implementing the reduction */ - public static TerminalOp + public static TerminalOp makeInt(Supplier supplier, ObjIntConsumer accumulator, BinaryOperator combiner) { @@ -419,7 +419,7 @@ public ReducingSink makeSink() { * * @return a {@code TerminalOp} implementing the counting */ - public static TerminalOp + public static TerminalOp makeIntCounting() { return new ReduceOp>(StreamShape.INT_VALUE) { @Override @@ -832,7 +832,7 @@ public void accept(T t) { } } - static final class OfInt extends CountingSink implements Sink.OfInt { + static final class OfInt extends CountingSink implements Sink.OfInt { @Override public void accept(int t) { count++; diff --git a/src/java.base/share/classes/java/util/stream/Sink.java b/src/java.base/share/classes/java/util/stream/Sink.java index a0fe5b31721..471eb4514dc 100755 --- a/src/java.base/share/classes/java/util/stream/Sink.java +++ b/src/java.base/share/classes/java/util/stream/Sink.java @@ -186,7 +186,7 @@ default void accept(double value) { * {@code accept(int)}, and wires {@code accept(Integer)} to bridge to * {@code accept(int)}. */ - interface OfInt extends Sink, IntConsumer { + interface OfInt extends Sink, IntConsumer { @Override void accept(int value); diff --git a/src/java.base/share/classes/java/util/stream/SliceOps.java b/src/java.base/share/classes/java/util/stream/SliceOps.java index 7dbc2e52edb..27117005a9d 100755 --- a/src/java.base/share/classes/java/util/stream/SliceOps.java +++ b/src/java.base/share/classes/java/util/stream/SliceOps.java @@ -223,7 +223,7 @@ public boolean cancellationRequested() { * @param limit The maximum size of the resulting stream, or -1 if no limit * is to be imposed */ - public static IntStream makeInt(AbstractPipeline upstream, + public static IntStream makeInt(AbstractPipeline upstream, long skip, long limit) { if (skip < 0) throw new IllegalArgumentException("Skip must be non-negative: " + skip); diff --git a/src/java.base/share/classes/java/util/stream/SortedOps.java b/src/java.base/share/classes/java/util/stream/SortedOps.java index 91892eba44f..76cf082fd84 100755 --- a/src/java.base/share/classes/java/util/stream/SortedOps.java +++ b/src/java.base/share/classes/java/util/stream/SortedOps.java @@ -69,7 +69,7 @@ static Stream makeRef(AbstractPipeline upstream, * @param the type of both input and output elements * @param upstream a reference stream with element type T */ - static IntStream makeInt(AbstractPipeline upstream) { + static IntStream makeInt(AbstractPipeline upstream) { return new OfInt(upstream); } @@ -164,14 +164,14 @@ public Node opEvaluateParallel(PipelineHelper helper, /** * Specialized subtype for sorting int streams. */ - private static final class OfInt extends IntPipeline.StatefulOp { - OfInt(AbstractPipeline upstream) { + private static final class OfInt extends IntPipeline.StatefulOp { + OfInt(AbstractPipeline upstream) { super(upstream, StreamShape.INT_VALUE, StreamOpFlag.IS_ORDERED | StreamOpFlag.IS_SORTED); } @Override - public Sink opWrapSink(int flags, Sink sink) { + public Sink opWrapSink(int flags, Sink sink) { Objects.requireNonNull(sink); if (StreamOpFlag.SORTED.isKnown(flags)) @@ -183,7 +183,7 @@ else if (StreamOpFlag.SIZED.isKnown(flags)) } @Override - public Node opEvaluateParallel(PipelineHelper helper, + public Node opEvaluateParallel(PipelineHelper helper, Spliterator spliterator, IntFunction generator) { if (StreamOpFlag.SORTED.isKnown(helper.getStreamAndOpFlags())) { @@ -413,11 +413,11 @@ public void accept(T t) { /** * Abstract {@link Sink} for implementing sort on int streams. */ - private abstract static class AbstractIntSortingSink extends Sink.ChainedInt { + private abstract static class AbstractIntSortingSink extends Sink.ChainedInt { // true if cancellationRequested() has been called protected boolean cancellationRequestedCalled; - AbstractIntSortingSink(Sink downstream) { + AbstractIntSortingSink(Sink downstream) { super(downstream); } @@ -435,7 +435,7 @@ private static final class SizedIntSortingSink extends AbstractIntSortingSink { private int[] array; private int offset; - SizedIntSortingSink(Sink downstream) { + SizedIntSortingSink(Sink downstream) { super(downstream); } @@ -474,7 +474,7 @@ public void accept(int t) { private static final class IntSortingSink extends AbstractIntSortingSink { private SpinedBuffer.OfInt b; - IntSortingSink(Sink sink) { + IntSortingSink(Sink sink) { super(sink); } diff --git a/src/java.base/share/classes/java/util/stream/SpinedBuffer.java b/src/java.base/share/classes/java/util/stream/SpinedBuffer.java index 163692cf858..4d2325fe753 100755 --- a/src/java.base/share/classes/java/util/stream/SpinedBuffer.java +++ b/src/java.base/share/classes/java/util/stream/SpinedBuffer.java @@ -720,7 +720,7 @@ else if (splSpineIndex == lastSpineIndex) { /** * An ordered collection of {@code int} values. */ - static class OfInt extends SpinedBuffer.OfPrimitive + static class OfInt extends SpinedBuffer.OfPrimitive implements IntConsumer { OfInt() { } @@ -729,7 +729,7 @@ static class OfInt extends SpinedBuffer.OfPrimitive } @Override - public void forEach(Consumer consumer) { + public void forEach(Consumer consumer) { if (consumer instanceof IntConsumer) { forEach((IntConsumer) consumer); } diff --git a/src/java.base/share/classes/java/util/stream/StreamOpFlag.java b/src/java.base/share/classes/java/util/stream/StreamOpFlag.java index df98125cbc0..dfed7afb66a 100755 --- a/src/java.base/share/classes/java/util/stream/StreamOpFlag.java +++ b/src/java.base/share/classes/java/util/stream/StreamOpFlag.java @@ -397,9 +397,9 @@ private static MaskBuilder set(Type t) { } private static class MaskBuilder { - final Map map; + final Map map; - MaskBuilder(Map map) { + MaskBuilder(Map map) { this.map = map; } @@ -420,7 +420,7 @@ MaskBuilder setAndClear(Type t) { return mask(t, PRESERVE_BITS); } - Map build() { + Map build() { for (Type t : Type.values()) { map.putIfAbsent(t, 0b00); } @@ -432,7 +432,7 @@ Map build() { * The mask table for a flag, this is used to determine if a flag * corresponds to a certain flag type and for creating mask constants. */ - private final Map maskTable; + private final Map maskTable; /** * The bit position in the bit mask. diff --git a/src/java.base/share/classes/java/util/stream/StreamSpliterators.java b/src/java.base/share/classes/java/util/stream/StreamSpliterators.java index 01ba72d1950..db92d3cdf19 100755 --- a/src/java.base/share/classes/java/util/stream/StreamSpliterators.java +++ b/src/java.base/share/classes/java/util/stream/StreamSpliterators.java @@ -317,23 +317,23 @@ public void forEachRemaining(Consumer consumer) { } static final class IntWrappingSpliterator - extends AbstractWrappingSpliterator + extends AbstractWrappingSpliterator implements Spliterator.OfInt { - IntWrappingSpliterator(PipelineHelper ph, + IntWrappingSpliterator(PipelineHelper ph, Supplier> supplier, boolean parallel) { super(ph, supplier, parallel); } - IntWrappingSpliterator(PipelineHelper ph, + IntWrappingSpliterator(PipelineHelper ph, Spliterator spliterator, boolean parallel) { super(ph, spliterator, parallel); } @Override - AbstractWrappingSpliterator wrap(Spliterator s) { + AbstractWrappingSpliterator wrap(Spliterator s) { return new IntWrappingSpliterator<>(ph, s, isParallel); } @@ -573,7 +573,7 @@ public void forEachRemaining(T_CONS consumer) { } static final class OfInt - extends OfPrimitive + extends OfPrimitive implements Spliterator.OfInt { OfInt(Supplier supplier) { @@ -815,7 +815,7 @@ public void forEachRemaining(T_CONS action) { protected abstract T_CONS emptyConsumer(); } - static final class OfInt extends OfPrimitive + static final class OfInt extends OfPrimitive implements Spliterator.OfInt { OfInt(Spliterator.OfInt s, long sliceOrigin, long sliceFence) { super(s, sliceOrigin, sliceFence); @@ -1129,7 +1129,7 @@ public void forEachRemaining(T_CONS action) { } static final class OfInt - extends OfPrimitive + extends OfPrimitive implements Spliterator.OfInt, IntConsumer { int tmpValue; @@ -1367,7 +1367,7 @@ public Spliterator trySplit() { } } - static final class OfInt extends InfiniteSupplyingSpliterator + static final class OfInt extends InfiniteSupplyingSpliterator implements Spliterator.OfInt { final IntSupplier s; diff --git a/src/java.base/share/classes/java/util/stream/Streams.java b/src/java.base/share/classes/java/util/stream/Streams.java index 75e91dfb374..b8e55537a54 100755 --- a/src/java.base/share/classes/java/util/stream/Streams.java +++ b/src/java.base/share/classes/java/util/stream/Streams.java @@ -128,7 +128,7 @@ public int characteristics() { } @Override - public Comparator getComparator() { + public Comparator getComparator() { return null; } @@ -420,7 +420,7 @@ public void forEachRemaining(Consumer action) { } static final class IntStreamBuilderImpl - extends AbstractStreamBuilderImpl + extends AbstractStreamBuilderImpl implements IntStream.Builder, Spliterator.OfInt { // The first element in the stream // valid if count == 1 @@ -810,7 +810,7 @@ public void forEachRemaining(T_CONS action) { } static class OfInt - extends ConcatSpliterator.OfPrimitive + extends ConcatSpliterator.OfPrimitive implements Spliterator.OfInt { OfInt(Spliterator.OfInt aSpliterator, Spliterator.OfInt bSpliterator) { super(aSpliterator, bSpliterator); diff --git a/src/java.base/share/classes/java/util/stream/WhileOps.java b/src/java.base/share/classes/java/util/stream/WhileOps.java index 684b52f3be2..ca2fc034220 100755 --- a/src/java.base/share/classes/java/util/stream/WhileOps.java +++ b/src/java.base/share/classes/java/util/stream/WhileOps.java @@ -115,7 +115,7 @@ public boolean cancellationRequested() { * @param upstream a reference stream with element type T * @param predicate the predicate that returns false to halt taking. */ - static IntStream makeTakeWhileInt(AbstractPipeline upstream, + static IntStream makeTakeWhileInt(AbstractPipeline upstream, IntPredicate predicate) { Objects.requireNonNull(predicate); return new IntPipeline.StatefulOp(upstream, StreamShape.INT_VALUE, TAKE_FLAGS) { @@ -403,7 +403,7 @@ public long getDropCount() { * @param upstream a reference stream with element type T * @param predicate the predicate that returns false to halt dropping. */ - static IntStream makeDropWhileInt(AbstractPipeline upstream, + static IntStream makeDropWhileInt(AbstractPipeline upstream, IntPredicate predicate) { Objects.requireNonNull(predicate); class Op extends IntPipeline.StatefulOp implements DropWhileOp { @@ -820,7 +820,7 @@ Spliterator makeSpliterator(Spliterator s) { } } - abstract static class OfInt extends UnorderedWhileSpliterator implements IntConsumer, Spliterator.OfInt { + abstract static class OfInt extends UnorderedWhileSpliterator implements IntConsumer, Spliterator.OfInt { final IntPredicate p; int t; diff --git a/src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java b/src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java index 2d84778d81c..54bd12136df 100755 --- a/src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java +++ b/src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java @@ -219,7 +219,7 @@ private static int strlen(MemorySegment segment, long start) { throw new IllegalArgumentException("String too large"); } - static Map indexMap(Binding.Move[] moves) { + static Map indexMap(Binding.Move[] moves) { return IntStream.range(0, moves.length) .boxed() .collect(Collectors.toMap(i -> moves[i].storage(), i -> i)); diff --git a/src/java.base/share/classes/jdk/internal/icu/util/VersionInfo.java b/src/java.base/share/classes/jdk/internal/icu/util/VersionInfo.java index b270124c980..5d2231491fb 100755 --- a/src/java.base/share/classes/jdk/internal/icu/util/VersionInfo.java +++ b/src/java.base/share/classes/jdk/internal/icu/util/VersionInfo.java @@ -171,7 +171,7 @@ public int compareTo(VersionInfo other) /** * Map of singletons */ - private static final HashMap MAP_ = new HashMap<>(); + private static final HashMap MAP_ = new HashMap<>(); /** * Error statement string */ diff --git a/src/java.base/share/classes/jdk/internal/jimage/ImageBufferCache.java b/src/java.base/share/classes/jdk/internal/jimage/ImageBufferCache.java index c2cc4a028be..c2693d6f9dd 100755 --- a/src/java.base/share/classes/jdk/internal/jimage/ImageBufferCache.java +++ b/src/java.base/share/classes/jdk/internal/jimage/ImageBufferCache.java @@ -60,7 +60,7 @@ class ImageBufferCache { * with thread local are bootstrap types and so no metaspace leak. */ @SuppressWarnings("unchecked") - private static final ThreadLocal, Integer>[]> CACHE = + private static final ThreadLocal, Integer.ref>[]> CACHE = new ThreadLocal, Integer>[]>() { @Override protected Map.Entry, Integer>[] initialValue() { @@ -134,20 +134,20 @@ static void releaseBuffer(ByteBuffer buffer) { cache[MAX_CACHED_BUFFERS] = null; } - private static Map.Entry, Integer> newCacheEntry(ByteBuffer bb) { - return new AbstractMap.SimpleEntry, Integer>( + private static Map.Entry, Integer.ref> newCacheEntry(ByteBuffer bb) { + return new AbstractMap.SimpleEntry, Integer.ref>( new WeakReference(bb), bb.capacity()); } - private static int getCapacity(Map.Entry, Integer> e) { + private static int getCapacity(Map.Entry, Integer.ref> e) { return e == null? 0 : e.getValue(); } - private static ByteBuffer getByteBuffer(Map.Entry, Integer> e) { + private static ByteBuffer getByteBuffer(Map.Entry, Integer.ref> e) { return e == null? null : e.getKey().get(); } - private static Comparator, Integer>> DECREASING_CAPACITY_NULLS_LAST = + private static Comparator, Integer.ref>> DECREASING_CAPACITY_NULLS_LAST = new Comparator, Integer>>() { @Override public int compare(Map.Entry, Integer> br1, diff --git a/src/java.base/share/classes/jdk/internal/jimage/decompressor/CompressIndexes.java b/src/java.base/share/classes/jdk/internal/jimage/decompressor/CompressIndexes.java index 709b82a808c..d370470e8ed 100755 --- a/src/java.base/share/classes/jdk/internal/jimage/decompressor/CompressIndexes.java +++ b/src/java.base/share/classes/jdk/internal/jimage/decompressor/CompressIndexes.java @@ -46,7 +46,7 @@ public class CompressIndexes { private static final int HEADER_WIDTH = 3; private static final int HEADER_SHIFT = Byte.SIZE - HEADER_WIDTH; - public static List decompressFlow(byte[] values) { + public static List decompressFlow(byte[] values) { List lst = new ArrayList<>(); for (int i = 0; i < values.length; i += getHeaderLength(values[i])) { diff --git a/src/java.base/share/classes/jdk/internal/misc/FileSystemOption.java b/src/java.base/share/classes/jdk/internal/misc/FileSystemOption.java index 5a55b7df67c..5ea48f03a99 100755 --- a/src/java.base/share/classes/jdk/internal/misc/FileSystemOption.java +++ b/src/java.base/share/classes/jdk/internal/misc/FileSystemOption.java @@ -47,11 +47,11 @@ public final class FileSystemOption { new FileSystemOption<>(ExtendedOptions.FILE_TREE); public static final FileSystemOption DIRECT = new FileSystemOption<>(ExtendedOptions.DIRECT); - public static final FileSystemOption SENSITIVITY_HIGH = + public static final FileSystemOption SENSITIVITY_HIGH = new FileSystemOption<>(ExtendedOptions.SENSITIVITY_HIGH); - public static final FileSystemOption SENSITIVITY_MEDIUM = + public static final FileSystemOption SENSITIVITY_MEDIUM = new FileSystemOption<>(ExtendedOptions.SENSITIVITY_MEDIUM); - public static final FileSystemOption SENSITIVITY_LOW = + public static final FileSystemOption SENSITIVITY_LOW = new FileSystemOption<>(ExtendedOptions.SENSITIVITY_LOW); private final ExtendedOptions.InternalOption internalOption; diff --git a/src/java.base/share/classes/jdk/internal/misc/Signal.java b/src/java.base/share/classes/jdk/internal/misc/Signal.java index 9cd9ea0be0d..1be22022eee 100755 --- a/src/java.base/share/classes/jdk/internal/misc/Signal.java +++ b/src/java.base/share/classes/jdk/internal/misc/Signal.java @@ -72,7 +72,7 @@ */ public final class Signal { private static final Hashtable handlers = new Hashtable<>(4); - private static final Hashtable signals = new Hashtable<>(4); + private static final Hashtable signals = new Hashtable<>(4); private int number; private String name; diff --git a/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java b/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java index 1a751423358..1bbe17ed67a 100755 --- a/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java +++ b/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java @@ -44,14 +44,14 @@ public final class ModuleInfoWriter { - private static final Map + private static final Map MODULE_MODS_TO_FLAGS = Map.of( ModuleDescriptor.Modifier.OPEN, ACC_OPEN, ModuleDescriptor.Modifier.SYNTHETIC, ACC_SYNTHETIC, ModuleDescriptor.Modifier.MANDATED, ACC_MANDATED ); - private static final Map + private static final Map REQUIRES_MODS_TO_FLAGS = Map.of( ModuleDescriptor.Requires.Modifier.TRANSITIVE, ACC_TRANSITIVE, ModuleDescriptor.Requires.Modifier.STATIC, ACC_STATIC_PHASE, @@ -59,13 +59,13 @@ public final class ModuleInfoWriter { ModuleDescriptor.Requires.Modifier.MANDATED, ACC_MANDATED ); - private static final Map + private static final Map EXPORTS_MODS_TO_FLAGS = Map.of( ModuleDescriptor.Exports.Modifier.SYNTHETIC, ACC_SYNTHETIC, ModuleDescriptor.Exports.Modifier.MANDATED, ACC_MANDATED ); - private static final Map + private static final Map OPENS_MODS_TO_FLAGS = Map.of( ModuleDescriptor.Opens.Modifier.SYNTHETIC, ACC_SYNTHETIC, ModuleDescriptor.Opens.Modifier.MANDATED, ACC_MANDATED diff --git a/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java b/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java index a23a72dacec..cf53d97dd5e 100755 --- a/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java +++ b/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java @@ -58,7 +58,7 @@ private static final class Mapper implements Function { * Map from module to a class loader index. The index is resolved to the * actual class loader in {@code apply}. */ - private final Map map; + private final Map map; /** * Creates a Mapper to map module names in the given Configuration to diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LocalVariableAnnotationNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LocalVariableAnnotationNode.java index 2753e06b06e..83b3fba40a8 100755 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LocalVariableAnnotationNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LocalVariableAnnotationNode.java @@ -89,7 +89,7 @@ public class LocalVariableAnnotationNode extends TypeAnnotationNode { * The local variable's index in each range. This list must have the same size as the 'start' * list. Must not be {@literal null}. */ - public List index; + public List index; /** * Constructs a new {@link LocalVariableAnnotationNode}. Subclasses must not use this diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LookupSwitchInsnNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LookupSwitchInsnNode.java index 513f2c06cfa..7facdba4e31 100755 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LookupSwitchInsnNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LookupSwitchInsnNode.java @@ -76,7 +76,7 @@ public class LookupSwitchInsnNode extends AbstractInsnNode { public LabelNode dflt; /** The values of the keys. */ - public List keys; + public List keys; /** Beginnings of the handler blocks. */ public List labels; diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/Util.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/Util.java index ac747f4cec2..461a097fe96 100755 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/Util.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/Util.java @@ -141,7 +141,7 @@ static List asArrayList(final char[] charArray) { return charList; } - static List asArrayList(final int[] intArray) { + static List asArrayList(final int[] intArray) { if (intArray == null) { return new ArrayList<>(); } diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/ASMifier.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/ASMifier.java index a1563bee95b..a29f528636e 100755 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/ASMifier.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/ASMifier.java @@ -118,7 +118,7 @@ public class ASMifier extends Printer { "Opcodes.NULL", "Opcodes.UNINITIALIZED_THIS")); - private static final Map CLASS_VERSIONS; + private static final Map CLASS_VERSIONS; static { HashMap classVersions = new HashMap<>(); diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckClassAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckClassAdapter.java index 53b0c424969..9679413119c 100755 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckClassAdapter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckClassAdapter.java @@ -181,7 +181,7 @@ public class CheckClassAdapter extends ClassVisitor { private boolean visitEndCalled; /** The index of the instruction designated by each visited label so far. */ - private Map labelInsnIndices; + private Map labelInsnIndices; // ----------------------------------------------------------------------------------------------- // Constructors diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckMethodAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckMethodAdapter.java index 47173705565..0560d32b22d 100755 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckMethodAdapter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckMethodAdapter.java @@ -355,7 +355,7 @@ private enum Method { private int insnCount; /** The index of the instruction designated by each visited label. */ - private final Map labelInsnIndices; + private final Map labelInsnIndices; /** The labels referenced by the visited method. */ private Set Future implRead(ByteBuffer dst, + abstract Future implRead(ByteBuffer dst, long position, A attachment, - CompletionHandler handler); + CompletionHandler handler); @Override - public final Future read(ByteBuffer dst, long position) { + public final Future read(ByteBuffer dst, long position) { return implRead(dst, position, null, null); } @@ -222,21 +222,21 @@ public final Future read(ByteBuffer dst, long position) { public final void read(ByteBuffer dst, long position, A attachment, - CompletionHandler handler) + CompletionHandler handler) { if (handler == null) throw new NullPointerException("'handler' is null"); implRead(dst, position, attachment, handler); } - abstract Future implWrite(ByteBuffer src, + abstract Future implWrite(ByteBuffer src, long position, A attachment, - CompletionHandler handler); + CompletionHandler handler); @Override - public final Future write(ByteBuffer src, long position) { + public final Future write(ByteBuffer src, long position) { return implWrite(src, position, null, null); } @@ -244,7 +244,7 @@ public final Future write(ByteBuffer src, long position) { public final void write(ByteBuffer src, long position, A attachment, - CompletionHandler handler) + CompletionHandler handler) { if (handler == null) throw new NullPointerException("'handler' is null"); diff --git a/src/java.base/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java b/src/java.base/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java index 9c07dc47cd2..c9db2d8492c 100755 --- a/src/java.base/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java +++ b/src/java.base/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java @@ -278,7 +278,7 @@ private Future read(boolean isScatteringRead, } @Override - public final Future read(ByteBuffer dst) { + public final Future read(ByteBuffer dst) { if (dst.isReadOnly()) throw new IllegalArgumentException("Read-only buffer"); return read(false, dst, null, 0L, TimeUnit.MILLISECONDS, null, null); @@ -289,7 +289,7 @@ public final void read(ByteBuffer dst, long timeout, TimeUnit unit, A attachment, - CompletionHandler handler) + CompletionHandler handler) { if (handler == null) throw new NullPointerException("'handler' is null"); @@ -383,7 +383,7 @@ private Future write(boolean isGatheringWrite, } @Override - public final Future write(ByteBuffer src) { + public final Future write(ByteBuffer src) { return write(false, src, null, 0L, TimeUnit.MILLISECONDS, null, null); } @@ -392,7 +392,7 @@ public final void write(ByteBuffer src, long timeout, TimeUnit unit, A attachment, - CompletionHandler handler) + CompletionHandler handler) { if (handler == null) throw new NullPointerException("'handler' is null"); diff --git a/src/java.base/share/classes/sun/nio/ch/DatagramSocketAdaptor.java b/src/java.base/share/classes/sun/nio/ch/DatagramSocketAdaptor.java index d59a4dc4b92..22e4ee7c661 100755 --- a/src/java.base/share/classes/sun/nio/ch/DatagramSocketAdaptor.java +++ b/src/java.base/share/classes/sun/nio/ch/DatagramSocketAdaptor.java @@ -325,7 +325,7 @@ private void setBooleanOption(SocketOption name, boolean value) } } - private void setIntOption(SocketOption name, int value) + private void setIntOption(SocketOption name, int value) throws SocketException { try { @@ -344,7 +344,7 @@ private boolean getBooleanOption(SocketOption name) throws SocketExcept } } - private int getIntOption(SocketOption name) throws SocketException { + private int getIntOption(SocketOption name) throws SocketException { try { return dc.getOption(name).intValue(); } catch (IOException x) { diff --git a/src/java.base/share/classes/sun/nio/ch/Poller.java b/src/java.base/share/classes/sun/nio/ch/Poller.java index f4e95e1dcce..b8880006810 100755 --- a/src/java.base/share/classes/sun/nio/ch/Poller.java +++ b/src/java.base/share/classes/sun/nio/ch/Poller.java @@ -53,7 +53,7 @@ public abstract class Poller { private final boolean read; // maps file descriptors to parked Thread - private final Map map = new ConcurrentHashMap<>(); + private final Map map = new ConcurrentHashMap<>(); // the queue of updates to the updater Thread private final BlockingQueue queue = new LinkedTransferQueue<>(); diff --git a/src/java.base/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java b/src/java.base/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java index b41430c8d9d..76e2b4bcf77 100755 --- a/src/java.base/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java +++ b/src/java.base/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java @@ -290,10 +290,10 @@ protected void implRelease(FileLockImpl fli) throws IOException { } @Override - Future implRead(final ByteBuffer dst, + Future implRead(final ByteBuffer dst, final long position, final A attachment, - final CompletionHandler handler) + final CompletionHandler handler) { if (position < 0) throw new IllegalArgumentException("Negative position"); @@ -346,10 +346,10 @@ public void run() { } @Override - Future implWrite(final ByteBuffer src, + Future implWrite(final ByteBuffer src, final long position, final A attachment, - final CompletionHandler handler) + final CompletionHandler handler) { if (position < 0) throw new IllegalArgumentException("Negative position"); diff --git a/src/java.base/share/classes/sun/nio/ch/SocketAdaptor.java b/src/java.base/share/classes/sun/nio/ch/SocketAdaptor.java index 076f817d5ce..f0b28586313 100755 --- a/src/java.base/share/classes/sun/nio/ch/SocketAdaptor.java +++ b/src/java.base/share/classes/sun/nio/ch/SocketAdaptor.java @@ -205,7 +205,7 @@ private void setBooleanOption(SocketOption name, boolean value) } } - private void setIntOption(SocketOption name, int value) + private void setIntOption(SocketOption name, int value) throws SocketException { try { @@ -224,7 +224,7 @@ private boolean getBooleanOption(SocketOption name) throws SocketExcept } } - private int getIntOption(SocketOption name) throws SocketException { + private int getIntOption(SocketOption name) throws SocketException { try { return sc.getOption(name).intValue(); } catch (IOException x) { diff --git a/src/java.base/share/classes/sun/nio/fs/ExtendedOptions.java b/src/java.base/share/classes/sun/nio/fs/ExtendedOptions.java index 673c3296696..476566b0f9c 100755 --- a/src/java.base/share/classes/sun/nio/fs/ExtendedOptions.java +++ b/src/java.base/share/classes/sun/nio/fs/ExtendedOptions.java @@ -139,7 +139,7 @@ public T parameter() { public static final InternalOption DIRECT = new InternalOption<>(); - public static final InternalOption SENSITIVITY_HIGH = new InternalOption<>(); - public static final InternalOption SENSITIVITY_MEDIUM = new InternalOption<>(); - public static final InternalOption SENSITIVITY_LOW = new InternalOption<>(); + public static final InternalOption SENSITIVITY_HIGH = new InternalOption<>(); + public static final InternalOption SENSITIVITY_MEDIUM = new InternalOption<>(); + public static final InternalOption SENSITIVITY_LOW = new InternalOption<>(); } diff --git a/src/java.base/share/classes/sun/security/action/GetIntegerAction.java b/src/java.base/share/classes/sun/security/action/GetIntegerAction.java index 2d9a598149c..bb970d07369 100755 --- a/src/java.base/share/classes/sun/security/action/GetIntegerAction.java +++ b/src/java.base/share/classes/sun/security/action/GetIntegerAction.java @@ -66,7 +66,7 @@ */ public class GetIntegerAction - implements java.security.PrivilegedAction { + implements java.security.PrivilegedAction { private final String theProp; private final int defaultVal; private final boolean defaultSet; diff --git a/src/java.base/share/classes/sun/security/provider/ParameterCache.java b/src/java.base/share/classes/sun/security/provider/ParameterCache.java index 9cdc7a215c3..564cf803b20 100755 --- a/src/java.base/share/classes/sun/security/provider/ParameterCache.java +++ b/src/java.base/share/classes/sun/security/provider/ParameterCache.java @@ -51,10 +51,10 @@ private ParameterCache() { } // cache of DSA parameters - private static final Map dsaCache; + private static final Map dsaCache; // cache of DH parameters - private static final Map dhCache; + private static final Map dhCache; // convert DHParameterSpec to SafeDHParameterSpec if its parameters are // safe primes; validation takes time but should be worthwhile for the diff --git a/src/java.base/share/classes/sun/security/rsa/RSAPSSSignature.java b/src/java.base/share/classes/sun/security/rsa/RSAPSSSignature.java index f15b058014a..87fee0c7987 100755 --- a/src/java.base/share/classes/sun/security/rsa/RSAPSSSignature.java +++ b/src/java.base/share/classes/sun/security/rsa/RSAPSSSignature.java @@ -81,7 +81,7 @@ private boolean isDigestEqual(String stdAlg, String givenAlg) { private static final byte[] EIGHT_BYTES_OF_ZEROS = new byte[8]; - private static final Hashtable DIGEST_LENGTHS = + private static final Hashtable DIGEST_LENGTHS = new Hashtable<>(); static { DIGEST_LENGTHS.put(KnownOIDs.SHA_1, 20); diff --git a/src/java.base/share/classes/sun/security/ssl/CipherSuite.java b/src/java.base/share/classes/sun/security/ssl/CipherSuite.java index 019f1ad34d9..09c0a778545 100755 --- a/src/java.base/share/classes/sun/security/ssl/CipherSuite.java +++ b/src/java.base/share/classes/sun/security/ssl/CipherSuite.java @@ -853,7 +853,7 @@ enum CipherSuite { final boolean exportable; - private static final Map cipherSuiteIds; + private static final Map cipherSuiteIds; private static final Map cipherSuiteNames; private static final List allowedCipherSuites; private static final List defaultCipherSuites; diff --git a/src/java.base/share/classes/sun/security/ssl/DTLSInputRecord.java b/src/java.base/share/classes/sun/security/ssl/DTLSInputRecord.java index 337cf76f2c2..196283518fe 100755 --- a/src/java.base/share/classes/sun/security/ssl/DTLSInputRecord.java +++ b/src/java.base/share/classes/sun/security/ssl/DTLSInputRecord.java @@ -561,7 +561,7 @@ private static final class HandshakeFlight implements Cloneable { HashMap> holesMap; // A map used to check duplicated handshake messages. - HashMap messageSeqMap; + HashMap messageSeqMap; HandshakeFlight() { this.handshakeType = HF_UNKNOWN; diff --git a/src/java.base/share/classes/sun/security/ssl/PredefinedDHParameterSpecs.java b/src/java.base/share/classes/sun/security/ssl/PredefinedDHParameterSpecs.java index 14f4a9b4d90..cd11c0f9d3f 100755 --- a/src/java.base/share/classes/sun/security/ssl/PredefinedDHParameterSpecs.java +++ b/src/java.base/share/classes/sun/security/ssl/PredefinedDHParameterSpecs.java @@ -224,10 +224,10 @@ final class PredefinedDHParameterSpecs { "\\{([0-9A-Fa-f]+),([0-9A-Fa-f]+)}"); // cache of predefined default DH ephemeral parameters - static final Map definedParams; + static final Map definedParams; // cache of Finite Field DH Ephemeral parameters (RFC 7919/FFDHE) - static final Map ffdheParams; + static final Map ffdheParams; static { @SuppressWarnings("removal") diff --git a/src/java.base/share/classes/sun/security/ssl/SSLExtensions.java b/src/java.base/share/classes/sun/security/ssl/SSLExtensions.java index 5ad93cfc836..5d878cf9b0f 100755 --- a/src/java.base/share/classes/sun/security/ssl/SSLExtensions.java +++ b/src/java.base/share/classes/sun/security/ssl/SSLExtensions.java @@ -42,7 +42,7 @@ final class SSLExtensions { private int encodedLength; // Extension map for debug logging - private final Map logMap = + private final Map logMap = SSLLogger.isOn ? new LinkedHashMap<>() : null; SSLExtensions(HandshakeMessage handshakeMessage) { diff --git a/src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java b/src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java index eb9eb75debe..3eb21a54cfc 100755 --- a/src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java +++ b/src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java @@ -76,7 +76,7 @@ final class SSLSessionContextImpl implements SSLSessionContext { // The current session ticket encryption key ID (only used in server context) private int currentKeyID; // Session ticket encryption keys and IDs map (only used in server context) - private final Map keyHashMap; + private final Map keyHashMap; // Default setting for stateless session resumption support (RFC 5077) private boolean statelessSession = true; diff --git a/src/java.base/share/classes/sun/security/util/CurveDB.java b/src/java.base/share/classes/sun/security/util/CurveDB.java index 37578c157bd..ceacada0aad 100755 --- a/src/java.base/share/classes/sun/security/util/CurveDB.java +++ b/src/java.base/share/classes/sun/security/util/CurveDB.java @@ -48,7 +48,7 @@ public class CurveDB { new LinkedHashMap<>(); private static final Map nameMap = new HashMap<>(); - private static final Map lengthMap = + private static final Map lengthMap = new HashMap<>(); private static final Collection specCollection; diff --git a/src/java.base/share/classes/sun/util/BuddhistCalendar.java b/src/java.base/share/classes/sun/util/BuddhistCalendar.java index d8ea06f72c5..53409ce580b 100755 --- a/src/java.base/share/classes/sun/util/BuddhistCalendar.java +++ b/src/java.base/share/classes/sun/util/BuddhistCalendar.java @@ -195,7 +195,7 @@ public String getDisplayName(int field, int style, Locale locale) { } @Override - public Map getDisplayNames(int field, int style, Locale locale) { + public Map getDisplayNames(int field, int style, Locale locale) { if (field != ERA) { return super.getDisplayNames(field, style, locale); } diff --git a/src/java.base/share/classes/sun/util/cldr/CLDRCalendarDataProviderImpl.java b/src/java.base/share/classes/sun/util/cldr/CLDRCalendarDataProviderImpl.java index 388af637e54..cb087149aae 100755 --- a/src/java.base/share/classes/sun/util/cldr/CLDRCalendarDataProviderImpl.java +++ b/src/java.base/share/classes/sun/util/cldr/CLDRCalendarDataProviderImpl.java @@ -47,8 +47,8 @@ */ public class CLDRCalendarDataProviderImpl extends CalendarDataProviderImpl { - private static Map firstDay = new ConcurrentHashMap<>(); - private static Map minDays = new ConcurrentHashMap<>(); + private static Map firstDay = new ConcurrentHashMap<>(); + private static Map minDays = new ConcurrentHashMap<>(); public CLDRCalendarDataProviderImpl(Type type, Set langtags) { super(type, langtags); @@ -97,7 +97,7 @@ private static int findValue(String key, Locale locale) { return val; } - private static Optional retrieveInteger(String src, String region) { + private static Optional retrieveInteger(String src, String region) { int regionIndex = src.indexOf(region); if (regionIndex >= 0) { int start = src.lastIndexOf(';', regionIndex) + 1; diff --git a/src/java.base/share/classes/sun/util/locale/provider/BreakIteratorProviderImpl.java b/src/java.base/share/classes/sun/util/locale/provider/BreakIteratorProviderImpl.java index 3f531c9a5f9..f2807e696b3 100755 --- a/src/java.base/share/classes/sun/util/locale/provider/BreakIteratorProviderImpl.java +++ b/src/java.base/share/classes/sun/util/locale/provider/BreakIteratorProviderImpl.java @@ -198,7 +198,7 @@ public boolean isSupportedLocale(Locale locale) { static final class GraphemeBreakIterator extends BreakIterator { CharacterIterator ci; int offset; - List boundaries; + List boundaries; int boundaryIndex; GraphemeBreakIterator() { diff --git a/src/java.base/share/classes/sun/util/locale/provider/CalendarDataUtility.java b/src/java.base/share/classes/sun/util/locale/provider/CalendarDataUtility.java index 72a05904ade..72a60a369c2 100755 --- a/src/java.base/share/classes/sun/util/locale/provider/CalendarDataUtility.java +++ b/src/java.base/share/classes/sun/util/locale/provider/CalendarDataUtility.java @@ -108,17 +108,17 @@ public static String retrieveJavaTimeFieldValueName(String id, int field, int va return name; } - public static Map retrieveFieldValueNames(String id, int field, int style, Locale locale) { + public static Map retrieveFieldValueNames(String id, int field, int style, Locale locale) { LocaleServiceProviderPool pool = LocaleServiceProviderPool.getPool(CalendarNameProvider.class); return pool.getLocalizedObject(CalendarFieldValueNamesMapGetter.INSTANCE, locale, normalizeCalendarType(id), field, style, false); } - public static Map retrieveJavaTimeFieldValueNames(String id, int field, int style, Locale locale) { + public static Map retrieveJavaTimeFieldValueNames(String id, int field, int style, Locale locale) { LocaleServiceProviderPool pool = LocaleServiceProviderPool.getPool(CalendarNameProvider.class); - Map map; + Map map; map = pool.getLocalizedObject(CalendarFieldValueNamesMapGetter.INSTANCE, locale, normalizeCalendarType(id), field, style, true); if (map == null) { @@ -207,12 +207,12 @@ public String getObject(CalendarNameProvider calendarNameProvider, */ private static class CalendarFieldValueNamesMapGetter implements LocaleServiceProviderPool.LocalizedObjectGetter> { + Map> { private static final CalendarFieldValueNamesMapGetter INSTANCE = new CalendarFieldValueNamesMapGetter(); @Override - public Map getObject(CalendarNameProvider calendarNameProvider, + public Map getObject(CalendarNameProvider calendarNameProvider, Locale locale, String requestID, // calendarType Object... params) { @@ -235,7 +235,7 @@ public Map getObject(CalendarNameProvider calendarNameProvider, private static class CalendarWeekParameterGetter implements LocaleServiceProviderPool.LocalizedObjectGetter { + Integer.ref> { private static final CalendarWeekParameterGetter INSTANCE = new CalendarWeekParameterGetter(); diff --git a/src/java.base/share/classes/sun/util/locale/provider/CalendarNameProviderImpl.java b/src/java.base/share/classes/sun/util/locale/provider/CalendarNameProviderImpl.java index 19d32f16793..df83b0bf53e 100755 --- a/src/java.base/share/classes/sun/util/locale/provider/CalendarNameProviderImpl.java +++ b/src/java.base/share/classes/sun/util/locale/provider/CalendarNameProviderImpl.java @@ -135,7 +135,7 @@ public String getDisplayNameImpl(String calendarType, int field, int value, int }; @Override - public Map getDisplayNames(String calendarType, int field, int style, Locale locale) { + public Map getDisplayNames(String calendarType, int field, int style, Locale locale) { Map names; if (style == ALL_STYLES) { names = getDisplayNamesImpl(calendarType, field, SHORT_FORMAT, locale, false); @@ -150,13 +150,13 @@ public Map getDisplayNames(String calendarType, int field, int } // NOTE: This method should be used ONLY BY JSR 310 classes. - public Map getJavaTimeDisplayNames(String calendarType, int field, int style, Locale locale) { + public Map getJavaTimeDisplayNames(String calendarType, int field, int style, Locale locale) { Map names; names = getDisplayNamesImpl(calendarType, field, style, locale, true); return names.isEmpty() ? null : names; } - private Map getDisplayNamesImpl(String calendarType, int field, + private Map getDisplayNamesImpl(String calendarType, int field, int style, Locale locale, boolean javatime) { String key = getResourceKey(calendarType, field, style, javatime); Map map = new TreeMap<>(LengthBasedComparator.INSTANCE); diff --git a/src/java.base/share/classes/sun/util/locale/provider/SPILocaleProviderAdapter.java b/src/java.base/share/classes/sun/util/locale/provider/SPILocaleProviderAdapter.java index 65b1b75a87c..b0f16d6b915 100755 --- a/src/java.base/share/classes/sun/util/locale/provider/SPILocaleProviderAdapter.java +++ b/src/java.base/share/classes/sun/util/locale/provider/SPILocaleProviderAdapter.java @@ -452,7 +452,7 @@ public String getDisplayName(String calendarType, } @Override - public Map getDisplayNames(String calendarType, + public Map getDisplayNames(String calendarType, int field, int style, Locale locale) { locale = CalendarDataUtility.findRegionOverride(locale); diff --git a/src/java.base/unix/classes/sun/nio/ch/Port.java b/src/java.base/unix/classes/sun/nio/ch/Port.java index 81e1ed87615..03ac7e5d97b 100755 --- a/src/java.base/unix/classes/sun/nio/ch/Port.java +++ b/src/java.base/unix/classes/sun/nio/ch/Port.java @@ -50,8 +50,8 @@ interface PollableChannel extends Closeable { // maps fd to "pollable" channel protected final ReadWriteLock fdToChannelLock = new ReentrantReadWriteLock(); - protected final Map fdToChannel = - new HashMap(); + protected final Map fdToChannel = + new HashMap(); Port(AsynchronousChannelProvider provider, ThreadPool pool) {