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

Reviewed-by: naoto, iris, darcy
This commit is contained in:
Jonathan Gibbons 2024-05-31 22:16:35 +00:00
parent 2cae9a0397
commit 10eb1cb639
25 changed files with 117 additions and 117 deletions

View File

@ -27,7 +27,7 @@
# new warning is added to javac, it can be temporarily added to the # new warning is added to javac, it can be temporarily added to the
# disabled warnings list. # disabled warnings list.
# #
DISABLED_WARNINGS_java += dangling-doc-comments # DISABLED_WARNINGS_java +=
DOCLINT += -Xdoclint:all/protected \ DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*' '-Xdoclint/package:java.*,javax.*'

View File

@ -181,9 +181,9 @@ public abstract class ClassValue<T> {
map.changeEntry(this, value); map.changeEntry(this, value);
} }
/// -------- //| --------
/// Implementation... //| Implementation...
/// -------- //| --------
/** Return the cache, if it exists, else a dummy empty cache. */ /** Return the cache, if it exists, else a dummy empty cache. */
private static Entry<?>[] getCacheCarefully(Class<?> type) { private static Entry<?>[] getCacheCarefully(Class<?> type) {
@ -535,9 +535,9 @@ public abstract class ClassValue<T> {
addToCache(classValue, e); addToCache(classValue, e);
} }
/// -------- //| --------
/// Cache management. //| Cache management.
/// -------- //| --------
// Statics do not need synchronization. // Statics do not need synchronization.

View File

@ -1068,7 +1068,7 @@ public final class String
return Arrays.copyOf(dst, dp); return Arrays.copyOf(dst, dp);
} }
//////////////////////////////// utf8 //////////////////////////////////// //------------------------------ utf8 ------------------------------------
/** /**
* Decodes ASCII from the source byte array into the destination * Decodes ASCII from the source byte array into the destination
@ -4806,7 +4806,7 @@ public final class String
System.arraycopy(buffer, offset, buffer, offset + copied, limit - copied); System.arraycopy(buffer, offset, buffer, offset + copied, limit - copied);
} }
//////////////////////////////////////////////////////////////// //--------------------------------------------------------------
/** /**
* Copy character bytes from this string into dst starting at dstBegin. * Copy character bytes from this string into dst starting at dstBegin.

View File

@ -94,7 +94,7 @@ import java.util.function.IntFunction;
*/ */
// public // public
interface ConstantGroup { interface ConstantGroup {
/// Access //--- Access
/** /**
* Returns the number of constants in this group. * Returns the number of constants in this group.
@ -148,7 +148,7 @@ interface ConstantGroup {
*/ */
boolean isPresent(int index); boolean isPresent(int index);
/// Views //--- Views
/** /**
* Create a view on this group as a {@link List} view. * Create a view on this group as a {@link List} view.
@ -182,7 +182,7 @@ interface ConstantGroup {
return new AbstractConstantGroup.SubGroup(this, start, end); return new AbstractConstantGroup.SubGroup(this, start, end);
} }
/// Bulk operations //--- Bulk operations
/** /**
* Copy a sequence of constant values into a given buffer. * Copy a sequence of constant values into a given buffer.

View File

@ -46,20 +46,20 @@ class MethodHandleNatives {
private MethodHandleNatives() { } // static only private MethodHandleNatives() { } // static only
/// MemberName support //--- MemberName support
static native void init(MemberName self, Object ref); static native void init(MemberName self, Object ref);
static native void expand(MemberName self); static native void expand(MemberName self);
static native MemberName resolve(MemberName self, Class<?> caller, int lookupMode, static native MemberName resolve(MemberName self, Class<?> caller, int lookupMode,
boolean speculativeResolve) throws LinkageError, ClassNotFoundException; boolean speculativeResolve) throws LinkageError, ClassNotFoundException;
/// Field layout queries parallel to jdk.internal.misc.Unsafe: //--- Field layout queries parallel to jdk.internal.misc.Unsafe:
static native long objectFieldOffset(MemberName self); // e.g., returns vmindex static native long objectFieldOffset(MemberName self); // e.g., returns vmindex
static native long staticFieldOffset(MemberName self); // e.g., returns vmindex static native long staticFieldOffset(MemberName self); // e.g., returns vmindex
static native Object staticFieldBase(MemberName self); // e.g., returns clazz static native Object staticFieldBase(MemberName self); // e.g., returns clazz
static native Object getMemberVMInfo(MemberName self); // returns {vmindex,vmtarget} static native Object getMemberVMInfo(MemberName self); // returns {vmindex,vmtarget}
/// CallSite support //--- CallSite support
/** Tell the JVM that we need to change the target of a CallSite. */ /** Tell the JVM that we need to change the target of a CallSite. */
static native void setCallSiteTargetNormal(CallSite site, MethodHandle target); static native void setCallSiteTargetNormal(CallSite site, MethodHandle target);

View File

@ -93,7 +93,7 @@ public class MethodHandles {
// See IMPL_LOOKUP below. // See IMPL_LOOKUP below.
//// Method handle creation from ordinary methods. //--- Method handle creation from ordinary methods.
/** /**
* Returns a {@link Lookup lookup object} with * Returns a {@link Lookup lookup object} with
@ -3745,7 +3745,7 @@ return mh1;
return new InfoFromMemberName(this, member, refKind); return new InfoFromMemberName(this, member, refKind);
} }
/// Helper methods, all package-private. //--- Helper methods, all package-private.
MemberName resolveOrFail(byte refKind, Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException { MemberName resolveOrFail(byte refKind, Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
checkSymbolicClass(refc); // do this before attempting to resolve checkSymbolicClass(refc); // do this before attempting to resolve
@ -4639,7 +4639,7 @@ return mh1;
} }
/// method handle invocation (reflective style) //--- method handle invocation (reflective style)
/** /**
* Produces a method handle which will invoke any method handle of the * Produces a method handle which will invoke any method handle of the
@ -4822,7 +4822,7 @@ return invoker;
return type.invokers().basicInvoker(); return type.invokers().basicInvoker();
} }
/// method handle modification (creation from other method handles) //--- method handle modification (creation from other method handles)
/** /**
* Produces a method handle which adapts the type of the * Produces a method handle which adapts the type of the

View File

@ -1133,7 +1133,7 @@ class MethodType
} }
} }
/// Queries which have to do with the bytecode architecture //--- Queries which have to do with the bytecode architecture
/** Reports the number of JVM stack slots required to invoke a method /** Reports the number of JVM stack slots required to invoke a method
* of this type. Note that (for historical reasons) the JVM requires * of this type. Note that (for historical reasons) the JVM requires
@ -1302,7 +1302,7 @@ class MethodType
} }
} }
/// Serialization. //--- Serialization.
/** /**
* There are no serializable fields for {@code MethodType}. * There are no serializable fields for {@code MethodType}.

View File

@ -354,9 +354,9 @@ public class GregorianCalendar extends Calendar {
* accurate. * accurate.
*/ */
////////////////// //----------------
// Class Variables // Class Variables
////////////////// //----------------
/** /**
* Value of the {@code ERA} field indicating * Value of the {@code ERA} field indicating
@ -513,9 +513,9 @@ public class GregorianCalendar extends Calendar {
// The default value of gregorianCutover. // The default value of gregorianCutover.
static final long DEFAULT_GREGORIAN_CUTOVER = -12219292800000L; static final long DEFAULT_GREGORIAN_CUTOVER = -12219292800000L;
///////////////////// //-------------------
// Instance Variables // Instance Variables
///////////////////// //-------------------
/** /**
* The point at which the Gregorian calendar rules are used, measured in * The point at which the Gregorian calendar rules are used, measured in
@ -579,9 +579,9 @@ public class GregorianCalendar extends Calendar {
*/ */
private transient int[] originalFields; private transient int[] originalFields;
/////////////// //-------------
// Constructors // Constructors
/////////////// //-------------
/** /**
* Constructs a default {@code GregorianCalendar} using the current time * Constructs a default {@code GregorianCalendar} using the current time
@ -748,9 +748,9 @@ public class GregorianCalendar extends Calendar {
gdate = gcal.newCalendarDate(getZone()); gdate = gcal.newCalendarDate(getZone());
} }
///////////////// //---------------
// Public methods // Public methods
///////////////// //---------------
/** /**
* Sets the {@code GregorianCalendar} change date. This is the point when the switch * Sets the {@code GregorianCalendar} change date. This is the point when the switch
@ -2254,9 +2254,9 @@ public class GregorianCalendar extends Calendar {
return gc.getActualMaximum(WEEK_OF_YEAR); return gc.getActualMaximum(WEEK_OF_YEAR);
} }
///////////////////////////// //---------------------------
// Time => Fields computation // Time => Fields computation
///////////////////////////// //---------------------------
/** /**
* The fixed date corresponding to gdate. If the value is * The fixed date corresponding to gdate. If the value is

View File

@ -166,7 +166,7 @@ class CharPredicates {
JOIN_CONTROL()); JOIN_CONTROL());
} }
///////////////////////////////////////////////////////////////////////////// //---------------------------------------------------------------------------
private static CharPredicate getPosixPredicate(String name, boolean caseIns) { private static CharPredicate getPosixPredicate(String name, boolean caseIns) {
return switch (name) { return switch (name) {
@ -234,7 +234,7 @@ class CharPredicates {
return getPosixPredicate(propName.toUpperCase(Locale.ENGLISH), caseIns); return getPosixPredicate(propName.toUpperCase(Locale.ENGLISH), caseIns);
} }
///////////////////////////////////////////////////////////////////////////// //---------------------------------------------------------------------------
/** /**
* Returns a predicate matching all characters belong to a named * Returns a predicate matching all characters belong to a named
@ -411,7 +411,7 @@ class CharPredicates {
return (BmpCharPredicate)ch -> ch < 128 && ASCII.isType(ch, ctype); return (BmpCharPredicate)ch -> ch < 128 && ASCII.isType(ch, ctype);
} }
///////////////////////////////////////////////////////////////////////////// //---------------------------------------------------------------------------
/** /**
* Posix ASCII variants, not in the lookup map * Posix ASCII variants, not in the lookup map
@ -426,7 +426,7 @@ class CharPredicates {
return ch -> ch < 128 && ASCII.isSpace(ch); return ch -> ch < 128 && ASCII.isSpace(ch);
} }
///////////////////////////////////////////////////////////////////////////// //---------------------------------------------------------------------------
/** /**
* Emoji related binary properties * Emoji related binary properties

View File

@ -119,7 +119,7 @@ public final class StringPrepDataReader implements ICUBinary.Authenticate {
* No guarantees are made if a older version is used * No guarantees are made if a older version is used
* see store.c of gennorm for more information and values * see store.c of gennorm for more information and values
*/ */
///* dataFormat="SPRP" 0x53, 0x50, 0x52, 0x50 */ // /* dataFormat="SPRP" 0x53, 0x50, 0x52, 0x50 */
private static final byte DATA_FORMAT_ID[] = {(byte)0x53, (byte)0x50, private static final byte DATA_FORMAT_ID[] = {(byte)0x53, (byte)0x50,
(byte)0x52, (byte)0x50}; (byte)0x52, (byte)0x50};
private static final byte DATA_FORMAT_VERSION[] = {(byte)0x3, (byte)0x2, private static final byte DATA_FORMAT_VERSION[] = {(byte)0x3, (byte)0x2,

View File

@ -51,14 +51,14 @@ package jdk.internal.icu.lang;
public final class UCharacterDirection implements UCharacterEnums.ECharacterDirection { public final class UCharacterDirection implements UCharacterEnums.ECharacterDirection {
// private constructor ========================================= // private constructor =========================================
///CLOVER:OFF // CLOVER:OFF
/** /**
* Private constructor to prevent initialization * Private constructor to prevent initialization
*/ */
private UCharacterDirection() private UCharacterDirection()
{ {
} }
///CLOVER:ON // CLOVER:ON
/** /**
* Gets the name of the argument direction * Gets the name of the argument direction

View File

@ -92,8 +92,8 @@ public final class Unsafe {
return theUnsafe; return theUnsafe;
} }
/// peek and poke operations //--- peek and poke operations
/// (compilers should optimize these to memory ops) // (compilers should optimize these to memory ops)
// These work on object fields in the Java heap. // These work on object fields in the Java heap.
// They will not work on elements of packed arrays. // They will not work on elements of packed arrays.
@ -420,7 +420,7 @@ public final class Unsafe {
/// helper methods for validating various types of objects/values //--- helper methods for validating various types of objects/values
/** /**
* Create an exception reflecting that some of the input was invalid * Create an exception reflecting that some of the input was invalid
@ -581,7 +581,7 @@ public final class Unsafe {
} }
/// wrappers for malloc, realloc, free: //--- wrappers for malloc, realloc, free:
/** /**
* Round up allocation size to a multiple of HeapWordSize. * Round up allocation size to a multiple of HeapWordSize.
@ -1032,7 +1032,7 @@ public final class Unsafe {
@IntrinsicCandidate @IntrinsicCandidate
private native void writebackPostSync0(); private native void writebackPostSync0();
/// random queries //--- random queries
/** /**
* This constant differs from all results that will ever be returned from * This constant differs from all results that will ever be returned from
@ -1312,7 +1312,7 @@ public final class Unsafe {
*/ */
public static boolean isWritebackEnabled() { return DATA_CACHE_LINE_FLUSH_SIZE != 0; } public static boolean isWritebackEnabled() { return DATA_CACHE_LINE_FLUSH_SIZE != 0; }
/// random trusted operations from JNI: //--- random trusted operations from JNI:
/** /**
* Tells the VM to define a class, without security checks. By default, the * Tells the VM to define a class, without security checks. By default, the

View File

@ -94,9 +94,9 @@ public interface Attributes
{ {
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
// Indexed access. // Indexed access.
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
/** /**
@ -191,9 +191,9 @@ public interface Attributes
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
// Name-based query. // Name-based query.
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
/** /**

View File

@ -348,9 +348,9 @@ public class InputSource {
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
// Internal state. // Internal state.
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
private String publicId; private String publicId;
private String systemId; private String systemId;

View File

@ -174,9 +174,9 @@ public class SAXException extends Exception {
////////////////////////////////////////////////////////////////////// //--------------------------------------------------------------------
// Internal state. // Internal state.
////////////////////////////////////////////////////////////////////// //--------------------------------------------------------------------
@java.io.Serial @java.io.Serial
private static final ObjectStreamField[] serialPersistentFields = { private static final ObjectStreamField[] serialPersistentFields = {

View File

@ -62,9 +62,9 @@ package jdk.internal.org.xml.sax;
public class SAXParseException extends SAXException { public class SAXParseException extends SAXException {
////////////////////////////////////////////////////////////////////// //--------------------------------------------------------------------
// Constructors. // Constructors.
////////////////////////////////////////////////////////////////////// //--------------------------------------------------------------------
/** /**
@ -274,9 +274,9 @@ public class SAXParseException extends SAXException {
return buf.toString(); return buf.toString();
} }
////////////////////////////////////////////////////////////////////// //--------------------------------------------------------------------
// Internal state. // Internal state.
////////////////////////////////////////////////////////////////////// //--------------------------------------------------------------------
/** /**

View File

@ -85,9 +85,9 @@ public interface XMLReader
{ {
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
// Configuration. // Configuration.
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
/** /**
@ -236,9 +236,9 @@ public interface XMLReader
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
// Event handlers. // Event handlers.
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
/** /**
@ -350,9 +350,9 @@ public interface XMLReader
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
// Parsing. // Parsing.
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
/** /**
* Parse an XML document. * Parse an XML document.

View File

@ -85,9 +85,9 @@ public class DefaultHandler
{ {
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
// Default implementation of the EntityResolver interface. // Default implementation of the EntityResolver interface.
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
/** /**
* Resolve an external entity. * Resolve an external entity.
@ -118,9 +118,9 @@ public class DefaultHandler
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
// Default implementation of DTDHandler interface. // Default implementation of DTDHandler interface.
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
/** /**
@ -170,9 +170,9 @@ public class DefaultHandler
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
// Default implementation of ContentHandler interface. // Default implementation of ContentHandler interface.
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
/** /**
@ -416,9 +416,9 @@ public class DefaultHandler
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
// Default implementation of the ErrorHandler interface. // Default implementation of the ErrorHandler interface.
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
/** /**

View File

@ -201,9 +201,9 @@ class ClassFileAssembler implements ClassFileConstants {
} }
} }
/////////////// //-----------//
// Constants // // Constants //
/////////////// //-----------//
public void opc_aconst_null() { public void opc_aconst_null() {
emitByte(opc_aconst_null); emitByte(opc_aconst_null);
@ -222,9 +222,9 @@ class ClassFileAssembler implements ClassFileConstants {
incStack(); incStack();
} }
///////////////////////////////////// //---------------------------------//
// Local variable loads and stores // // Local variable loads and stores //
///////////////////////////////////// //---------------------------------//
public void opc_iload_0() { public void opc_iload_0() {
emitByte(opc_iload_0); emitByte(opc_iload_0);
@ -383,9 +383,9 @@ class ClassFileAssembler implements ClassFileConstants {
decStack(); decStack();
} }
//////////////////////// //--------------------//
// Stack manipulation // // Stack manipulation //
//////////////////////// //--------------------//
public void opc_pop() { public void opc_pop() {
emitByte(opc_pop); emitByte(opc_pop);
@ -406,9 +406,9 @@ class ClassFileAssembler implements ClassFileConstants {
emitByte(opc_swap); emitByte(opc_swap);
} }
/////////////////////////////// //---------------------------//
// Widening conversions only // // Widening conversions only //
/////////////////////////////// //---------------------------//
public void opc_i2l() { public void opc_i2l() {
emitByte(opc_i2l); emitByte(opc_i2l);
@ -434,9 +434,9 @@ class ClassFileAssembler implements ClassFileConstants {
emitByte(opc_f2d); emitByte(opc_f2d);
} }
////////////////// //--------------//
// Control flow // // Control flow //
////////////////// //--------------//
public void opc_ifeq(short bciOffset) { public void opc_ifeq(short bciOffset) {
emitByte(opc_ifeq); emitByte(opc_ifeq);
@ -514,9 +514,9 @@ class ClassFileAssembler implements ClassFileConstants {
decStack(); decStack();
} }
///////////////////////// //---------------------//
// Return instructions // // Return instructions //
///////////////////////// //---------------------//
public void opc_ireturn() { public void opc_ireturn() {
emitByte(opc_ireturn); emitByte(opc_ireturn);
@ -548,9 +548,9 @@ class ClassFileAssembler implements ClassFileConstants {
setStack(0); setStack(0);
} }
////////////////////// //------------------//
// Field operations // // Field operations //
////////////////////// //------------------//
public void opc_getstatic(short fieldIndex, int fieldSizeInStackSlots) { public void opc_getstatic(short fieldIndex, int fieldSizeInStackSlots) {
emitByte(opc_getstatic); emitByte(opc_getstatic);
@ -576,9 +576,9 @@ class ClassFileAssembler implements ClassFileConstants {
setStack(getStack() - fieldSizeInStackSlots - 1); setStack(getStack() - fieldSizeInStackSlots - 1);
} }
//////////////////////// //--------------------//
// Method invocations // // Method invocations //
//////////////////////// //--------------------//
/** Long and double arguments and return types count as 2 arguments; /** Long and double arguments and return types count as 2 arguments;
other values count as 1. */ other values count as 1. */
@ -627,17 +627,17 @@ class ClassFileAssembler implements ClassFileConstants {
setStack(getStack() - numArgs - 1 + numReturnValues); setStack(getStack() - numArgs - 1 + numReturnValues);
} }
////////////////// //--------------//
// Array length // // Array length //
////////////////// //--------------//
public void opc_arraylength() { public void opc_arraylength() {
emitByte(opc_arraylength); emitByte(opc_arraylength);
} }
///////// //-----//
// New // // New //
///////// //-----//
public void opc_new(short classIndex) { public void opc_new(short classIndex) {
emitByte(opc_new); emitByte(opc_new);
@ -645,18 +645,18 @@ class ClassFileAssembler implements ClassFileConstants {
incStack(); incStack();
} }
//////////// //--------//
// Athrow // // Athrow //
//////////// //--------//
public void opc_athrow() { public void opc_athrow() {
emitByte(opc_athrow); emitByte(opc_athrow);
setStack(1); setStack(1);
} }
////////////////////////////// //--------------------------//
// Checkcast and instanceof // // Checkcast and instanceof //
////////////////////////////// //--------------------------//
/** Assumes the checkcast succeeds */ /** Assumes the checkcast succeeds */
public void opc_checkcast(short classIndex) { public void opc_checkcast(short classIndex) {

View File

@ -136,14 +136,14 @@ public class PropertiesDefaultHandler extends DefaultHandler {
} }
} }
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
// Validate while parsing // Validate while parsing
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
static final String ALLOWED_ELEMENTS = "comment, entry"; static final String ALLOWED_ELEMENTS = "comment, entry";
static final String ALLOWED_COMMENT = "comment"; static final String ALLOWED_COMMENT = "comment";
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
// Handler methods // Handler methods
//////////////////////////////////////////////////////////////////// //------------------------------------------------------------------
StringBuilder buf = new StringBuilder(); StringBuilder buf = new StringBuilder();
boolean sawRoot = false; // whether a valid root element exists boolean sawRoot = false; // whether a valid root element exists
boolean sawComment = false; boolean sawComment = false;

View File

@ -65,7 +65,7 @@ public class ValueConversions {
return caches; return caches;
} }
/// Converting references to values. //--- Converting references to values.
// There are several levels of this unboxing conversions: // There are several levels of this unboxing conversions:
// no conversions: exactly Integer.valueOf, etc. // no conversions: exactly Integer.valueOf, etc.
@ -222,7 +222,7 @@ public class ValueConversions {
private static final Integer ZERO_INT = 0, ONE_INT = 1; private static final Integer ZERO_INT = 0, ONE_INT = 1;
/// Primitive conversions //--- Primitive conversions
/** /**
* Produce a Number which represents the given value {@code x} * Produce a Number which represents the given value {@code x}
* according to the primitive type of the given wrapper {@code wrap}. * according to the primitive type of the given wrapper {@code wrap}.
@ -274,7 +274,7 @@ public class ValueConversions {
return (int) x; return (int) x;
} }
/// Converting primitives to references //--- Converting primitives to references
static Integer boxInteger(int x) { static Integer boxInteger(int x) {
return x; return x;
@ -336,7 +336,7 @@ public class ValueConversions {
throw new IllegalArgumentException("cannot find box adapter for " + wrap); throw new IllegalArgumentException("cannot find box adapter for " + wrap);
} }
/// Constant functions //--- Constant functions
static void ignore(Object x) { static void ignore(Object x) {
// no value to return; this is an unbox of null // no value to return; this is an unbox of null
@ -360,7 +360,7 @@ public class ValueConversions {
} }
/// Primitive conversions. //--- Primitive conversions.
// These are supported directly by the JVM, usually by a single instruction. // These are supported directly by the JVM, usually by a single instruction.
// In the case of narrowing to a subword, there may be a pair of instructions. // In the case of narrowing to a subword, there may be a pair of instructions.
// In the case of booleans, there may be a helper routine to manage a 1-bit value. // In the case of booleans, there may be a helper routine to manage a 1-bit value.

View File

@ -128,7 +128,7 @@ public enum Wrapper {
static int other(int slots) { return slots << SLOT_SHIFT; } static int other(int slots) { return slots << SLOT_SHIFT; }
} }
/// format queries: //--- format queries:
/** How many bits are in the wrapped value? Returns 0 for OBJECT or VOID. */ /** How many bits are in the wrapped value? Returns 0 for OBJECT or VOID. */
public int bitWidth() { return (format >> Format.SIZE_SHIFT) & Format.SIZE_MASK; } public int bitWidth() { return (format >> Format.SIZE_SHIFT) & Format.SIZE_MASK; }

View File

@ -35,18 +35,18 @@ import sun.util.locale.provider.CalendarDataUtility;
public class BuddhistCalendar extends GregorianCalendar { public class BuddhistCalendar extends GregorianCalendar {
////////////////// //----------------
// Class Variables // Class Variables
////////////////// //----------------
@java.io.Serial @java.io.Serial
private static final long serialVersionUID = -8527488697350388578L; private static final long serialVersionUID = -8527488697350388578L;
private static final int BUDDHIST_YEAR_OFFSET = 543; private static final int BUDDHIST_YEAR_OFFSET = 543;
/////////////// //-------------
// Constructors // Constructors
/////////////// //-------------
/** /**
* Constructs a default BuddhistCalendar using the current time * Constructs a default BuddhistCalendar using the current time
@ -84,9 +84,9 @@ public class BuddhistCalendar extends GregorianCalendar {
super(zone, aLocale); super(zone, aLocale);
} }
///////////////// //---------------
// Public methods // Public methods
///////////////// //---------------
/** /**
* Returns {@code "buddhist"} as the calendar type of this Calendar. * Returns {@code "buddhist"} as the calendar type of this Calendar.

View File

@ -67,7 +67,7 @@ import java.util.concurrent.ConcurrentMap;
public abstract sealed class CalendarSystem permits AbstractCalendar { public abstract sealed class CalendarSystem permits AbstractCalendar {
/////////////////////// Calendar Factory Methods ///////////////////////// //--------------------- Calendar Factory Methods -------------------------
private static volatile boolean initialized; private static volatile boolean initialized;
@ -173,7 +173,7 @@ public abstract sealed class CalendarSystem permits AbstractCalendar {
return (cs == null) ? cal : cs; return (cs == null) ? cal : cs;
} }
//////////////////////////////// Calendar API ////////////////////////////////// //------------------------------ Calendar API ----------------------------------
/** /**
* Returns the name of this calendar system. * Returns the name of this calendar system.

View File

@ -115,8 +115,8 @@ public final class Unsafe {
return theUnsafe; return theUnsafe;
} }
/// peek and poke operations //| peek and poke operations
/// (compilers should optimize these to memory ops) //| (compilers should optimize these to memory ops)
// These work on object fields in the Java heap. // These work on object fields in the Java heap.
// They will not work on elements of packed arrays. // They will not work on elements of packed arrays.
@ -648,7 +648,7 @@ public final class Unsafe {
} }
/// wrappers for malloc, realloc, free: //| wrappers for malloc, realloc, free:
/** /**
* Allocates a new block of native memory, of the given size in bytes. The * Allocates a new block of native memory, of the given size in bytes. The
@ -858,7 +858,7 @@ public final class Unsafe {
theInternalUnsafe.freeMemory(address); theInternalUnsafe.freeMemory(address);
} }
/// random queries //| random queries
/** /**
* This constant differs from all results that will ever be returned from * This constant differs from all results that will ever be returned from
@ -1177,7 +1177,7 @@ public final class Unsafe {
} }
/// random trusted operations from JNI: //| random trusted operations from JNI:
/** /**
* Allocates an instance but does not run any constructor. * Allocates an instance but does not run any constructor.