8247115: Fix typos in java.lang.invoke and java.lang

Reviewed-by: lancea
This commit is contained in:
Pavel Rappo 2020-06-09 16:28:10 +01:00
parent 3df95aa377
commit 6e43cddad7
11 changed files with 18 additions and 18 deletions

View File

@ -2659,7 +2659,7 @@ public final class Math {
* round it away to zero. This is done by first multiplying
* by 2 ^ (scaleFactor % n) and then multiplying several
* times by 2^n as needed where n is the exponent of number
* that is a covenient power of two. In this way, at most one
* that is a convenient power of two. In this way, at most one
* real rounding error occurs. If the double value set is
* being used exclusively, the rounding will occur on a
* multiply. If the double-extended-exponent value set is

View File

@ -1046,7 +1046,7 @@ public class Runtime {
} else {
if (optional.isPresent() && !pre.isPresent()) {
throw new IllegalArgumentException("optional component"
+ " must be preceeded by a pre-release component"
+ " must be preceded by a pre-release component"
+ " or '+': '" + s + "'");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -237,7 +237,7 @@ final class StackStreamFactory {
final R walk() {
checkState(NEW);
try {
// VM will need to stablize the stack before walking. It will invoke
// VM will need to stabilize the stack before walking. It will invoke
// the AbstractStackWalker::doStackWalk method once it fetches the first batch.
// the callback will be invoked within the scope of the callStackWalk frame.
return beginStackWalk();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -351,7 +351,7 @@ abstract class ClassSpecializer<T,K,S extends ClassSpecializer<T,K,S>.SpeciesDat
* You can override this to return null or throw if there are no transforms.
* This method exists so that the transforms can be "grown" lazily.
* This is necessary if the transform *adds* a field to an instance,
* which sometimtes requires the creation, on the fly, of an extended species.
* which sometimes requires the creation, on the fly, of an extended species.
* This method is only called once for any particular parameter.
* The species caches the result in a private array.
*

View File

@ -35,7 +35,7 @@ import java.util.function.BiFunction;
/**
* An indirect var handle can be thought of as an aggregate of the method handles implementing its supported access modes.
* Its varform contains no method name table (given that some of the method handles composing a bound var handle might
* not be direct). The set of method handles constituting an inditrect var handle are retrieved lazily, to minimize
* not be direct). The set of method handles constituting an indirect var handle are retrieved lazily, to minimize
* code spinning (since not all the access modes will be used anyway).
* Indirect var handles are useful when constructing var handle adapters - that is, an adapter var handle
* can be constructed by extracting the method handles constituting the target var handle, adapting them

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -801,7 +801,7 @@ class LambdaForm {
* (a) redundant compilation work and (b) extra I$ pressure.
* To control repeated versions, we need to be ready to
* erase details from LFs and move them into MH data,
* whevener those details are not relevant to significant
* whenever those details are not relevant to significant
* optimization. "Significant" means optimization of
* code that is actually hot.
*
@ -895,7 +895,7 @@ class LambdaForm {
private static boolean argumentTypesMatch(String sig, Object[] av) {
int arity = signatureArity(sig);
assert(av.length == arity) : "av.length == arity: av.length=" + av.length + ", arity=" + arity;
assert(av[0] instanceof MethodHandle) : "av[0] not instace of MethodHandle: " + av[0];
assert(av[0] instanceof MethodHandle) : "av[0] not instance of MethodHandle: " + av[0];
MethodHandle mh = (MethodHandle) av[0];
MethodType mt = mh.type();
assert(mt.parameterCount() == arity-1);

View File

@ -1685,7 +1685,7 @@ assertEquals("[three, thee, tee]", asListFix.invoke((Object)argv).toString());
if (member != null) {
return MethodHandleImpl.makeWrappedMember(this, member, isInvokeSpecial);
} else if (internalMemberName() == null) {
// The required internaMemberName is null, and this MH (like most) doesn't have one.
// The required internalMemberName is null, and this MH (like most) doesn't have one.
return this;
} else {
// The following case is rare. Mask the internalMemberName by wrapping the MH in a BMH.

View File

@ -33,7 +33,7 @@ import static java.lang.invoke.MethodHandleStatics.*;
/**
* A symbolic reference obtained by cracking a direct method handle
* into its consitutent symbolic parts.
* into its constituent symbolic parts.
* To crack a direct method handle, call {@link Lookup#revealDirect Lookup.revealDirect}.
* <h2><a id="directmh"></a>Direct Method Handles</h2>
* A <em>direct method handle</em> represents a method, constructor, or field without

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -510,7 +510,7 @@ class MethodHandleNatives {
/**
* Obtain the method to link to the VarHandle operation.
* This method is located here and not in Invokers to avoid
* intializing that and other classes early on in VM bootup.
* initializing that and other classes early on in VM bootup.
*/
private static MemberName varHandleOperationLinkerMethod(String name,
MethodType mtype,

View File

@ -105,7 +105,7 @@ import static java.lang.invoke.MethodType.fromDescriptor;
* A {@code MethodType} can be described in {@linkplain MethodTypeDesc nominal form}
* if and only if all of the parameter types and return type can be described
* with a {@link Class#describeConstable() nominal descriptor} represented by
* {@link ClassDesc}. If a method type can be described norminally, then:
* {@link ClassDesc}. If a method type can be described nominally, then:
* <ul>
* <li>The method type has a {@link MethodTypeDesc nominal descriptor}
* returned by {@link #describeConstable() MethodType::describeConstable}.</li>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -2031,7 +2031,7 @@ public abstract class VarHandle implements Constable {
insertParameterTypes(0, VarHandle.class);
MemberName mn = vform.getMemberName(mode);
DirectMethodHandle dmh = DirectMethodHandle.make(mn);
// Such a method handle must not be publically exposed directly
// Such a method handle must not be publicly exposed directly
// otherwise it can be cracked, it must be transformed or rebound
// before exposure
MethodHandle mh = dmh.copyWith(mt, dmh.form);
@ -2191,7 +2191,7 @@ public abstract class VarHandle implements Constable {
* Returns a {@linkplain VarHandleDesc} corresponding to a {@link VarHandle}
* for an instance field.
*
* @param name the unqualifed name of the field
* @param name the unqualified name of the field
* @param declaringClass a {@link ClassDesc} describing the declaring class,
* for field var handles
* @param fieldType a {@link ClassDesc} describing the type of the field