8330178: Clean up non-standard use of /** comments in java.base

Reviewed-by: darcy, iris, dfuchs, aivanov, naoto
This commit is contained in:
Jonathan Gibbons 2024-04-23 18:43:36 +00:00
parent 88a5dcead2
commit 9cc163a999
23 changed files with 78 additions and 84 deletions

View File

@ -28,7 +28,7 @@ package apple.security;
import java.security.*; import java.security.*;
import static sun.security.util.SecurityConstants.PROVIDER_VER; import static sun.security.util.SecurityConstants.PROVIDER_VER;
/** /*
* The Apple Security Provider. * The Apple Security Provider.
*/ */

View File

@ -25,6 +25,11 @@
package java.net; 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 * Choose a network interface to be the default for
* outgoing IPv6 traffic that does not specify a scope_id (and which needs one). * outgoing IPv6 traffic that does not specify a scope_id (and which needs one).
@ -37,11 +42,6 @@ package java.net;
* that returns null. * that returns null.
*/ */
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Enumeration;
import java.io.IOException;
class DefaultInterface { class DefaultInterface {
private static final NetworkInterface defaultInterface = private static final NetworkInterface defaultInterface =

View File

@ -34,7 +34,7 @@ import java.util.List;
import static sun.security.util.SecurityConstants.PROVIDER_VER; import static sun.security.util.SecurityConstants.PROVIDER_VER;
import static sun.security.util.SecurityProviderConstants.*; import static sun.security.util.SecurityProviderConstants.*;
/** /*
* The "SunJCE" Cryptographic Service Provider. * The "SunJCE" Cryptographic Service Provider.
* *
* @author Jan Luehe * @author Jan Luehe

View File

@ -1231,12 +1231,10 @@ final class FilePermissionCollection extends PermissionCollection
new ObjectStreamField("permissions", Vector.class), 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 * Writes the contents of the perms field out as a Vector for
* serialization compatibility with earlier releases. * serialization compatibility with earlier releases.
* @serialData "permissions" field (a Vector containing the FilePermissions).
* *
* @param out the {@code ObjectOutputStream} to which data is written * @param out the {@code ObjectOutputStream} to which data is written
* @throws IOException if an I/O error occurs * @throws IOException if an I/O error occurs

View File

@ -139,7 +139,7 @@ public interface ObjectStreamConstants {
static final int baseWireHandle = 0x7e0000; static final int baseWireHandle = 0x7e0000;
/******************************************************/ /* ****************************************************/
/* Bit masks for ObjectStreamClass flag.*/ /* Bit masks for ObjectStreamClass flag.*/
/** /**

View File

@ -571,7 +571,7 @@ class LambdaForm {
return true; return true;
} }
/** Invoke this form on the given arguments. */ // /** Invoke this form on the given arguments. */
// final Object invoke(Object... args) throws Throwable { // final Object invoke(Object... args) throws Throwable {
// // NYI: fit this into the fast path? // // NYI: fit this into the fast path?
// return interpretWithArguments(args); // return interpretWithArguments(args);
@ -923,9 +923,9 @@ class LambdaForm {
return invocationCounter == -1; return invocationCounter == -1;
} }
/** Interpretively invoke this form on the given arguments. */
@Hidden @Hidden
@DontInline @DontInline
/** Interpretively invoke this form on the given arguments. */
Object interpretWithArguments(Object... argumentValues) throws Throwable { Object interpretWithArguments(Object... argumentValues) throws Throwable {
if (TRACE_INTERPRETER) if (TRACE_INTERPRETER)
return interpretWithArgumentsTracing(argumentValues); return interpretWithArgumentsTracing(argumentValues);
@ -940,9 +940,9 @@ class LambdaForm {
return rv; return rv;
} }
/** Evaluate a single Name within this form, applying its function to its arguments. */
@Hidden @Hidden
@DontInline @DontInline
/** Evaluate a single Name within this form, applying its function to its arguments. */
Object interpretName(Name name, Object[] values) throws Throwable { Object interpretName(Name name, Object[] values) throws Throwable {
if (TRACE_INTERPRETER) if (TRACE_INTERPRETER)
traceInterpreter("| interpretName", name.debugString(), (Object[]) null); traceInterpreter("| interpretName", name.debugString(), (Object[]) null);

View File

@ -4843,7 +4843,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
0x40000000, 0x4cfa3cc1, 0x5c13d840, 0x6d91b519, 0x39aa400 0x40000000, 0x4cfa3cc1, 0x5c13d840, 0x6d91b519, 0x39aa400
}; };
/** /*
* These routines provide access to the two's complement representation * These routines provide access to the two's complement representation
* of BigIntegers. * of BigIntegers.
*/ */

View File

@ -25,6 +25,10 @@
package java.math; 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 * A class used to represent multiprecision integers that makes efficient
* use of allocated space by allowing a number to occupy only part of * use of allocated space by allowing a number to occupy only part of
@ -42,10 +46,6 @@ package java.math;
* @since 1.3 * @since 1.3
*/ */
import static java.math.BigDecimal.INFLATED;
import static java.math.BigInteger.LONG_MASK;
import java.util.Arrays;
class MutableBigInteger { class MutableBigInteger {
/** /**
* Holds the magnitude of this MutableBigInteger in big endian order. * Holds the magnitude of this MutableBigInteger in big endian order.

View File

@ -675,7 +675,7 @@ public abstract class HttpURLConnection extends URLConnection {
return null; return null;
} }
/** /*
* The response codes for HTTP, as of version 1.1. * The response codes for HTTP, as of version 1.1.
*/ */

View File

@ -2225,7 +2225,7 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
Character.isSurrogate((char)ch); Character.isSurrogate((char)ch);
} }
/** /*
* The following methods handle the main parsing. They are sorted * The following methods handle the main parsing. They are sorted
* according to their precedence order, the lowest one first. * according to their precedence order, the lowest one first.
*/ */
@ -2282,10 +2282,10 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
} }
} }
@SuppressWarnings("fallthrough")
/** /**
* Parsing of sequences between alternations. * Parsing of sequences between alternations.
*/ */
@SuppressWarnings("fallthrough")
private Node sequence(Node end) { private Node sequence(Node end) {
Node head = null; Node head = null;
Node tail = null; Node tail = null;
@ -2409,10 +2409,10 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
return head; return head;
} }
@SuppressWarnings("fallthrough")
/** /**
* Parse and add a new Single or Slice. * Parse and add a new Single or Slice.
*/ */
@SuppressWarnings("fallthrough")
private Node atom() { private Node atom() {
int first = 0; int first = 0;
int prev = -1; int prev = -1;
@ -3322,10 +3322,10 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
return head; return head;
} }
@SuppressWarnings("fallthrough")
/** /**
* Parses inlined match flags and set them appropriately. * Parses inlined match flags and set them appropriately.
*/ */
@SuppressWarnings("fallthrough")
private void addFlag() { private void addFlag() {
int ch = peek(); int ch = peek();
for (;;) { for (;;) {
@ -3364,11 +3364,11 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
} }
} }
@SuppressWarnings("fallthrough")
/** /**
* Parses the second part of inlined match flags and turns off * Parses the second part of inlined match flags and turns off
* flags appropriately. * flags appropriately.
*/ */
@SuppressWarnings("fallthrough")
private void subFlag() { private void subFlag() {
int ch = peek(); int ch = peek();
for (;;) { for (;;) {
@ -3708,7 +3708,7 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
return hasSupplementary ? new SliceS(tmp) : new Slice(tmp); return hasSupplementary ? new SliceS(tmp) : new Slice(tmp);
} }
/** /*
* The following classes are the building components of the object * The following classes are the building components of the object
* tree that represents a compiled regular expression. The object tree * tree that represents a compiled regular expression. The object tree
* is made of individual elements that handle constructs in the Pattern. * is made of individual elements that handle constructs in the Pattern.

View File

@ -23,12 +23,12 @@
* questions. * questions.
*/ */
package jdk.internal.access;
/** /**
* SharedSecrets interface used for the access from java.text.Bidi * SharedSecrets interface used for the access from java.text.Bidi
*/ */
package jdk.internal.access;
public interface JavaAWTFontAccess { public interface JavaAWTFontAccess {
// java.awt.font.TextAttribute constants // java.awt.font.TextAttribute constants

View File

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
/** /*
******************************************************************************* *******************************************************************************
* Copyright (C) 1996-2014, International Business Machines Corporation and * Copyright (C) 1996-2014, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.

View File

@ -2409,9 +2409,9 @@ public class BidiBase {
return directionFromFlags(); return directionFromFlags();
} }
/*********************************************************************/ /* *******************************************************************/
/* The Properties state machine table */ /* The Properties state machine table */
/*********************************************************************/ /* *******************************************************************/
/* */ /* */
/* All table cells are 8 bits: */ /* All table cells are 8 bits: */
/* bits 0..4: next state */ /* bits 0..4: next state */
@ -2422,9 +2422,9 @@ public class BidiBase {
/* Cells may also be of format "_(x,y)" where x represents an action */ /* Cells may also be of format "_(x,y)" where x represents an action */
/* to perform and y represents the next state. */ /* to perform and y represents the next state. */
/* */ /* */
/*********************************************************************/ /* *******************************************************************/
/* Definitions and type for properties state tables */ /* Definitions and type for properties state tables */
/*********************************************************************/ /* *******************************************************************/
private static final int IMPTABPROPS_COLUMNS = 16; private static final int IMPTABPROPS_COLUMNS = 16;
private static final int IMPTABPROPS_RES = IMPTABPROPS_COLUMNS - 1; private static final int IMPTABPROPS_RES = IMPTABPROPS_COLUMNS - 1;
private static short GetStateProps(short cell) { private static short GetStateProps(short cell) {
@ -2447,7 +2447,7 @@ public class BidiBase {
private static final short _S = 5; private static final short _S = 5;
private static final short _B = 6; /* reduced dirProp */ private static final short _B = 6; /* reduced dirProp */
/*********************************************************************/ /* *******************************************************************/
/* */ /* */
/* PROPERTIES STATE TABLE */ /* PROPERTIES STATE TABLE */
/* */ /* */
@ -2510,9 +2510,9 @@ public class BidiBase {
/*23 ENR+ET */ { 32+1, 32+2, 21, 32+5, 32+7, 32+15, 32+17, 32+7, 23, 32+7, 23, 23, 32+3, 18, 21, _AN } /*23 ENR+ET */ { 32+1, 32+2, 21, 32+5, 32+7, 32+15, 32+17, 32+7, 23, 32+7, 23, 23, 32+3, 18, 21, _AN }
}; };
/*********************************************************************/ /* *******************************************************************/
/* The levels state machine tables */ /* The levels state machine tables */
/*********************************************************************/ /* *******************************************************************/
/* */ /* */
/* All table cells are 8 bits: */ /* All table cells are 8 bits: */
/* bits 0..3: next state */ /* bits 0..3: next state */
@ -2525,9 +2525,9 @@ public class BidiBase {
/* */ /* */
/* This format limits each table to 16 states each and to 15 actions.*/ /* This format limits each table to 16 states each and to 15 actions.*/
/* */ /* */
/*********************************************************************/ /* *******************************************************************/
/* Definitions and type for levels state tables */ /* Definitions and type for levels state tables */
/*********************************************************************/ /* *******************************************************************/
private static final int IMPTABLEVELS_COLUMNS = _B + 2; private static final int IMPTABLEVELS_COLUMNS = _B + 2;
private static final int IMPTABLEVELS_RES = IMPTABLEVELS_COLUMNS - 1; private static final int IMPTABLEVELS_RES = IMPTABLEVELS_COLUMNS - 1;
private static short GetState(byte cell) { return (short)(cell & 0x0f); } private static short GetState(byte cell) { return (short)(cell & 0x0f); }
@ -2544,7 +2544,7 @@ public class BidiBase {
} }
} }
/*********************************************************************/ /* *******************************************************************/
/* */ /* */
/* LEVELS STATE TABLES */ /* LEVELS STATE TABLES */
/* */ /* */

View File

@ -22,7 +22,7 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
/** /*
******************************************************************************* *******************************************************************************
* Copyright (C) 1996-2014, International Business Machines Corporation and * Copyright (C) 1996-2014, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.

View File

@ -72,7 +72,7 @@ public interface Metrics {
public String getProvider(); public String getProvider();
/***************************************************************** /* ***************************************************************
* CPU Accounting Subsystem * CPU Accounting Subsystem
****************************************************************/ ****************************************************************/
@ -123,7 +123,7 @@ public interface Metrics {
*/ */
public long getCpuSystemUsage(); public long getCpuSystemUsage();
/***************************************************************** /* ***************************************************************
* CPU Scheduling Metrics * CPU Scheduling Metrics
****************************************************************/ ****************************************************************/
@ -215,7 +215,7 @@ public interface Metrics {
*/ */
public long getEffectiveCpuCount(); public long getEffectiveCpuCount();
/***************************************************************** /* ***************************************************************
* CPU Sets * CPU Sets
****************************************************************/ ****************************************************************/
@ -271,7 +271,7 @@ public interface Metrics {
*/ */
public int[] getEffectiveCpuSetMems(); public int[] getEffectiveCpuSetMems();
/***************************************************************** /* ***************************************************************
* Memory Subsystem * Memory Subsystem
****************************************************************/ ****************************************************************/
@ -352,7 +352,7 @@ public interface Metrics {
*/ */
public long getMemorySoftLimit(); public long getMemorySoftLimit();
/***************************************************************** /* ***************************************************************
* pids subsystem * pids subsystem
****************************************************************/ ****************************************************************/
@ -373,7 +373,7 @@ public interface Metrics {
*/ */
public long getPidsCurrent(); public long getPidsCurrent();
/***************************************************************** /* ***************************************************************
* BlKIO Subsystem * BlKIO Subsystem
****************************************************************/ ****************************************************************/

View File

@ -23,15 +23,15 @@
* questions. * questions.
*/ */
/**
* Plain text file handler.
* @author Steven B. Byrne
*/
package sun.net.www.content.text; package sun.net.www.content.text;
import java.net.*; import java.net.*;
import java.io.InputStream; import java.io.InputStream;
import java.io.IOException; import java.io.IOException;
/**
* Plain text file handler.
* @author Steven B. Byrne
*/
public class plain extends ContentHandler { public class plain extends ContentHandler {
/** /**
* Returns a PlainTextInputStream object from which data * Returns a PlainTextInputStream object from which data

View File

@ -23,12 +23,6 @@
* questions. * questions.
*/ */
/**
* Open an file input stream given a URL.
* @author James Gosling
* @author Steven B. Byrne
*/
package sun.net.www.protocol.file; package sun.net.www.protocol.file;
import java.net.URL; import java.net.URL;
@ -40,6 +34,11 @@ import sun.net.www.*;
import java.util.*; import java.util.*;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
/**
* Open a file input stream given a URL.
* @author James Gosling
* @author Steven B. Byrne
*/
public class FileURLConnection extends URLConnection { public class FileURLConnection extends URLConnection {
private static final String CONTENT_LENGTH = "content-length"; private static final String CONTENT_LENGTH = "content-length";

View File

@ -1,4 +1,4 @@
/** /*
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -65,7 +65,7 @@ public abstract class AbstractDelegateHttpsURLConnection extends
protected abstract javax.net.ssl.HostnameVerifier getHostnameVerifier(); protected abstract javax.net.ssl.HostnameVerifier getHostnameVerifier();
/** /*
* No user application is able to call these routines, as no one * No user application is able to call these routines, as no one
* should ever get access to an instance of * should ever get access to an instance of
* DelegateHttpsURLConnection (sun.* or com.*) * DelegateHttpsURLConnection (sun.* or com.*)

View File

@ -23,12 +23,12 @@
* questions. * questions.
*/ */
package sun.nio.ch;
/** /**
* An object that interrupts a thread blocked in an I/O operation. * An object that interrupts a thread blocked in an I/O operation.
*/ */
package sun.nio.ch;
public interface Interruptible { public interface Interruptible {
/** /**

View File

@ -23,16 +23,15 @@
* questions. * questions.
*/ */
package sun.security.pkcs;
import java.io.IOException;
/** /**
* Generic PKCS Parsing exception. * Generic PKCS Parsing exception.
* *
* @author Benjamin Renaud * @author Benjamin Renaud
*/ */
package sun.security.pkcs;
import java.io.IOException;
public class ParsingException extends IOException { public class ParsingException extends IOException {
@java.io.Serial @java.io.Serial

View File

@ -25,6 +25,17 @@
package sun.security.provider; package sun.security.provider;
import java.security.*;
import java.io.*;
import java.util.Properties;
import java.util.Enumeration;
import java.net.*;
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Random;
import sun.security.util.Debug;
/** /**
* This class generates seeds for the SHA1PRNG cryptographically strong * This class generates seeds for the SHA1PRNG cryptographically strong
* random number generator. * random number generator.
@ -66,17 +77,6 @@ package sun.security.provider;
* @author Gadi Guy * @author Gadi Guy
*/ */
import java.security.*;
import java.io.*;
import java.util.Properties;
import java.util.Enumeration;
import java.net.*;
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Random;
import sun.security.util.Debug;
abstract class SeedGenerator { abstract class SeedGenerator {
// Static instance is created at link time // Static instance is created at link time

View File

@ -23,6 +23,9 @@
* questions. * questions.
*/ */
package sun.security.util;
import java.util.Comparator;
/** /**
* ByteArrayTagOrder: a class for comparing two DER encodings by the * ByteArrayTagOrder: a class for comparing two DER encodings by the
@ -31,10 +34,6 @@
* @author D. N. Hoover * @author D. N. Hoover
*/ */
package sun.security.util;
import java.util.Comparator;
public class ByteArrayTagOrder implements Comparator<byte[]> { public class ByteArrayTagOrder implements Comparator<byte[]> {
/** /**

View File

@ -23,16 +23,15 @@
* questions. * questions.
*/ */
/**
* IOUtils: A collection of IO-related public static methods.
*/
package sun.security.util; package sun.security.util;
import java.io.EOFException; import java.io.EOFException;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
/**
* IOUtils: A collection of IO-related public static methods.
*/
public class IOUtils { public class IOUtils {
/** /**