Skip to content

Commit

Permalink
8311122: Fix typos in java.base
Browse files Browse the repository at this point in the history
Reviewed-by: darcy, naoto, mchung, iris, mli, mullan
  • Loading branch information
pavelrappo committed Jul 4, 2023
1 parent 607ddaa commit 7b3c2dc
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 23 deletions.
10 changes: 5 additions & 5 deletions src/java.base/share/classes/java/lang/FdLibm.java
Original file line number Diff line number Diff line change
Expand Up @@ -1696,7 +1696,7 @@ else if (ix0 < 0)
* This formula has one division fewer than the one above; however,
* it requires more multiplications and additions. Also x must be
* scaled in advance to avoid spurious overflow in evaluating the
* expression 3y*y+x. Hence it is not recommended uless division
* expression 3y*y+x. Hence it is not recommended unless division
* is slow. If division is very slow, then one should use the
* reciproot algorithm given in section B.
*
Expand Down Expand Up @@ -3156,7 +3156,7 @@ static double compute(double x) {
return h*StrictMath.exp(Math.abs(x));
}

// |x| in [log(maxdouble), overflowthresold]
// |x| in [log(maxdouble), overflowthreshold]
lx = __LO(x);
if (ix < 0x4086_33CE ||
((ix == 0x4086_33ce) &&
Expand All @@ -3166,7 +3166,7 @@ static double compute(double x) {
return t * w;
}

// |x| > overflowthresold, sinh(x) overflow
// |x| > overflowthreshold, sinh(x) overflow
return x * shuge;
}
}
Expand Down Expand Up @@ -3231,7 +3231,7 @@ static double compute(double x) {
return 0.5*StrictMath.exp(Math.abs(x));
}

// |x| in [log(maxdouble), overflowthresold]
// |x| in [log(maxdouble), overflowthreshold]
lx = __LO(x);
if (ix<0x4086_33CE ||
((ix == 0x4086_33ce) &&
Expand All @@ -3241,7 +3241,7 @@ static double compute(double x) {
return t*w;
}

// |x| > overflowthresold, cosh(x) overflow
// |x| > overflowthreshold, cosh(x) overflow
return huge*huge;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/java.base/share/classes/java/lang/Float.java
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ public static short floatToFloat16(float f) {
}

// No bits set in significand beyond the *first* exponent bit,
// not just the sigificand; quantity is added to the exponent
// not just the significand; quantity is added to the exponent
// to implement a carry out from rounding the significand.
assert (0xf800 & signif_bits) == 0x0;

Expand Down
2 changes: 1 addition & 1 deletion src/java.base/share/classes/java/lang/ScopedValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ private void runWith(Snapshot newSnapshot, Runnable op) {

/**
* Creates a new {@code Carrier} with a single mapping of a {@code ScopedValue}
* <em>key</em> to a value. The {@code Carrier} can be used to accumlate mappings so
* <em>key</em> to a value. The {@code Carrier} can be used to accumulate mappings so
* that an operation can be executed with all scoped values in the mapping bound to
* values. The following example runs an operation with {@code k1} bound (or rebound)
* to {@code v1}, and {@code k2} bound (or rebound) to {@code v2}.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2023, 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
Expand Down Expand Up @@ -48,7 +48,7 @@
* generate classes ahead of time.
*/
class GenerateJLIClassesHelper {
// Map from DirectMethodHandle method type name to index to LambdForms
// Map from DirectMethodHandle method type name to index to LambdaForms
static final Map<String, Integer> DMH_METHOD_TYPE_MAP =
Map.of(
DIRECT_INVOKE_VIRTUAL.methodName, LF_INVVIRTUAL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ private LambdaForm(int arity, int result, boolean forceInline, MethodHandle cust
this.isCompiled = false;
}

// root factory pre/post processing and calls simple cosntructor
// root factory pre/post processing and calls simple constructor
private static LambdaForm create(int arity, Name[] names, int result, boolean forceInline, MethodHandle customized, Kind kind) {
names = names.clone();
assert(namesOK(arity, names));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ protected InjectedInvokerHolder computeValue(Class<?> hostClass) {
* Method::invoke on a caller-sensitive method will call
* MethodAccessorImpl::invoke(Object, Object[]) through reflect_invoke_V
* target.csm(args)
* NativeMethodAccesssorImpl::invoke(target, args)
* NativeMethodAccessorImpl::invoke(target, args)
* MethodAccessImpl::invoke(target, args)
* InjectedInvoker::reflect_invoke_V(vamh, target, args);
* method::invoke(target, args)
Expand Down Expand Up @@ -1683,7 +1683,7 @@ private static MethodHandle unboxResultHandle(Class<?> returnType) {
* @param tloop the return type of the loop.
* @param targs types of the arguments to be passed to the loop.
* @param init sanitized array of initializers for loop-local variables.
* @param step sanitited array of loop bodies.
* @param step sanitized array of loop bodies.
* @param pred sanitized array of predicates.
* @param fini sanitized array of loop finalizers.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3843,7 +3843,7 @@ public boolean hasFullPrivilegeAccess() {

/**
* Perform steps 1 and 2b <a href="MethodHandles.Lookup.html#secmgr">access checks</a>
* for ensureInitialzed, findClass or accessClass.
* for ensureInitialized, findClass or accessClass.
*/
void checkSecurityManager(Class<?> refc) {
if (allowedModes == TRUSTED) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ public Runtime.Version runtimeVersion() {
public static ClassFileFormatVersion fromMajor(int major) {
if (major < 45 // RELEASE_0.major()
|| major > latest().major()) {
throw new IllegalArgumentException("Out of range major class file vesion "
throw new IllegalArgumentException("Out of range major class file version "
+ major);
}
// RELEASE_0 and RELEASE_1 both have a major version of 45;
Expand Down
2 changes: 1 addition & 1 deletion src/java.base/share/classes/java/lang/reflect/Proxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ private static Class<?> findProxyInterfaceOrElseThrow(Class<?> proxyClass, Metho
// the method's declaring class is left unvisited.
continue;
}
// visit all superinteraces of one proxy interface to find if
// visit all superinterfaces of one proxy interface to find if
// this proxy interface inherits the method directly or indirectly
visited.add(c);
for (Class<?> superIntf : c.getInterfaces()) {
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/classes/java/text/DigitList.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2023, 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
Expand Down Expand Up @@ -92,7 +92,7 @@ final class DigitList implements Cloneable {
* f is a value 0.1 <= f < 1 arrived at by placing the digits in Digits to
* the right of the decimal.
*
* DigitList is normalized, so if it is non-zero, figits[0] is non-zero. We
* DigitList is normalized, so if it is non-zero, digits[0] is non-zero. We
* don't allow denormalized numbers because our exponent is effectively of
* unlimited magnitude. The count value contains the number of significant
* digits present in digits[].
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2023, 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
Expand Down Expand Up @@ -222,7 +222,7 @@ public KeyIdentifier getKeyIdentifier() {
*
* @param obj the object to be compared against
*
* @return true if the specified object is equal to this {@code Responderid}
* @return true if the specified object is equal to this {@code ResponderId}
*/
@Override
public boolean equals(Object obj) {
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/classes/sun/security/util/ByteArrays.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2023, 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
Expand All @@ -26,7 +26,7 @@
package sun.security.util;

/**
* A time-instance comparison of two byte arrays.
* A time-constant comparison of two byte arrays.
*/
public class ByteArrays {
// See the MessageDigest.isEqual(byte[] digesta, byte[] digestb)
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/classes/sun/text/CompactByteArray.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2023, 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
Expand Down Expand Up @@ -293,7 +293,7 @@ public boolean equals(Object obj) {
if (elementAt((char)i) != other.elementAt((char)i))
return false;
}
return true; // we made it through the guantlet.
return true; // we made it through the gauntlet.
}

/**
Expand Down

1 comment on commit 7b3c2dc

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.