mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-12 03:18:37 +00:00
8054857: Fix typos in java.lang.** packages
Reviewed-by: alanb
This commit is contained in:
parent
cee705c197
commit
7075a99ae9
@ -1322,7 +1322,7 @@ public final class Class<T> implements java.io.Serializable,
|
||||
// (for anonymous classes): 1 or more digits.
|
||||
|
||||
// Since getSimpleBinaryName() will strip the binary name of
|
||||
// the immediatly enclosing class, we are now looking at a
|
||||
// the immediately enclosing class, we are now looking at a
|
||||
// string that matches the regular expression "\$[0-9]*"
|
||||
// followed by a simple name (considering the simple of an
|
||||
// anonymous class to be the empty string).
|
||||
|
||||
@ -205,7 +205,7 @@ public abstract class ClassLoader {
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the given class loader type as parallel capabale.
|
||||
* Registers the given class loader type as parallel capable.
|
||||
* Returns {@code true} is successfully registered; {@code false} if
|
||||
* loader's super class is not registered.
|
||||
*/
|
||||
@ -832,7 +832,7 @@ public abstract class ClassLoader {
|
||||
{
|
||||
int len = b.remaining();
|
||||
|
||||
// Use byte[] if not a direct ByteBufer:
|
||||
// Use byte[] if not a direct ByteBuffer:
|
||||
if (!b.isDirect()) {
|
||||
if (b.hasArray()) {
|
||||
return defineClass(name, b.array(),
|
||||
|
||||
@ -196,19 +196,19 @@ class StringCoding {
|
||||
static char[] decode(Charset cs, byte[] ba, int off, int len) {
|
||||
// (1)We never cache the "external" cs, the only benefit of creating
|
||||
// an additional StringDe/Encoder object to wrap it is to share the
|
||||
// de/encode() method. These SD/E objects are short-lifed, the young-gen
|
||||
// gc should be able to take care of them well. But the best approash
|
||||
// de/encode() method. These SD/E objects are short-lived, the young-gen
|
||||
// gc should be able to take care of them well. But the best approach
|
||||
// is still not to generate them if not really necessary.
|
||||
// (2)The defensive copy of the input byte/char[] has a big performance
|
||||
// impact, as well as the outgoing result byte/char[]. Need to do the
|
||||
// optimization check of (sm==null && classLoader0==null) for both.
|
||||
// (3)getClass().getClassLoader0() is expensive
|
||||
// (4)There might be a timing gap in isTrusted setting. getClassLoader0()
|
||||
// is only chcked (and then isTrusted gets set) when (SM==null). It is
|
||||
// is only checked (and then isTrusted gets set) when (SM==null). It is
|
||||
// possible that the SM==null for now but then SM is NOT null later
|
||||
// when safeTrim() is invoked...the "safe" way to do is to redundant
|
||||
// check (... && (isTrusted || SM == null || getClassLoader0())) in trim
|
||||
// but it then can be argued that the SM is null when the opertaion
|
||||
// but it then can be argued that the SM is null when the operation
|
||||
// is started...
|
||||
CharsetDecoder cd = cs.newDecoder();
|
||||
int en = scale(len, cd.maxCharsPerByte());
|
||||
|
||||
@ -1193,7 +1193,7 @@ public final class System {
|
||||
// Setup Java signal handlers for HUP, TERM, and INT (where available).
|
||||
Terminator.setup();
|
||||
|
||||
// Initialize any miscellenous operating system settings that need to be
|
||||
// Initialize any miscellaneous operating system settings that need to be
|
||||
// set for the class libraries. Currently this is no-op everywhere except
|
||||
// for Windows where the process-wide error mode is set before the java.io
|
||||
// classes are used.
|
||||
|
||||
@ -139,7 +139,7 @@ public class Throwable implements Serializable {
|
||||
* {@linkplain #setStackTrace(StackTraceElement[]) Setting the
|
||||
* stack trace} to a one-element array containing this sentinel
|
||||
* value indicates future attempts to set the stack trace will be
|
||||
* ignored. The sentinal is equal to the result of calling:<br>
|
||||
* ignored. The sentinel is equal to the result of calling:<br>
|
||||
* {@code new StackTraceElement("", "", null, Integer.MIN_VALUE)}
|
||||
*/
|
||||
public static final StackTraceElement STACK_TRACE_ELEMENT_SENTINEL =
|
||||
|
||||
@ -98,7 +98,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||
private final String implMethodClassName; // Name of type containing implementation "CC"
|
||||
private final String implMethodName; // Name of implementation method "impl"
|
||||
private final String implMethodDesc; // Type descriptor for implementation methods "(I)Ljava/lang/String;"
|
||||
private final Class<?> implMethodReturnClass; // class for implementaion method return type "Ljava/lang/String;"
|
||||
private final Class<?> implMethodReturnClass; // class for implementation method return type "Ljava/lang/String;"
|
||||
private final MethodType constructorType; // Generated class constructor type "(CC)void"
|
||||
private final ClassWriter cw; // ASM class writer
|
||||
private final String[] argNames; // Generated names for the constructor arguments
|
||||
|
||||
@ -209,7 +209,7 @@ class InvokerBytecodeGenerator {
|
||||
throw new InternalError("observed CP placeholder twice: " + cpPlaceholder);
|
||||
}
|
||||
// insert placeholder in CP and remember the patch
|
||||
int index = cw.newConst((Object) cpPlaceholder); // TODO check if aready in the constant pool
|
||||
int index = cw.newConst((Object) cpPlaceholder); // TODO check if already in the constant pool
|
||||
cpPatches.put(cpPlaceholder, new CpPatch(index, cpPlaceholder, arg));
|
||||
return cpPlaceholder;
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ import static java.lang.invoke.LambdaForm.*;
|
||||
* @author jrose
|
||||
*/
|
||||
class Invokers {
|
||||
// exact type (sans leading taget MH) for the outgoing call
|
||||
// exact type (sans leading target MH) for the outgoing call
|
||||
private final MethodType targetType;
|
||||
|
||||
// FIXME: Get rid of the invokers that are not useful.
|
||||
|
||||
@ -59,7 +59,7 @@ import java.util.Objects;
|
||||
* and properly use the named member.
|
||||
* <p>
|
||||
* When resolved, a member name's internal implementation may include references to JVM metadata.
|
||||
* This representation is stateless and only decriptive.
|
||||
* This representation is stateless and only descriptive.
|
||||
* It provides no private information and no capability to use the member.
|
||||
* <p>
|
||||
* By contrast, a {@linkplain java.lang.reflect.Method} contains fuller information
|
||||
|
||||
@ -679,7 +679,7 @@ public abstract class MethodHandle {
|
||||
* This method provides the crucial behavioral difference between
|
||||
* {@link #invokeExact invokeExact} and plain, inexact {@link #invoke invoke}.
|
||||
* The two methods
|
||||
* perform the same steps when the caller's type descriptor exactly m atches
|
||||
* perform the same steps when the caller's type descriptor exactly matches
|
||||
* the callee's, but when the types differ, plain {@link #invoke invoke}
|
||||
* also calls {@code asType} (or some internal equivalent) in order
|
||||
* to match up the caller's and callee's types.
|
||||
|
||||
@ -621,7 +621,7 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
|
||||
}
|
||||
|
||||
/**
|
||||
* The LambaForm shape for catchException combinator is the following:
|
||||
* The LambdaForm shape for catchException combinator is the following:
|
||||
* <blockquote><pre>{@code
|
||||
* guardWithCatch=Lambda(a0:L,a1:L,a2:L)=>{
|
||||
* t3:L=BoundMethodHandle$Species_LLLLL.argL0(a0:L);
|
||||
@ -702,7 +702,7 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
|
||||
MethodType type = target.type();
|
||||
LambdaForm form = makeGuardWithCatchForm(type.basicType());
|
||||
|
||||
// Prepare auxiliary method handles used during LambdaForm interpreation.
|
||||
// Prepare auxiliary method handles used during LambdaForm interpretation.
|
||||
// Box arguments and wrap them into Object[]: ValueConversions.array().
|
||||
MethodType varargsType = type.changeReturnType(Object[].class);
|
||||
MethodHandle collectArgs = ValueConversions.varargsArray(type.parameterCount())
|
||||
|
||||
@ -509,7 +509,7 @@ class MethodHandleNatives {
|
||||
|
||||
/**
|
||||
* Is this method a caller-sensitive method?
|
||||
* I.e., does it call Reflection.getCallerClass or a similer method
|
||||
* I.e., does it call Reflection.getCallerClass or a similar method
|
||||
* to ask about the identity of its caller?
|
||||
*/
|
||||
static boolean isCallerSensitive(MemberName mem) {
|
||||
|
||||
@ -78,7 +78,7 @@ public class AccessibleObject implements AnnotatedElement {
|
||||
* object is a {@link Constructor} object for the class {@link
|
||||
* java.lang.Class}). In the event of such a SecurityException, the
|
||||
* accessibility of objects is set to {@code flag} for array elements
|
||||
* upto (and excluding) the element for which the exception occurred; the
|
||||
* up to (and excluding) the element for which the exception occurred; the
|
||||
* accessibility of elements beyond (and including) the element for which
|
||||
* the exception occurred is unchanged.
|
||||
*
|
||||
|
||||
@ -173,7 +173,7 @@ public final class Parameter implements AnnotatedElement {
|
||||
* a name.
|
||||
*/
|
||||
public String getName() {
|
||||
// Note: empty strings as paramete names are now outlawed.
|
||||
// Note: empty strings as parameter names are now outlawed.
|
||||
// The .equals("") is for compatibility with current JVM
|
||||
// behavior. It may be removed at some point.
|
||||
if(name == null || name.equals(""))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user