Skip to content
Permalink
Browse files

8241727: Typos: empty lines in javadoc, inconsistent indents, etc. (c…

…ore-libs only)

Reviewed-by: prappo
  • Loading branch information
Ivan Gerasimov committed Mar 29, 2020
1 parent 7f8d785 commit b0e1ee4b3b345b729d14b897d503777ff779d573
Showing with 435 additions and 446 deletions.
  1. +1 −2 src/java.base/share/classes/java/io/FileInputStream.java
  2. +2 −2 src/java.base/share/classes/java/io/ObjectInputStream.java
  3. +2 −2 src/java.base/share/classes/java/io/PipedReader.java
  4. +2 −2 src/java.base/share/classes/java/io/RandomAccessFile.java
  5. +2 −2 src/java.base/share/classes/java/lang/Boolean.java
  6. +4 −5 src/java.base/share/classes/java/lang/Character.java
  7. +0 −1 src/java.base/share/classes/java/lang/ClassLoader.java
  8. +1 −2 src/java.base/share/classes/java/lang/Float.java
  9. +2 −2 src/java.base/share/classes/java/lang/Package.java
  10. +3 −3 src/java.base/share/classes/java/lang/ProcessBuilder.java
  11. +8 −8 src/java.base/share/classes/java/lang/ProcessHandleImpl.java
  12. +2 −3 src/java.base/share/classes/java/lang/RuntimePermission.java
  13. +2 −2 src/java.base/share/classes/java/lang/StrictMath.java
  14. +5 −5 src/java.base/share/classes/java/lang/String.java
  15. +1 −1 src/java.base/share/classes/java/lang/System.java
  16. +2 −2 src/java.base/share/classes/java/lang/Thread.java
  17. +2 −2 src/java.base/share/classes/java/lang/annotation/Annotation.java
  18. +3 −3 src/java.base/share/classes/java/lang/invoke/ConstantGroup.java
  19. +20 −20 src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
  20. +30 −29 src/java.base/share/classes/java/lang/invoke/MethodHandle.java
  21. +1 −1 src/java.base/share/classes/java/lang/invoke/MethodType.java
  22. +1 −2 src/java.base/share/classes/java/lang/invoke/package-info.java
  23. +2 −2 src/java.base/share/classes/java/lang/module/package-info.java
  24. +2 −2 src/java.base/share/classes/java/lang/reflect/AnnotatedElement.java
  25. +2 −2 src/java.base/share/classes/java/lang/reflect/InvocationTargetException.java
  26. +1 −1 src/java.base/share/classes/java/math/BigDecimal.java
  27. +8 −8 src/java.base/share/classes/java/math/BigInteger.java
  28. +2 −2 src/java.base/share/classes/java/math/MutableBigInteger.java
  29. +7 −7 src/java.base/share/classes/java/math/SignedMutableBigInteger.java
  30. +5 −5 src/java.base/share/classes/java/text/DateFormat.java
  31. +2 −3 src/java.base/share/classes/java/text/DateFormatSymbols.java
  32. +2 −2 src/java.base/share/classes/java/text/MessageFormat.java
  33. +6 −6 src/java.base/share/classes/java/text/NumberFormat.java
  34. +10 −10 src/java.base/share/classes/java/text/RBCollationTables.java
  35. +2 −2 src/java.base/share/classes/java/text/RuleBasedCollator.java
  36. +2 −2 src/java.base/share/classes/java/util/BitSet.java
  37. +2 −2 src/java.base/share/classes/java/util/Calendar.java
  38. +2 −2 src/java.base/share/classes/java/util/Collections.java
  39. +2 −2 src/java.base/share/classes/java/util/Comparator.java
  40. +3 −3 src/java.base/share/classes/java/util/Currency.java
  41. +2 −2 src/java.base/share/classes/java/util/EnumMap.java
  42. +2 −3 src/java.base/share/classes/java/util/GregorianCalendar.java
  43. +2 −2 src/java.base/share/classes/java/util/Scanner.java
  44. +2 −2 src/java.base/share/classes/java/util/ServiceLoader.java
  45. +2 −2 src/java.base/share/classes/java/util/SimpleTimeZone.java
  46. +16 −16 src/java.base/share/classes/java/util/regex/Matcher.java
  47. +1 −2 src/java.base/share/classes/java/util/spi/AbstractResourceBundleProvider.java
  48. +2 −2 src/java.base/share/classes/java/util/stream/DoubleStream.java
  49. +0 −1 src/java.base/share/classes/java/util/stream/package-info.java
  50. +29 −29 src/java.base/share/classes/jdk/internal/icu/impl/CharTrie.java
  51. +6 −6 src/java.base/share/classes/jdk/internal/icu/impl/ICUBinary.java
  52. +10 −10 src/java.base/share/classes/jdk/internal/icu/impl/StringPrepDataReader.java
  53. +63 −63 src/java.base/share/classes/jdk/internal/icu/impl/Trie.java
  54. +11 −11 src/java.base/share/classes/jdk/internal/icu/impl/Trie2.java
  55. +23 −23 src/java.base/share/classes/jdk/internal/icu/impl/UCharacterProperty.java
  56. +23 −23 src/java.base/share/classes/jdk/internal/icu/lang/UCharacterEnums.java
  57. +1 −1 src/java.base/share/classes/jdk/internal/icu/text/UCharacterIterator.java
  58. +2 −2 src/java.base/share/classes/jdk/internal/jimage/ImageReader.java
  59. +2 −2 src/java.base/share/classes/jdk/internal/logger/LoggerWrapper.java
  60. +9 −9 src/java.base/share/classes/jdk/internal/misc/Unsafe.java
  61. +2 −2 src/java.base/share/classes/jdk/internal/util/Preconditions.java
  62. +4 −4 src/java.base/share/classes/jdk/internal/util/xml/impl/Parser.java
  63. +2 −2 src/java.base/share/classes/sun/reflect/generics/reflectiveObjects/TypeVariableImpl.java
  64. +11 −11 src/java.base/share/classes/sun/reflect/generics/repository/ClassRepository.java
  65. +11 −11 src/java.base/share/classes/sun/reflect/generics/repository/ConstructorRepository.java
  66. +11 −11 src/java.base/share/classes/sun/reflect/generics/repository/FieldRepository.java
  67. +10 −10 src/java.base/share/classes/sun/reflect/generics/repository/GenericDeclRepository.java
  68. +3 −3 src/java.base/share/classes/sun/text/BreakDictionary.java
  69. +13 −15 src/java.base/share/classes/sun/text/CompactByteArray.java
  70. +2 −2 src/java.base/share/classes/sun/util/calendar/ZoneInfo.java
@@ -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
@@ -52,7 +52,6 @@
* called when the FileInputStream is unreachable.
* Otherwise, it is implementation specific how the resource cleanup described in
* {@link #close} is performed.
*
* @author Arthur van Hoff
* @see java.io.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
@@ -517,7 +517,7 @@ private final Object readObject(Class<?> type)

/**
* This method is called by trusted subclasses of ObjectInputStream that
+ constructed ObjectInputStream using the protected no-arg constructor.
* constructed ObjectInputStream using the protected no-arg constructor.
* The subclass is expected to provide an override method with the modifier
* "final".
*
@@ -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
@@ -87,7 +87,7 @@ public PipedReader(PipedWriter src) throws IOException {
* to the piped writer {@code src} and uses the specified
* pipe size for the pipe's buffer. Data written to {@code src}
* will then be available as input from this stream.
*
* @param src the stream to connect to.
* @param pipeSize the size of the pipe's buffer.
* @throws IOException if an I/O error occurs.
@@ -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
@@ -529,8 +529,8 @@ public void write(int b) throws IOException {

/**
* Writes a sub array as a sequence of bytes.
*
* @param b the data to be written
* @param off the start offset in the data
* @param len the number of bytes that are written
* @throws IOException If an I/O error has occurred.
@@ -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 static int hashCode(boolean value) {
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.
@@ -390,7 +390,7 @@
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 @@ private UnicodeBlock(String idName, String... aliases) {
"MAYAN NUMERALS",
"MAYANNUMERALS");

/**
/**
* Constant for the "Indic Siyaq Numbers" Unicode
* character block.
* @since 12
@@ -4773,7 +4773,7 @@ public static final UnicodeBlock forName(String blockName) {
*/
WARANG_CITI,

/**
/**
* Unicode script "Ahom".
* @since 9
*/
@@ -8589,7 +8589,7 @@ public static boolean isSurrogate(char ch) {
* 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 @@ public static boolean isMirrored(int codePoint) {
* 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
@@ -734,7 +734,6 @@ public Void run() {
* 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
*
@@ -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 static int hashCode(float value) {
}

/**
* 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
@@ -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 String getSpecificationTitle() {
* <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>
@@ -1217,9 +1217,9 @@ private Process start(Redirect[] redirects) throws IOException {
* 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);
@@ -340,14 +340,14 @@ boolean destroyProcess(boolean force) {
}

/**
* 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
@@ -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 @@
* 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>
@@ -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 static int max(int a, int b) {
* @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);
}
@@ -462,7 +462,7 @@ public String(byte ascii[], int hibyte) {
*
* @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 String replace(CharSequence target, CharSequence replacement) {
*/
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 &&
@@ -1618,7 +1618,7 @@ public Logger getLocalizedLogger(String name, ResourceBundle bundle,
* 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
@@ -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 @@ static void blockedOn(Interruptible b) {
*/
public static final int MIN_PRIORITY = 1;

/**
/**
* The default priority that is assigned to a thread.
*/
public static final int NORM_PRIORITY = 5;
@@ -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 @@
* {@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.)
*
@@ -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 @@
* 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.
@@ -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 @@ private Name emitSelectAlternative(Name selectAlternativeName, Name invokeBasicN
}

/**
* 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];

0 comments on commit b0e1ee4

Please sign in to comment.