8241727: Typos: empty lines in javadoc, inconsistent indents, etc. (core-libs only)

Reviewed-by: prappo
This commit is contained in:
Ivan Gerasimov 2020-03-28 21:07:55 -07:00
parent 7f8d785086
commit b0e1ee4b3b
70 changed files with 435 additions and 446 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 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
@ -228,7 +228,7 @@ public final class Boolean implements java.io.Serializable,
return value ? 1231 : 1237;
}
/**
/**
* Returns {@code true} if and only if the argument is not
* {@code null} and is a {@code Boolean} object that
* represents the same {@code boolean} value as this object.

View file

@ -390,7 +390,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
public static final byte DIRECTIONALITY_RIGHT_TO_LEFT = 1;
/**
* Strong bidirectional character type "AL" in the Unicode specification.
* Strong bidirectional character type "AL" in the Unicode specification.
* @since 1.4
*/
public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC = 2;
@ -3181,7 +3181,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
"MAYAN NUMERALS",
"MAYANNUMERALS");
/**
/**
* Constant for the "Indic Siyaq Numbers" Unicode
* character block.
* @since 12
@ -4773,7 +4773,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
*/
WARANG_CITI,
/**
/**
* Unicode script "Ahom".
* @since 9
*/
@ -8589,7 +8589,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
* values is a valid
* <a href="http://www.unicode.org/glossary/#surrogate_pair">
* Unicode surrogate pair</a>.
*
* <p>This method is equivalent to the expression:
* <blockquote><pre>{@code
* isHighSurrogate(high) && isLowSurrogate(low)
@ -10966,7 +10966,6 @@ class Character implements java.io.Serializable, Comparable<Character> {
* Compares two {@code Character} objects numerically.
*
* @param anotherCharacter the {@code Character} to be compared.
* @return the value {@code 0} if the argument {@code Character}
* is equal to this {@code Character}; a value less than
* {@code 0} if this {@code Character} is numerically less

View file

@ -734,7 +734,6 @@ public abstract class ClassLoader {
* The module name; or {@code null} to find the class in the
* {@linkplain #getUnnamedModule() unnamed module} for this
* class loader
* @param name
* The <a href="#binary-name">binary name</a> of the class
*

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 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
@ -694,7 +694,6 @@ public final class Float extends Number
}
/**
* Compares this object against the specified object. The result
* is {@code true} if and only if the argument is not
* {@code null} and is a {@code Float} object that

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@ -155,7 +155,7 @@ public class Package extends NamedPackage implements java.lang.reflect.Annotated
* <dl>
* <dt><i>SpecificationVersion:</i>
* <dd><i>Digits RefinedVersion<sub>opt</sub></i>
*
* <dt><i>RefinedVersion:</i>
* <dd>{@code .} <i>Digits</i>
* <dd>{@code .} <i>Digits RefinedVersion</i>

View file

@ -1217,9 +1217,9 @@ public final class ProcessBuilder
* String directory = "/home/duke/src";
* ProcessBuilder[] builders = {
* new ProcessBuilder("find", directory, "-type", "f"),
new ProcessBuilder("xargs", "grep", "-h", "^import "),
new ProcessBuilder("awk", "{print $2;}"),
new ProcessBuilder("sort", "-u")};
* new ProcessBuilder("xargs", "grep", "-h", "^import "),
* new ProcessBuilder("awk", "{print $2;}"),
* new ProcessBuilder("sort", "-u")};
* List<Process> processes = ProcessBuilder.startPipeline(
* Arrays.asList(builders));
* Process last = processes.get(processes.size()-1);

View file

@ -340,14 +340,14 @@ final class ProcessHandleImpl implements ProcessHandle {
}
/**
* Signal the process to terminate.
* The process is signaled only if its start time matches the known start time.
*
* @param pid process id to kill
* @param startTime the start time of the process
* @param forcibly true to forcibly terminate (SIGKILL vs SIGTERM)
* @return true if the process was signaled without error; false otherwise
*/
* Signal the process to terminate.
* The process is signaled only if its start time matches the known start time.
*
* @param pid process id to kill
* @param startTime the start time of the process
* @param forcibly true to forcibly terminate (SIGKILL vs SIGTERM)
* @return true if the process was signaled without error; false otherwise
*/
private static native boolean destroy0(long pid, long startTime, boolean forcibly);
@Override

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@ -291,8 +291,7 @@ import java.lang.module.ModuleFinder;
* the code would normally not be able to invoke those methods and/or
* access the fields because
* it can't cast the object to the class/interface with those methods
* and fields.
</td>
* and fields.</td>
* </tr>
* <tr>
* <th scope="row">queuePrintJob</th>

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 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
@ -1225,7 +1225,7 @@ public final class StrictMath {
* @param a an argument.
* @param b another argument.
* @return the larger of {@code a} and {@code b}.
*/
*/
public static long max(long a, long b) {
return Math.max(a, b);
}

View file

@ -462,7 +462,7 @@ public final class String
*
* @param length
* The number of bytes to decode
*
* @param charsetName
* The name of a supported {@linkplain java.nio.charset.Charset
* charset}
@ -2300,10 +2300,10 @@ public final class String
*/
public String[] split(String regex, int limit) {
/* fastpath if the regex is a
(1)one-char String and this character is not one of the
RegEx's meta characters ".$|()[{^?*+\\", or
(2)two-char String and the first char is the backslash and
the second is not the ascii digit or ascii letter.
* (1) one-char String and this character is not one of the
* RegEx's meta characters ".$|()[{^?*+\\", or
* (2) two-char String and the first char is the backslash and
* the second is not the ascii digit or ascii letter.
*/
char ch = 0;
if (((regex.length() == 1 &&

View file

@ -1618,7 +1618,7 @@ public final class System {
* the Java Runtime. See the class specification of how the
* {@link LoggerFinder LoggerFinder} implementation is located and
* loaded.
*
* @return the {@link LoggerFinder LoggerFinder} instance.
* @throws SecurityException if a security manager is present and its
* {@code checkPermission} method doesn't allow the

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 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
@ -242,7 +242,7 @@ public class Thread implements Runnable {
*/
public static final int MIN_PRIORITY = 1;
/**
/**
* The default priority that is assigned to a thread.
*/
public static final int NORM_PRIORITY = 5;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@ -101,7 +101,7 @@ public interface Annotation {
* {@link Long}, {@link Short}, or {@link Boolean}).
*
* <li>The hash code of a string, enum, class, or annotation member-value
I <i>{@code v}</i> is computed as by calling
* <i>{@code v}</i> is computed as by calling
* <code><i>v</i>.hashCode()</code>. (In the case of annotation
* member values, this is a recursive definition.)
*

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 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
@ -135,9 +135,9 @@ interface ConstantGroup {
* must always return true.
* <p>
* If this method returns {@code false}, nothing in particular
* can be inferred, since the query only concerns the internal
* can be inferred, since the query only concerns the internal
* logic of the {@code ConstantGroup} object which ensures that
a successful * query to a constant will always remain successful.
* a successful query to a constant will always remain successful.
* The only way to force a permanent decision about whether
* a constant is available is to call {@link #get(int)} and
* be ready for an exception if the constant is unavailable.

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 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
@ -1151,25 +1151,25 @@ class InvokerBytecodeGenerator {
}
/**
* Emit bytecode for the guardWithCatch idiom.
*
* The pattern looks like (Cf. MethodHandleImpl.makeGuardWithCatch):
* <blockquote><pre>{@code
* guardWithCatch=Lambda(a0:L,a1:L,a2:L,a3:L,a4:L,a5:L,a6:L,a7:L)=>{
* t8:L=MethodHandle.invokeBasic(a4:L,a6:L,a7:L);
* t9:L=MethodHandleImpl.guardWithCatch(a1:L,a2:L,a3:L,t8:L);
* t10:I=MethodHandle.invokeBasic(a5:L,t9:L);t10:I}
* }</pre></blockquote>
*
* It is compiled into bytecode equivalent of the following code:
* <blockquote><pre>{@code
* try {
* return a1.invokeBasic(a6, a7);
* } catch (Throwable e) {
* if (!a2.isInstance(e)) throw e;
* return a3.invokeBasic(ex, a6, a7);
* }}</pre></blockquote>
*/
* Emit bytecode for the guardWithCatch idiom.
*
* The pattern looks like (Cf. MethodHandleImpl.makeGuardWithCatch):
* <blockquote><pre>{@code
* guardWithCatch=Lambda(a0:L,a1:L,a2:L,a3:L,a4:L,a5:L,a6:L,a7:L)=>{
* t8:L=MethodHandle.invokeBasic(a4:L,a6:L,a7:L);
* t9:L=MethodHandleImpl.guardWithCatch(a1:L,a2:L,a3:L,t8:L);
* t10:I=MethodHandle.invokeBasic(a5:L,t9:L);t10:I}
* }</pre></blockquote>
*
* It is compiled into bytecode equivalent of the following code:
* <blockquote><pre>{@code
* try {
* return a1.invokeBasic(a6, a7);
* } catch (Throwable e) {
* if (!a2.isInstance(e)) throw e;
* return a3.invokeBasic(ex, a6, a7);
* }}</pre></blockquote>
*/
private Name emitGuardWithCatch(int pos) {
Name args = lambdaForm.names[pos];
Name invoker = lambdaForm.names[pos+1];

View file

@ -1073,36 +1073,37 @@ assertEquals("[A, B, C]", (String) caToString2.invokeExact('A', "BC".toCharArray
throw newIllegalArgumentException("array length is not legal for long[] or double[]", arrayLength);
}
}
/**
* Adapts this method handle to be {@linkplain #asVarargsCollector variable arity}
* if the boolean flag is true, else {@linkplain #asFixedArity fixed arity}.
* If the method handle is already of the proper arity mode, it is returned
* unchanged.
* @apiNote
* <p>This method is sometimes useful when adapting a method handle that
* may be variable arity, to ensure that the resulting adapter is also
* variable arity if and only if the original handle was. For example,
* this code changes the first argument of a handle {@code mh} to {@code int} without
* disturbing its variable arity property:
* {@code mh.asType(mh.type().changeParameterType(0,int.class))
* .withVarargs(mh.isVarargsCollector())}
* <p>
* This call is approximately equivalent to the following code:
* <blockquote><pre>{@code
* if (makeVarargs == isVarargsCollector())
* return this;
* else if (makeVarargs)
* return asVarargsCollector(type().lastParameterType());
* else
* return asFixedArity();
* }</pre></blockquote>
* @param makeVarargs true if the return method handle should have variable arity behavior
* @return a method handle of the same type, with possibly adjusted variable arity behavior
* @throws IllegalArgumentException if {@code makeVarargs} is true and
* this method handle does not have a trailing array parameter
* @since 9
* @see #asVarargsCollector
* @see #asFixedArity
* Adapts this method handle to be {@linkplain #asVarargsCollector variable arity}
* if the boolean flag is true, else {@linkplain #asFixedArity fixed arity}.
* If the method handle is already of the proper arity mode, it is returned
* unchanged.
* @apiNote
* <p>This method is sometimes useful when adapting a method handle that
* may be variable arity, to ensure that the resulting adapter is also
* variable arity if and only if the original handle was. For example,
* this code changes the first argument of a handle {@code mh} to {@code int} without
* disturbing its variable arity property:
* {@code mh.asType(mh.type().changeParameterType(0,int.class))
* .withVarargs(mh.isVarargsCollector())}
* <p>
* This call is approximately equivalent to the following code:
* <blockquote><pre>{@code
* if (makeVarargs == isVarargsCollector())
* return this;
* else if (makeVarargs)
* return asVarargsCollector(type().lastParameterType());
* else
* return asFixedArity();
* }</pre></blockquote>
* @param makeVarargs true if the return method handle should have variable arity behavior
* @return a method handle of the same type, with possibly adjusted variable arity behavior
* @throws IllegalArgumentException if {@code makeVarargs} is true and
* this method handle does not have a trailing array parameter
* @since 9
* @see #asVarargsCollector
* @see #asFixedArity
*/
public MethodHandle withVarargs(boolean makeVarargs) {
assert(!isVarargsCollector()); // subclass responsibility

View file

@ -461,7 +461,7 @@ class MethodType
return insertParameterTypes(parameterCount(), ptypesToInsert);
}
/**
/**
* Finds or creates a method type with modified parameter types.
* Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
* @param start the position (zero-based) of the first replaced parameter type(s)

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
@ -162,7 +162,6 @@
* call site or constant, the JVM must choose one bootstrap method result and install it visibly to
* all threads. Any other bootstrap method calls are allowed to complete, but their
* results are ignored.
* <p style="font-size:smaller;">
* <em>Discussion:</em>
* These rules do not enable the JVM to share call sites,

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 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
@ -66,7 +66,7 @@
* Because an automatic module has no explicit module declaration, it has no
* 'requires' directives of its own, although its name may be given by a
* 'requires' directive of an explicit module declaration. </p>
*
* <p> The set of root modules, whose names are the initial input to this
* algorithm, is determined in an implementation specific manner. The set of
* root modules may include automatic modules. </p>

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@ -274,7 +274,7 @@ public interface AnnotatedElement {
return getAnnotation(annotationClass) != null;
}
/**
/**
* Returns this element's annotation for the specified type if
* such an annotation is <em>present</em>, else null.
*

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
@ -47,7 +47,7 @@ public class InvocationTargetException extends ReflectiveOperationException {
@java.io.Serial
private static final long serialVersionUID = 4085088731926701167L;
/**
/**
* This field holds the target if the
* InvocationTargetException(Throwable target) constructor was
* used to instantiate the object