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

@ -181,9 +181,9 @@ public abstract class ClassValue<T> {
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<T> {
addToCache(classValue, e);
}
/// --------
/// Cache management.
/// --------
//| --------
//| Cache management.
//| --------
// Statics do not need synchronization.

View file

@ -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.

View file

@ -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.

View file

@ -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);

View file

@ -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

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
* 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}.

View file

@ -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

View file

@ -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