diff --git a/make/modules/java.base/Java.gmk b/make/modules/java.base/Java.gmk index cbe6eecf187..5820c280fe9 100644 --- a/make/modules/java.base/Java.gmk +++ b/make/modules/java.base/Java.gmk @@ -27,7 +27,7 @@ # new warning is added to javac, it can be temporarily added to the # disabled warnings list. # -DISABLED_WARNINGS_java += dangling-doc-comments +# DISABLED_WARNINGS_java += DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' diff --git a/src/java.base/share/classes/java/lang/ClassValue.java b/src/java.base/share/classes/java/lang/ClassValue.java index 1ce1c4be0aa..05046b82523 100644 --- a/src/java.base/share/classes/java/lang/ClassValue.java +++ b/src/java.base/share/classes/java/lang/ClassValue.java @@ -181,9 +181,9 @@ public abstract class ClassValue { map.changeEntry(this, value); } - /// -------- - /// Implementation... - /// -------- + //| -------- + //| Implementation... + //| -------- /** Return the cache, if it exists, else a dummy empty cache. */ private static Entry[] getCacheCarefully(Class type) { @@ -535,9 +535,9 @@ public abstract class ClassValue { addToCache(classValue, e); } - /// -------- - /// Cache management. - /// -------- + //| -------- + //| Cache management. + //| -------- // Statics do not need synchronization. diff --git a/src/java.base/share/classes/java/lang/String.java b/src/java.base/share/classes/java/lang/String.java index 3b497cd1923..68c16c93e4b 100644 --- a/src/java.base/share/classes/java/lang/String.java +++ b/src/java.base/share/classes/java/lang/String.java @@ -1068,7 +1068,7 @@ public final class String return Arrays.copyOf(dst, dp); } - //////////////////////////////// utf8 //////////////////////////////////// + //------------------------------ utf8 ------------------------------------ /** * 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); } - //////////////////////////////////////////////////////////////// + //-------------------------------------------------------------- /** * Copy character bytes from this string into dst starting at dstBegin. diff --git a/src/java.base/share/classes/java/lang/invoke/ConstantGroup.java b/src/java.base/share/classes/java/lang/invoke/ConstantGroup.java index d02452027cb..55b5641efb3 100644 --- a/src/java.base/share/classes/java/lang/invoke/ConstantGroup.java +++ b/src/java.base/share/classes/java/lang/invoke/ConstantGroup.java @@ -94,7 +94,7 @@ import java.util.function.IntFunction; */ // public interface ConstantGroup { - /// Access + //--- Access /** * Returns the number of constants in this group. @@ -148,7 +148,7 @@ interface ConstantGroup { */ boolean isPresent(int index); - /// Views + //--- Views /** * Create a view on this group as a {@link List} view. @@ -182,7 +182,7 @@ interface ConstantGroup { return new AbstractConstantGroup.SubGroup(this, start, end); } - /// Bulk operations + //--- Bulk operations /** * Copy a sequence of constant values into a given buffer. diff --git a/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java b/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java index 2d78d412197..ac9765ddc3b 100644 --- a/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java +++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java @@ -46,20 +46,20 @@ class MethodHandleNatives { private MethodHandleNatives() { } // static only - /// MemberName support + //--- MemberName support static native void init(MemberName self, Object ref); static native void expand(MemberName self); static native MemberName resolve(MemberName self, Class caller, int lookupMode, 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 staticFieldOffset(MemberName self); // e.g., returns vmindex static native Object staticFieldBase(MemberName self); // e.g., returns clazz 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. */ static native void setCallSiteTargetNormal(CallSite site, MethodHandle target); diff --git a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java index 530df86bdd6..e4a0f03e6e7 100644 --- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java +++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java @@ -93,7 +93,7 @@ public class MethodHandles { // See IMPL_LOOKUP below. - //// Method handle creation from ordinary methods. + //--- Method handle creation from ordinary methods. /** * Returns a {@link Lookup lookup object} with @@ -3745,7 +3745,7 @@ return mh1; 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 { 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 @@ -4822,7 +4822,7 @@ return invoker; 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 diff --git a/src/java.base/share/classes/java/lang/invoke/MethodType.java b/src/java.base/share/classes/java/lang/invoke/MethodType.java index d833e9d17c0..29a338261e9 100644 --- a/src/java.base/share/classes/java/lang/invoke/MethodType.java +++ b/src/java.base/share/classes/java/lang/invoke/MethodType.java @@ -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 * 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}. diff --git a/src/java.base/share/classes/java/util/GregorianCalendar.java b/src/java.base/share/classes/java/util/GregorianCalendar.java index 274f6c352f9..d7332042aaa 100644 --- a/src/java.base/share/classes/java/util/GregorianCalendar.java +++ b/src/java.base/share/classes/java/util/GregorianCalendar.java @@ -354,9 +354,9 @@ public class GregorianCalendar extends Calendar { * accurate. */ -////////////////// +//---------------- // Class Variables -////////////////// +//---------------- /** * Value of the {@code ERA} field indicating @@ -513,9 +513,9 @@ public class GregorianCalendar extends Calendar { // The default value of gregorianCutover. static final long DEFAULT_GREGORIAN_CUTOVER = -12219292800000L; -///////////////////// +//------------------- // Instance Variables -///////////////////// +//------------------- /** * 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; -/////////////// +//------------- // Constructors -/////////////// +//------------- /** * Constructs a default {@code GregorianCalendar} using the current time @@ -748,9 +748,9 @@ public class GregorianCalendar extends Calendar { gdate = gcal.newCalendarDate(getZone()); } -///////////////// +//--------------- // Public methods -///////////////// +//--------------- /** * 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); } -///////////////////////////// +//--------------------------- // Time => Fields computation -///////////////////////////// +//--------------------------- /** * The fixed date corresponding to gdate. If the value is diff --git a/src/java.base/share/classes/java/util/regex/CharPredicates.java b/src/java.base/share/classes/java/util/regex/CharPredicates.java index 99943fc34e6..7e7a1b62519 100644 --- a/src/java.base/share/classes/java/util/regex/CharPredicates.java +++ b/src/java.base/share/classes/java/util/regex/CharPredicates.java @@ -166,7 +166,7 @@ class CharPredicates { JOIN_CONTROL()); } - ///////////////////////////////////////////////////////////////////////////// + //--------------------------------------------------------------------------- private static CharPredicate getPosixPredicate(String name, boolean caseIns) { return switch (name) { @@ -234,7 +234,7 @@ class CharPredicates { return getPosixPredicate(propName.toUpperCase(Locale.ENGLISH), caseIns); } - ///////////////////////////////////////////////////////////////////////////// + //--------------------------------------------------------------------------- /** * 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); } - ///////////////////////////////////////////////////////////////////////////// + //--------------------------------------------------------------------------- /** * Posix ASCII variants, not in the lookup map @@ -426,7 +426,7 @@ class CharPredicates { return ch -> ch < 128 && ASCII.isSpace(ch); } - ///////////////////////////////////////////////////////////////////////////// + //--------------------------------------------------------------------------- /** * Emoji related binary properties diff --git a/src/java.base/share/classes/jdk/internal/icu/impl/StringPrepDataReader.java b/src/java.base/share/classes/jdk/internal/icu/impl/StringPrepDataReader.java index ae6a5b6350c..e21799c8cc7 100644 --- a/src/java.base/share/classes/jdk/internal/icu/impl/StringPrepDataReader.java +++ b/src/java.base/share/classes/jdk/internal/icu/impl/StringPrepDataReader.java @@ -119,7 +119,7 @@ public final class StringPrepDataReader implements ICUBinary.Authenticate { * No guarantees are made if a older version is used * 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, (byte)0x52, (byte)0x50}; private static final byte DATA_FORMAT_VERSION[] = {(byte)0x3, (byte)0x2, diff --git a/src/java.base/share/classes/jdk/internal/icu/lang/UCharacterDirection.java b/src/java.base/share/classes/jdk/internal/icu/lang/UCharacterDirection.java index 22b878155bb..ef995893ddc 100644 --- a/src/java.base/share/classes/jdk/internal/icu/lang/UCharacterDirection.java +++ b/src/java.base/share/classes/jdk/internal/icu/lang/UCharacterDirection.java @@ -51,14 +51,14 @@ package jdk.internal.icu.lang; public final class UCharacterDirection implements UCharacterEnums.ECharacterDirection { // private constructor ========================================= - ///CLOVER:OFF + // CLOVER:OFF /** * Private constructor to prevent initialization */ private UCharacterDirection() { } - ///CLOVER:ON + // CLOVER:ON /** * Gets the name of the argument direction diff --git a/src/java.base/share/classes/jdk/internal/misc/Unsafe.java b/src/java.base/share/classes/jdk/internal/misc/Unsafe.java index 9c81c053e57..ec6b7591282 100644 --- a/src/java.base/share/classes/jdk/internal/misc/Unsafe.java +++ b/src/java.base/share/classes/jdk/internal/misc/Unsafe.java @@ -92,8 +92,8 @@ public final class Unsafe { return theUnsafe; } - /// peek and poke operations - /// (compilers should optimize these to memory ops) + //--- peek and poke operations + // (compilers should optimize these to memory ops) // These work on object fields in the Java heap. // 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 @@ -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. @@ -1032,7 +1032,7 @@ public final class Unsafe { @IntrinsicCandidate private native void writebackPostSync0(); - /// random queries + //--- random queries /** * 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; } - /// random trusted operations from JNI: + //--- random trusted operations from JNI: /** * Tells the VM to define a class, without security checks. By default, the diff --git a/src/java.base/share/classes/jdk/internal/org/xml/sax/Attributes.java b/src/java.base/share/classes/jdk/internal/org/xml/sax/Attributes.java index ecd727f007b..5ac97818097 100644 --- a/src/java.base/share/classes/jdk/internal/org/xml/sax/Attributes.java +++ b/src/java.base/share/classes/jdk/internal/org/xml/sax/Attributes.java @@ -94,9 +94,9 @@ public interface Attributes { - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ // Indexed access. - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ /** @@ -191,9 +191,9 @@ public interface Attributes - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ // Name-based query. - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ /** diff --git a/src/java.base/share/classes/jdk/internal/org/xml/sax/InputSource.java b/src/java.base/share/classes/jdk/internal/org/xml/sax/InputSource.java index d5441e1dc2a..89b664705a2 100644 --- a/src/java.base/share/classes/jdk/internal/org/xml/sax/InputSource.java +++ b/src/java.base/share/classes/jdk/internal/org/xml/sax/InputSource.java @@ -348,9 +348,9 @@ public class InputSource { - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ // Internal state. - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ private String publicId; private String systemId; diff --git a/src/java.base/share/classes/jdk/internal/org/xml/sax/SAXException.java b/src/java.base/share/classes/jdk/internal/org/xml/sax/SAXException.java index 8a1a8e15f14..ef98d4d56cb 100644 --- a/src/java.base/share/classes/jdk/internal/org/xml/sax/SAXException.java +++ b/src/java.base/share/classes/jdk/internal/org/xml/sax/SAXException.java @@ -174,9 +174,9 @@ public class SAXException extends Exception { - ////////////////////////////////////////////////////////////////////// + //-------------------------------------------------------------------- // Internal state. - ////////////////////////////////////////////////////////////////////// + //-------------------------------------------------------------------- @java.io.Serial private static final ObjectStreamField[] serialPersistentFields = { diff --git a/src/java.base/share/classes/jdk/internal/org/xml/sax/SAXParseException.java b/src/java.base/share/classes/jdk/internal/org/xml/sax/SAXParseException.java index c8ecfd55c1d..ffa049189ae 100644 --- a/src/java.base/share/classes/jdk/internal/org/xml/sax/SAXParseException.java +++ b/src/java.base/share/classes/jdk/internal/org/xml/sax/SAXParseException.java @@ -62,9 +62,9 @@ package jdk.internal.org.xml.sax; public class SAXParseException extends SAXException { - ////////////////////////////////////////////////////////////////////// + //-------------------------------------------------------------------- // Constructors. - ////////////////////////////////////////////////////////////////////// + //-------------------------------------------------------------------- /** @@ -274,9 +274,9 @@ public class SAXParseException extends SAXException { return buf.toString(); } - ////////////////////////////////////////////////////////////////////// + //-------------------------------------------------------------------- // Internal state. - ////////////////////////////////////////////////////////////////////// + //-------------------------------------------------------------------- /** diff --git a/src/java.base/share/classes/jdk/internal/org/xml/sax/XMLReader.java b/src/java.base/share/classes/jdk/internal/org/xml/sax/XMLReader.java index edb986f2cab..c0a93b71d18 100644 --- a/src/java.base/share/classes/jdk/internal/org/xml/sax/XMLReader.java +++ b/src/java.base/share/classes/jdk/internal/org/xml/sax/XMLReader.java @@ -85,9 +85,9 @@ public interface XMLReader { - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ // Configuration. - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ /** @@ -236,9 +236,9 @@ public interface XMLReader - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ // Event handlers. - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ /** @@ -350,9 +350,9 @@ public interface XMLReader - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ // Parsing. - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ /** * Parse an XML document. diff --git a/src/java.base/share/classes/jdk/internal/org/xml/sax/helpers/DefaultHandler.java b/src/java.base/share/classes/jdk/internal/org/xml/sax/helpers/DefaultHandler.java index c4e02ec032c..93902adfd2b 100644 --- a/src/java.base/share/classes/jdk/internal/org/xml/sax/helpers/DefaultHandler.java +++ b/src/java.base/share/classes/jdk/internal/org/xml/sax/helpers/DefaultHandler.java @@ -85,9 +85,9 @@ public class DefaultHandler { - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ // Default implementation of the EntityResolver interface. - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ /** * Resolve an external entity. @@ -118,9 +118,9 @@ public class DefaultHandler - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ // Default implementation of DTDHandler interface. - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ /** @@ -170,9 +170,9 @@ public class DefaultHandler - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ // Default implementation of ContentHandler interface. - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ /** @@ -416,9 +416,9 @@ public class DefaultHandler - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ // Default implementation of the ErrorHandler interface. - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ /** diff --git a/src/java.base/share/classes/jdk/internal/reflect/ClassFileAssembler.java b/src/java.base/share/classes/jdk/internal/reflect/ClassFileAssembler.java index 312616d79ed..31ddb675667 100644 --- a/src/java.base/share/classes/jdk/internal/reflect/ClassFileAssembler.java +++ b/src/java.base/share/classes/jdk/internal/reflect/ClassFileAssembler.java @@ -201,9 +201,9 @@ class ClassFileAssembler implements ClassFileConstants { } } - /////////////// + //-----------// // Constants // - /////////////// + //-----------// public void opc_aconst_null() { emitByte(opc_aconst_null); @@ -222,9 +222,9 @@ class ClassFileAssembler implements ClassFileConstants { incStack(); } - ///////////////////////////////////// + //---------------------------------// // Local variable loads and stores // - ///////////////////////////////////// + //---------------------------------// public void opc_iload_0() { emitByte(opc_iload_0); @@ -383,9 +383,9 @@ class ClassFileAssembler implements ClassFileConstants { decStack(); } - //////////////////////// + //--------------------// // Stack manipulation // - //////////////////////// + //--------------------// public void opc_pop() { emitByte(opc_pop); @@ -406,9 +406,9 @@ class ClassFileAssembler implements ClassFileConstants { emitByte(opc_swap); } - /////////////////////////////// + //---------------------------// // Widening conversions only // - /////////////////////////////// + //---------------------------// public void opc_i2l() { emitByte(opc_i2l); @@ -434,9 +434,9 @@ class ClassFileAssembler implements ClassFileConstants { emitByte(opc_f2d); } - ////////////////// + //--------------// // Control flow // - ////////////////// + //--------------// public void opc_ifeq(short bciOffset) { emitByte(opc_ifeq); @@ -514,9 +514,9 @@ class ClassFileAssembler implements ClassFileConstants { decStack(); } - ///////////////////////// + //---------------------// // Return instructions // - ///////////////////////// + //---------------------// public void opc_ireturn() { emitByte(opc_ireturn); @@ -548,9 +548,9 @@ class ClassFileAssembler implements ClassFileConstants { setStack(0); } - ////////////////////// + //------------------// // Field operations // - ////////////////////// + //------------------// public void opc_getstatic(short fieldIndex, int fieldSizeInStackSlots) { emitByte(opc_getstatic); @@ -576,9 +576,9 @@ class ClassFileAssembler implements ClassFileConstants { setStack(getStack() - fieldSizeInStackSlots - 1); } - //////////////////////// + //--------------------// // Method invocations // - //////////////////////// + //--------------------// /** Long and double arguments and return types count as 2 arguments; other values count as 1. */ @@ -627,17 +627,17 @@ class ClassFileAssembler implements ClassFileConstants { setStack(getStack() - numArgs - 1 + numReturnValues); } - ////////////////// + //--------------// // Array length // - ////////////////// + //--------------// public void opc_arraylength() { emitByte(opc_arraylength); } - ///////// + //-----// // New // - ///////// + //-----// public void opc_new(short classIndex) { emitByte(opc_new); @@ -645,18 +645,18 @@ class ClassFileAssembler implements ClassFileConstants { incStack(); } - //////////// + //--------// // Athrow // - //////////// + //--------// public void opc_athrow() { emitByte(opc_athrow); setStack(1); } - ////////////////////////////// + //--------------------------// // Checkcast and instanceof // - ////////////////////////////// + //--------------------------// /** Assumes the checkcast succeeds */ public void opc_checkcast(short classIndex) { diff --git a/src/java.base/share/classes/jdk/internal/util/xml/PropertiesDefaultHandler.java b/src/java.base/share/classes/jdk/internal/util/xml/PropertiesDefaultHandler.java index 26359427592..2b2b5e66a99 100644 --- a/src/java.base/share/classes/jdk/internal/util/xml/PropertiesDefaultHandler.java +++ b/src/java.base/share/classes/jdk/internal/util/xml/PropertiesDefaultHandler.java @@ -136,14 +136,14 @@ public class PropertiesDefaultHandler extends DefaultHandler { } } - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ // Validate while parsing - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ static final String ALLOWED_ELEMENTS = "comment, entry"; static final String ALLOWED_COMMENT = "comment"; - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ // Handler methods - //////////////////////////////////////////////////////////////////// + //------------------------------------------------------------------ StringBuilder buf = new StringBuilder(); boolean sawRoot = false; // whether a valid root element exists boolean sawComment = false; diff --git a/src/java.base/share/classes/sun/invoke/util/ValueConversions.java b/src/java.base/share/classes/sun/invoke/util/ValueConversions.java index 025251ca1c8..9f39db5c68d 100644 --- a/src/java.base/share/classes/sun/invoke/util/ValueConversions.java +++ b/src/java.base/share/classes/sun/invoke/util/ValueConversions.java @@ -65,7 +65,7 @@ public class ValueConversions { return caches; } - /// Converting references to values. + //--- Converting references to values. // There are several levels of this unboxing conversions: // no conversions: exactly Integer.valueOf, etc. @@ -222,7 +222,7 @@ public class ValueConversions { private static final Integer ZERO_INT = 0, ONE_INT = 1; - /// Primitive conversions + //--- Primitive conversions /** * Produce a Number which represents the given value {@code x} * according to the primitive type of the given wrapper {@code wrap}. @@ -274,7 +274,7 @@ public class ValueConversions { return (int) x; } - /// Converting primitives to references + //--- Converting primitives to references static Integer boxInteger(int x) { return x; @@ -336,7 +336,7 @@ public class ValueConversions { throw new IllegalArgumentException("cannot find box adapter for " + wrap); } - /// Constant functions + //--- Constant functions static void ignore(Object x) { // 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. // 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. diff --git a/src/java.base/share/classes/sun/invoke/util/Wrapper.java b/src/java.base/share/classes/sun/invoke/util/Wrapper.java index fef9192932d..5f2e9ba2841 100644 --- a/src/java.base/share/classes/sun/invoke/util/Wrapper.java +++ b/src/java.base/share/classes/sun/invoke/util/Wrapper.java @@ -128,7 +128,7 @@ public enum Wrapper { 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. */ public int bitWidth() { return (format >> Format.SIZE_SHIFT) & Format.SIZE_MASK; } diff --git a/src/java.base/share/classes/sun/util/BuddhistCalendar.java b/src/java.base/share/classes/sun/util/BuddhistCalendar.java index d8ea06f72c5..37b722d1c74 100644 --- a/src/java.base/share/classes/sun/util/BuddhistCalendar.java +++ b/src/java.base/share/classes/sun/util/BuddhistCalendar.java @@ -35,18 +35,18 @@ import sun.util.locale.provider.CalendarDataUtility; public class BuddhistCalendar extends GregorianCalendar { -////////////////// +//---------------- // Class Variables -////////////////// +//---------------- @java.io.Serial private static final long serialVersionUID = -8527488697350388578L; private static final int BUDDHIST_YEAR_OFFSET = 543; -/////////////// +//------------- // Constructors -/////////////// +//------------- /** * Constructs a default BuddhistCalendar using the current time @@ -84,9 +84,9 @@ public class BuddhistCalendar extends GregorianCalendar { super(zone, aLocale); } -///////////////// +//--------------- // Public methods -///////////////// +//--------------- /** * Returns {@code "buddhist"} as the calendar type of this Calendar. diff --git a/src/java.base/share/classes/sun/util/calendar/CalendarSystem.java b/src/java.base/share/classes/sun/util/calendar/CalendarSystem.java index 963cefee873..1ed1df27274 100644 --- a/src/java.base/share/classes/sun/util/calendar/CalendarSystem.java +++ b/src/java.base/share/classes/sun/util/calendar/CalendarSystem.java @@ -67,7 +67,7 @@ import java.util.concurrent.ConcurrentMap; public abstract sealed class CalendarSystem permits AbstractCalendar { - /////////////////////// Calendar Factory Methods ///////////////////////// + //--------------------- Calendar Factory Methods ------------------------- private static volatile boolean initialized; @@ -173,7 +173,7 @@ public abstract sealed class CalendarSystem permits AbstractCalendar { return (cs == null) ? cal : cs; } - //////////////////////////////// Calendar API ////////////////////////////////// + //------------------------------ Calendar API ---------------------------------- /** * Returns the name of this calendar system. diff --git a/src/jdk.unsupported/share/classes/sun/misc/Unsafe.java b/src/jdk.unsupported/share/classes/sun/misc/Unsafe.java index e1a936117d4..2c9f02efae0 100644 --- a/src/jdk.unsupported/share/classes/sun/misc/Unsafe.java +++ b/src/jdk.unsupported/share/classes/sun/misc/Unsafe.java @@ -115,8 +115,8 @@ public final class Unsafe { return theUnsafe; } - /// peek and poke operations - /// (compilers should optimize these to memory ops) + //| peek and poke operations + //| (compilers should optimize these to memory ops) // These work on object fields in the Java heap. // 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 @@ -858,7 +858,7 @@ public final class Unsafe { theInternalUnsafe.freeMemory(address); } - /// random queries + //| random queries /** * 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.