From 9cc163a999eb8e9597d45b095b642c25071043bd Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Tue, 23 Apr 2024 18:43:36 +0000 Subject: [PATCH] 8330178: Clean up non-standard use of /** comments in `java.base` Reviewed-by: darcy, iris, dfuchs, aivanov, naoto --- .../classes/apple/security/AppleProvider.java | 2 +- .../classes/java/net/DefaultInterface.java | 10 ++++----- .../com/sun/crypto/provider/SunJCE.java | 2 +- .../share/classes/java/io/FilePermission.java | 4 +--- .../java/io/ObjectStreamConstants.java | 2 +- .../classes/java/lang/invoke/LambdaForm.java | 6 ++--- .../share/classes/java/math/BigInteger.java | 2 +- .../classes/java/math/MutableBigInteger.java | 8 +++---- .../classes/java/net/HttpURLConnection.java | 2 +- .../classes/java/util/regex/Pattern.java | 12 +++++----- .../internal/access/JavaAWTFontAccess.java | 4 ++-- .../jdk/internal/icu/lang/UCharacter.java | 2 +- .../jdk/internal/icu/text/BidiBase.java | 20 ++++++++--------- .../classes/jdk/internal/icu/text/UTF16.java | 2 +- .../jdk/internal/platform/Metrics.java | 12 +++++----- .../sun/net/www/content/text/plain.java | 8 +++---- .../www/protocol/file/FileURLConnection.java | 11 +++++----- .../AbstractDelegateHttpsURLConnection.java | 4 ++-- .../classes/sun/nio/ch/Interruptible.java | 4 ++-- .../sun/security/pkcs/ParsingException.java | 9 ++++---- .../sun/security/provider/SeedGenerator.java | 22 +++++++++---------- .../sun/security/util/ByteArrayTagOrder.java | 7 +++--- .../classes/sun/security/util/IOUtils.java | 7 +++--- 23 files changed, 78 insertions(+), 84 deletions(-) diff --git a/src/java.base/macosx/classes/apple/security/AppleProvider.java b/src/java.base/macosx/classes/apple/security/AppleProvider.java index 87efda6ebb1..3f584be336b 100644 --- a/src/java.base/macosx/classes/apple/security/AppleProvider.java +++ b/src/java.base/macosx/classes/apple/security/AppleProvider.java @@ -28,7 +28,7 @@ package apple.security; import java.security.*; import static sun.security.util.SecurityConstants.PROVIDER_VER; -/** +/* * The Apple Security Provider. */ diff --git a/src/java.base/macosx/classes/java/net/DefaultInterface.java b/src/java.base/macosx/classes/java/net/DefaultInterface.java index 1901fcb156a..b46de34a7cc 100644 --- a/src/java.base/macosx/classes/java/net/DefaultInterface.java +++ b/src/java.base/macosx/classes/java/net/DefaultInterface.java @@ -25,6 +25,11 @@ package java.net; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.util.Enumeration; +import java.io.IOException; + /** * Choose a network interface to be the default for * outgoing IPv6 traffic that does not specify a scope_id (and which needs one). @@ -37,11 +42,6 @@ package java.net; * that returns null. */ -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.Enumeration; -import java.io.IOException; - class DefaultInterface { private static final NetworkInterface defaultInterface = diff --git a/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java b/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java index 7914eb8ba0b..9bb1fa7ff82 100644 --- a/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java +++ b/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java @@ -34,7 +34,7 @@ import java.util.List; import static sun.security.util.SecurityConstants.PROVIDER_VER; import static sun.security.util.SecurityProviderConstants.*; -/** +/* * The "SunJCE" Cryptographic Service Provider. * * @author Jan Luehe diff --git a/src/java.base/share/classes/java/io/FilePermission.java b/src/java.base/share/classes/java/io/FilePermission.java index 7c07c608171..808c4293143 100644 --- a/src/java.base/share/classes/java/io/FilePermission.java +++ b/src/java.base/share/classes/java/io/FilePermission.java @@ -1231,12 +1231,10 @@ final class FilePermissionCollection extends PermissionCollection new ObjectStreamField("permissions", Vector.class), }; - /** - * @serialData "permissions" field (a Vector containing the FilePermissions). - */ /** * Writes the contents of the perms field out as a Vector for * serialization compatibility with earlier releases. + * @serialData "permissions" field (a Vector containing the FilePermissions). * * @param out the {@code ObjectOutputStream} to which data is written * @throws IOException if an I/O error occurs diff --git a/src/java.base/share/classes/java/io/ObjectStreamConstants.java b/src/java.base/share/classes/java/io/ObjectStreamConstants.java index d8ebbd23e73..4f06ba7f89e 100644 --- a/src/java.base/share/classes/java/io/ObjectStreamConstants.java +++ b/src/java.base/share/classes/java/io/ObjectStreamConstants.java @@ -139,7 +139,7 @@ public interface ObjectStreamConstants { static final int baseWireHandle = 0x7e0000; - /******************************************************/ + /* ****************************************************/ /* Bit masks for ObjectStreamClass flag.*/ /** 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 8b75d7510fe..823f527b6c4 100644 --- a/src/java.base/share/classes/java/lang/invoke/LambdaForm.java +++ b/src/java.base/share/classes/java/lang/invoke/LambdaForm.java @@ -571,7 +571,7 @@ class LambdaForm { return true; } - /** Invoke this form on the given arguments. */ + // /** Invoke this form on the given arguments. */ // final Object invoke(Object... args) throws Throwable { // // NYI: fit this into the fast path? // return interpretWithArguments(args); @@ -923,9 +923,9 @@ class LambdaForm { return invocationCounter == -1; } + /** Interpretively invoke this form on the given arguments. */ @Hidden @DontInline - /** Interpretively invoke this form on the given arguments. */ Object interpretWithArguments(Object... argumentValues) throws Throwable { if (TRACE_INTERPRETER) return interpretWithArgumentsTracing(argumentValues); @@ -940,9 +940,9 @@ class LambdaForm { return rv; } + /** Evaluate a single Name within this form, applying its function to its arguments. */ @Hidden @DontInline - /** Evaluate a single Name within this form, applying its function to its arguments. */ Object interpretName(Name name, Object[] values) throws Throwable { if (TRACE_INTERPRETER) traceInterpreter("| interpretName", name.debugString(), (Object[]) null); diff --git a/src/java.base/share/classes/java/math/BigInteger.java b/src/java.base/share/classes/java/math/BigInteger.java index 8d12c6de0a7..a972faafb45 100644 --- a/src/java.base/share/classes/java/math/BigInteger.java +++ b/src/java.base/share/classes/java/math/BigInteger.java @@ -4843,7 +4843,7 @@ public class BigInteger extends Number implements Comparable { 0x40000000, 0x4cfa3cc1, 0x5c13d840, 0x6d91b519, 0x39aa400 }; - /** + /* * These routines provide access to the two's complement representation * of BigIntegers. */ diff --git a/src/java.base/share/classes/java/math/MutableBigInteger.java b/src/java.base/share/classes/java/math/MutableBigInteger.java index 76e48d00cf1..eca42ee25b1 100644 --- a/src/java.base/share/classes/java/math/MutableBigInteger.java +++ b/src/java.base/share/classes/java/math/MutableBigInteger.java @@ -25,6 +25,10 @@ package java.math; +import static java.math.BigDecimal.INFLATED; +import static java.math.BigInteger.LONG_MASK; +import java.util.Arrays; + /** * A class used to represent multiprecision integers that makes efficient * use of allocated space by allowing a number to occupy only part of @@ -42,10 +46,6 @@ package java.math; * @since 1.3 */ -import static java.math.BigDecimal.INFLATED; -import static java.math.BigInteger.LONG_MASK; -import java.util.Arrays; - class MutableBigInteger { /** * Holds the magnitude of this MutableBigInteger in big endian order. diff --git a/src/java.base/share/classes/java/net/HttpURLConnection.java b/src/java.base/share/classes/java/net/HttpURLConnection.java index b501fa25e45..b405fb10a16 100644 --- a/src/java.base/share/classes/java/net/HttpURLConnection.java +++ b/src/java.base/share/classes/java/net/HttpURLConnection.java @@ -675,7 +675,7 @@ public abstract class HttpURLConnection extends URLConnection { return null; } - /** + /* * The response codes for HTTP, as of version 1.1. */ 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 1c2fd151b8d..62ef125fdee 100644 --- a/src/java.base/share/classes/java/util/regex/Pattern.java +++ b/src/java.base/share/classes/java/util/regex/Pattern.java @@ -2225,7 +2225,7 @@ loop: for(int x=0, offset=0; x { /** diff --git a/src/java.base/share/classes/sun/security/util/IOUtils.java b/src/java.base/share/classes/sun/security/util/IOUtils.java index 4837e2b70a0..a103f36eb2c 100644 --- a/src/java.base/share/classes/sun/security/util/IOUtils.java +++ b/src/java.base/share/classes/sun/security/util/IOUtils.java @@ -23,16 +23,15 @@ * questions. */ -/** - * IOUtils: A collection of IO-related public static methods. - */ - package sun.security.util; import java.io.EOFException; import java.io.IOException; import java.io.InputStream; +/** + * IOUtils: A collection of IO-related public static methods. + */ public class IOUtils { /**