8241014: Miscellaneous typos in documentation comments

Reviewed-by: igerasim, prappo, psandoz, rriggs, weijun
This commit is contained in:
Pavel Rappo 2020-03-20 20:54:56 +00:00
parent c5a7490809
commit 17ff85d4ad
39 changed files with 104 additions and 107 deletions

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
@ -540,7 +540,7 @@ public final class FilePermission extends Permission implements Serializable {
* If {@code jdk.io.permissionsUseCanonicalPath} is {@code true}, a
* simple {@code cpath} is inside a wildcard {@code cpath} if and only if
* after removing the base name (the last name in the pathname's name
* sequence) from the former the remaining part equals to the latter,
* sequence) from the former the remaining part is equal to the latter,
* a simple {@code cpath} is recursively inside a wildcard {@code cpath}
* if and only if the former starts with the latter.
* <p>

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
@ -62,7 +62,7 @@ public abstract class Reader implements Readable, Closeable {
* effect.
*
* <p> While the stream is open, the {@code read()}, {@code read(char[])},
* {@code read(char[], int, int)}, {@code read(Charbuffer)}, {@code
* {@code read(char[], int, int)}, {@code read(CharBuffer)}, {@code
* ready()}, {@code skip(long)}, and {@code transferTo()} methods all
* behave as if end of stream has been reached. After the stream has been
* closed, these methods all throw {@code IOException}.
@ -183,7 +183,7 @@ public abstract class Reader implements Readable, Closeable {
* @throws java.nio.ReadOnlyBufferException if target is a read only buffer
* @since 1.5
*/
public int read(java.nio.CharBuffer target) throws IOException {
public int read(CharBuffer target) throws IOException {
int len = target.remaining();
char[] cbuf = new char[len];
int n = read(cbuf, 0, len);

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@ -9732,7 +9732,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
}
/**
* Determines if the specified character (Unicode code point) is an alphabet.
* Determines if the specified character (Unicode code point) is alphabetic.
* <p>
* A character is considered to be alphabetic if its general category type,
* provided by {@link Character#getType(int) getType(codePoint)}, is any of

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
@ -319,7 +319,7 @@ final class ProcessHandleImpl implements ProcessHandle {
* @param pids an allocated long array to receive the pids
* @param ppids an allocated long array to receive the parent pids; may be null
* @param starttimes an allocated long array to receive the child start times; may be null
* @return if greater than or equals to zero is the number of pids in the array;
* @return if greater than or equal to zero is the number of pids in the array;
* if greater than the length of the arrays, the arrays are too small
*/
private static native int getProcessPids0(long pid, long[] pids,

View file

@ -960,7 +960,7 @@ public class Runtime {
/*
* List of version number components passed to this constructor MUST
* be at least unmodifiable (ideally immutable). In the case on an
* be at least unmodifiable (ideally immutable). In the case of an
* unmodifiable list, the caller MUST hand the list over to this
* constructor and never change the underlying list.
*/

View file

@ -1383,7 +1383,7 @@ public final class String
* integer <i>k</i> less than {@code len} such that:
* <blockquote><pre>
* Character.toLowerCase(Character.toUpperCase(this.charAt(toffset+k))) !=
Character.toLowerCase(Character.toUpperCase(other.charAt(ooffset+k)))
* Character.toLowerCase(Character.toUpperCase(other.charAt(ooffset+k)))
* </pre></blockquote>
* </ul>
*
@ -2445,12 +2445,12 @@ public final class String
* <pre>{@code
* List<String> strings = List.of("Java", "is", "cool");
* String message = String.join(" ", strings);
* //message returned is: "Java is cool"
* // message returned is: "Java is cool"
*
* Set<String> strings =
* new LinkedHashSet<>(List.of("Java", "is", "very", "cool"));
* String message = String.join("-", strings);
* //message returned is: "Java-is-very-cool"
* // message returned is: "Java-is-very-cool"
* }</pre></blockquote>
*
* Note that if an individual element is {@code null}, then {@code "null"} is added.

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
@ -194,8 +194,8 @@ final class DirectMethodHandleDescImpl implements DirectMethodHandleDesc {
* descriptor.
* @param o a {@code DirectMethodHandleDescImpl} to compare to this
* {@code DirectMethodHandleDescImpl}
* @return {@code true} if the specified {@code DirectMethodHandleDescImpl} is
* equals to this {@code DirectMethodHandleDescImpl}.
* @return {@code true} if the specified {@code DirectMethodHandleDescImpl}
* is equal to this {@code DirectMethodHandleDescImpl}.
*/
@Override
public boolean equals(Object o) {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
@ -249,8 +249,8 @@ public class DynamicCallSiteDesc {
*
* @param o the {@code DynamicCallSiteDesc} to compare to this
* {@code DynamicCallSiteDesc}
* @return {@code true} if the specified {@code DynamicCallSiteDesc} is
* equals to this {@code DynamicCallSiteDesc}.
* @return {@code true} if the specified {@code DynamicCallSiteDesc}
* is equal to this {@code DynamicCallSiteDesc}.
*/
@Override
public final boolean equals(Object o) {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
@ -350,8 +350,8 @@ public abstract class DynamicConstantDesc<T>
*
* @param o the {@code DynamicConstantDesc} to compare to this
* {@code DynamicConstantDesc}
* @return {@code true} if the specified {@code DynamicConstantDesc} is
* equals to this {@code DynamicConstantDesc}.
* @return {@code true} if the specified {@code DynamicConstantDesc}
* is equal to this {@code DynamicConstantDesc}.
*
*/
@Override

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
@ -158,8 +158,8 @@ final class MethodTypeDescImpl implements MethodTypeDesc {
*
* @param o the {@code MethodTypeDescImpl} to compare to this
* {@code MethodTypeDescImpl}
* @return {@code true} if the specified {@code MethodTypeDescImpl} is
* equals to this {@code MethodTypeDescImpl}.
* @return {@code true} if the specified {@code MethodTypeDescImpl}
* is equal to this {@code MethodTypeDescImpl}.
*/
@Override
public boolean equals(Object o) {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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,8 +87,8 @@ final class ReferenceClassDescImpl implements ClassDesc {
*
* @param o the {@code ClassDesc} to compare to this
* {@code ClassDesc}
* @return {@code true} if the specified {@code ClassDesc} is
* equals to this {@code ClassDesc}.
* @return {@code true} if the specified {@code ClassDesc}
* is equal to this {@code ClassDesc}.
*/
@Override
public boolean equals(Object o) {

View file

@ -1379,12 +1379,12 @@ s.writeObject(this.parameterArray());
/**
* This implementation returns {@code true} if {@code obj} is another
* {@code WeakEntry} whose referent is equals to this referent, or
* if {@code obj} is equals to the referent of this. This allows
* {@code WeakEntry} whose referent is equal to this referent, or
* if {@code obj} is equal to the referent of this. This allows
* lookups to be made without wrapping in a {@code WeakEntry}.
*
* @param obj the object to compare
* @return true if {@code obj} is equals to this or the referent of this
* @return true if {@code obj} is equal to this or the referent of this
* @see MethodType#equals(Object)
* @see Object#equals(Object)
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2019, 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
@ -536,14 +536,14 @@ public final class StringConcatFactory {
* <li>The number of parameter slots in {@code concatType} is less than
* or equal to 200</li>
*
* <li>The parameter count in {@code concatType} equals to number of \1 tags
* <li>The parameter count in {@code concatType} is equal to number of \1 tags
* in {@code recipe}</li>
*
* <li>The return type in {@code concatType} is assignable
* from {@link java.lang.String}, and matches the return type of the
* returned {@link MethodHandle}</li>
*
* <li>The number of elements in {@code constants} equals to number of \2
* <li>The number of elements in {@code constants} is equal to number of \2
* tags in {@code recipe}</li>
* </ul>
*

View file

@ -3025,9 +3025,9 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* this one but with any trailing zeros removed from the
* representation. For example, stripping the trailing zeros from
* the {@code BigDecimal} value {@code 600.0}, which has
* [{@code BigInteger}, {@code scale}] components equals to
* [{@code BigInteger}, {@code scale}] components equal to
* [6000, 1], yields {@code 6E2} with [{@code BigInteger},
* {@code scale}] components equals to [6, -2]. If
* {@code scale}] components equal to [6, -2]. If
* this BigDecimal is numerically equal to zero, then
* {@code BigDecimal.ZERO} is returned.
*

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 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
@ -719,7 +719,7 @@ public final class HttpCookie implements Cloneable {
return false;
HttpCookie other = (HttpCookie)obj;
// One http cookie equals to another cookie (RFC 2965 sec. 3.3.3) if:
// One http cookie is equal to another cookie (RFC 2965 sec. 3.3.3) if:
// 1. they come from same domain (case-insensitive),
// 2. have same name (case-insensitive),
// 3. and have same path (case-sensitive).

View file

@ -658,7 +658,7 @@ public class MulticastSocket extends DatagramSocket {
}
/**
* Disable/Enable local loopback of multicast datagrams
* Disable/Enable local loopback of multicast datagrams.
* The option is used by the platform's networking code as a hint
* for setting whether multicast data will be looped back to
* the local socket.

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 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
@ -103,7 +103,7 @@ import java.io.IOException;
* result.add(entry);
* }
* } catch (DirectoryIteratorException ex) {
* // I/O error encounted during the iteration, the cause is an IOException
* // I/O error encountered during the iteration, the cause is an IOException
* throw ex.getCause();
* }
* return result;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 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
@ -190,7 +190,7 @@ public interface UserDefinedFileAttributeView
* Suppose we want to write a file's MIME type as a user-defined attribute:
* <pre>
* UserDefinedFileAttributeView view =
* FIles.getFileAttributeView(path, UserDefinedFileAttributeView.class);
* Files.getFileAttributeView(path, UserDefinedFileAttributeView.class);
* view.write("user.mimetype", Charset.defaultCharset().encode("text/html"));
* </pre>
*

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
@ -115,7 +115,7 @@ public final class PKCS12Attribute implements KeyStore.Entry.Attribute {
* </pre>
*
* @param encoded the attribute's ASN.1 DER encoding. It is cloned
* to prevent subsequent modificaion.
* to prevent subsequent modification.
*
* @throws NullPointerException if {@code encoded} is
* {@code null}

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
@ -90,7 +90,7 @@ public abstract class SignatureSpi {
try {
engineSetParameter(params);
} catch (UnsupportedOperationException usoe) {
// error out if not overrridden
// error out if not overridden
throw new InvalidAlgorithmParameterException(usoe);
}
}
@ -155,7 +155,7 @@ public abstract class SignatureSpi {
try {
engineSetParameter(params);
} catch (UnsupportedOperationException usoe) {
// error out if not overrridden
// error out if not overridden
throw new InvalidAlgorithmParameterException(usoe);
}
}

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
@ -318,7 +318,7 @@ public abstract class BreakIterator implements Cloneable
/**
* Returns the first boundary following the specified character offset. If the
* specified offset equals to the last text boundary, it returns
* specified offset is equal to the last text boundary, it returns
* {@code BreakIterator.DONE} and the iterator's current position is unchanged.
* Otherwise, the iterator's current position is set to the returned boundary.
* The value returned is always greater than the offset or the value
@ -334,7 +334,7 @@ public abstract class BreakIterator implements Cloneable
/**
* Returns the last boundary preceding the specified character offset. If the
* specified offset equals to the first text boundary, it returns
* specified offset is equal to the first text boundary, it returns
* {@code BreakIterator.DONE} and the iterator's current position is unchanged.
* Otherwise, the iterator's current position is set to the returned boundary.
* The value returned is always less than the offset or the value

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
@ -405,7 +405,7 @@ final class ChronoLocalDateTimeImpl<D extends ChronoLocalDate>
* <pre>
* out.writeByte(2); // identifies a ChronoLocalDateTime
* out.writeObject(toLocalDate());
* out.witeObject(toLocalTime());
* out.writeObject(toLocalTime());
* </pre>
*
* @return the instance of {@code Ser}, not null

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2018, 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
@ -97,10 +97,10 @@
*
* <h2>Example</h2>
* <p>
* This example lists todays date for all of the available calendars.
* This example lists today's date for all of the available calendars.
* </p>
* <pre>
* // Enumerate the list of available calendars and print todays date for each.
* // Enumerate the list of available calendars and print today's date for each.
* Set&lt;Chronology&gt; chronos = Chronology.getAvailableChronologies();
* for (Chronology chrono : chronos) {
* ChronoLocalDate date = chrono.dateNow();

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2013, 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
@ -144,7 +144,7 @@ public interface TemporalAccessor {
* If unsupported, then an {@code UnsupportedTemporalTypeException} must be thrown.
* <p>
* If the field is not a {@code ChronoField}, then the result of this method
* is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessorl)}
* is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}
* passing {@code this} as the argument.
* <p>
* Implementations must ensure that no observable state is altered when this

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
@ -2794,7 +2794,7 @@ public class Arrays {
* Two doubles {@code d1} and {@code d2} are considered equal if:
* <pre> {@code new Double(d1).equals(new Double(d2))}</pre>
* (Unlike the {@code ==} operator, this method considers
* {@code NaN} equals to itself, and 0.0d unequal to -0.0d.)
* {@code NaN} equal to itself, and 0.0d unequal to -0.0d.)
*
* @param a one array to be tested for equality
* @param a2 the other array to be tested for equality
@ -2827,7 +2827,7 @@ public class Arrays {
* <p>Two doubles {@code d1} and {@code d2} are considered equal if:
* <pre> {@code new Double(d1).equals(new Double(d2))}</pre>
* (Unlike the {@code ==} operator, this method considers
* {@code NaN} equals to itself, and 0.0d unequal to -0.0d.)
* {@code NaN} equal to itself, and 0.0d unequal to -0.0d.)
*
* @param a the first array to be tested for equality
* @param aFromIndex the index (inclusive) of the first element in the
@ -2877,7 +2877,7 @@ public class Arrays {
* Two floats {@code f1} and {@code f2} are considered equal if:
* <pre> {@code new Float(f1).equals(new Float(f2))}</pre>
* (Unlike the {@code ==} operator, this method considers
* {@code NaN} equals to itself, and 0.0f unequal to -0.0f.)
* {@code NaN} equal to itself, and 0.0f unequal to -0.0f.)
*
* @param a one array to be tested for equality
* @param a2 the other array to be tested for equality
@ -2910,7 +2910,7 @@ public class Arrays {
* <p>Two floats {@code f1} and {@code f2} are considered equal if:
* <pre> {@code new Float(f1).equals(new Float(f2))}</pre>
* (Unlike the {@code ==} operator, this method considers
* {@code NaN} equals to itself, and 0.0f unequal to -0.0f.)
* {@code NaN} equal to itself, and 0.0f unequal to -0.0f.)
*
* @param a the first array to be tested for equality
* @param aFromIndex the index (inclusive) of the first element in the
@ -7493,7 +7493,7 @@ public class Arrays {
* <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
* ranges [{@code aFromIndex}, {@code atoIndex}) and
* [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
* if the following expression is true:
* prefix if the following expression is true:
* <pre>{@code
* (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
* Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
@ -7620,7 +7620,7 @@ public class Arrays {
* <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
* ranges [{@code aFromIndex}, {@code atoIndex}) and
* [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
* if the following expression is true:
* prefix if the following expression is true:
* <pre>{@code
* (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
* Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
@ -7747,7 +7747,7 @@ public class Arrays {
* <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
* ranges [{@code aFromIndex}, {@code atoIndex}) and
* [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
* if the following expression is true:
* prefix if the following expression is true:
* <pre>{@code
* (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
* Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
@ -7874,7 +7874,7 @@ public class Arrays {
* <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
* ranges [{@code aFromIndex}, {@code atoIndex}) and
* [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
* if the following expression is true:
* prefix if the following expression is true:
* <pre>{@code
* (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
* Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
@ -8001,7 +8001,7 @@ public class Arrays {
* <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
* ranges [{@code aFromIndex}, {@code atoIndex}) and
* [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
* if the following expression is true:
* prefix if the following expression is true:
* <pre>{@code
* (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
* Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
@ -8128,7 +8128,7 @@ public class Arrays {
* <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
* ranges [{@code aFromIndex}, {@code atoIndex}) and
* [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
* if the following expression is true:
* prefix if the following expression is true:
* <pre>{@code
* (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
* Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
@ -8255,7 +8255,7 @@ public class Arrays {
* <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
* ranges [{@code aFromIndex}, {@code atoIndex}) and
* [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
* if the following expression is true:
* prefix if the following expression is true:
* <pre>{@code
* (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
* Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
@ -8382,7 +8382,7 @@ public class Arrays {
* <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
* ranges [{@code aFromIndex}, {@code atoIndex}) and
* [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
* if the following expression is true:
* prefix if the following expression is true:
* <pre>{@code
* (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
* Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
@ -8513,7 +8513,7 @@ public class Arrays {
* <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
* ranges [{@code aFromIndex}, {@code atoIndex}) and
* [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
* if the following expression is true:
* prefix if the following expression is true:
* <pre>{@code
* (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
* Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
@ -8659,7 +8659,7 @@ public class Arrays {
* <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
* ranges [{@code aFromIndex}, {@code atoIndex}) and
* [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
* if the following expression is true:
* prefix if the following expression is true:
* <pre>{@code
* (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
* Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 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
@ -1054,7 +1054,7 @@ public class BitSet implements Cloneable, java.io.Serializable {
/**
* 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 Bitset} object that has
* not {@code null} and is a {@code BitSet} object that has
* exactly the same set of bits set to {@code true} as this bit
* set. That is, for every nonnegative {@code int} index {@code k},
* <pre>((BitSet)obj).get(k) == this.get(k)</pre>

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
@ -88,7 +88,7 @@ public interface Enumeration<E> {
* @apiNote
* This method is intended to help adapt code that produces
* {@code Enumeration} instances to code that consumes {@code Iterator}
* instances. For example, the {@link java.util.jar.JarFile#entries
* instances. For example, the {@link java.util.jar.JarFile#entries()
* JarFile.entries()} method returns an {@code Enumeration<JarEntry>}.
* This can be turned into an {@code Iterator}, and then the
* {@code forEachRemaining()} method can be used:
@ -98,7 +98,7 @@ public interface Enumeration<E> {
* jarFile.entries().asIterator().forEachRemaining(entry -> { ... });
* }</pre>
*
* (Note that there is also a {@link java.util.jar.JarFile#stream
* (Note that there is also a {@link java.util.jar.JarFile#stream()
* JarFile.stream()} method that returns a {@code Stream} of entries,
* which may be more convenient in some cases.)
*

View file

@ -732,8 +732,7 @@ public interface Map<K, V> {
* {@code null}, else returns the current value.
*
* @implSpec
* The default implementation is equivalent to, for this {@code
* map}:
* The default implementation is equivalent to, for this {@code map}:
*
* <pre> {@code
* V v = map.get(key);

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018, 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
@ -77,8 +77,8 @@ public final class StringJoiner {
private int len;
/**
* When overridden by the user to be non-null via {@link setEmptyValue}, the
* string returned by toString() when no elements have yet been added.
* When overridden by the user to be non-null via {@link #setEmptyValue(CharSequence)},
* the string returned by toString() when no elements have yet been added.
* When null, prefix + suffix is used as the empty value.
*/
private String emptyValue;

View file

@ -778,14 +778,13 @@ public final class Pattern
implements java.io.Serializable
{
/**
/*
* Regular expression modifier values. Instead of being passed as
* arguments, they can also be passed as inline modifiers.
* For example, the following statements have the same effect.
* <pre>
* Pattern p1 = Pattern.compile("abc", Pattern.CASE_INSENSITIVE|Pattern.MULTILINE);
* Pattern p2 = Pattern.compile("(?im)abc", 0);
* </pre>
*
* Pattern p1 = Pattern.compile("abc", Pattern.CASE_INSENSITIVE|Pattern.MULTILINE);
* Pattern p2 = Pattern.compile("(?im)abc", 0);
*/
/**

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2017, 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
@ -932,7 +932,7 @@ public interface Stream<T> extends BaseStream<T, Stream<T>> {
* additional synchronization is needed for a parallel reduction.
*
* @apiNote
* The following will accumulate strings into an ArrayList:
* The following will accumulate strings into a List:
* <pre>{@code
* List<String> asList = stringStream.collect(Collectors.toList());
* }</pre>

View file

@ -316,7 +316,7 @@
* see the API note documented on the {@link java.util.stream.Stream#count count}
* operation.)
*
* <p>Many computations where one might be tempted to use side effects can be more
* <p>Many computations where one might be tempted to use side-effects can be more
* safely and efficiently expressed without side-effects, such as using
* <a href="package-summary.html#Reduction">reduction</a> instead of mutable
* accumulators. However, side-effects such as using {@code println()} for debugging
@ -445,7 +445,7 @@
* required.
*
* <p>The "widgets" examples shown earlier shows how reduction combines with
* other operations to replace for loops with bulk operations. If {@code widgets}
* other operations to replace for-loops with bulk operations. If {@code widgets}
* is a collection of {@code Widget} objects, which have a {@code getWeight} method,
* we can find the heaviest widget with:
* <pre>{@code

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
@ -49,8 +49,8 @@ import java.lang.reflect.*;
* <pre>{@code
* permission <crypto permission class name>[, <algorithm name>
* [[, <exemption mechanism name>][, <maxKeySize>
* [, <AlgrithomParameterSpec class name>, <parameters
* for constructing an AlgrithomParameterSpec object>]]]];
* [, <AlgorithmParameterSpec class name>, <parameters
* for constructing an AlgorithmParameterSpec object>]]]];
* }</pre>
*
* @author Sharon Liu

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
@ -130,7 +130,7 @@ import java.util.Date;
@Deprecated(since="9", forRemoval=true)
public abstract class X509Certificate extends Certificate {
/*
/**
* Constant to lookup in the Security properties file.
* In the Security properties file the default implementation
* for X.509 v3 is given as:

View file

@ -139,7 +139,7 @@ public final class VersionInfo
* Compares other with this VersionInfo.
* @param other VersionInfo to be compared
* @return 0 if the argument is a VersionInfo object that has version
* information equals to this object.
* information equal to this object.
* Less than 0 if the argument is a VersionInfo object that has
* version information greater than this object.
* Greater than 0 if the argument is a VersionInfo object that

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 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
@ -176,7 +176,7 @@ public class ReflectionFactory {
Field root = langReflectAccess.getRoot(field);
if (root != null) {
// FieldAccessor will use the root unless the modifiers have
// been overrridden
// been overridden
if (root.getModifiers() == field.getModifiers() || !override) {
field = root;
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 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
@ -490,7 +490,7 @@ public abstract class AbstractDrbg {
// (not using derivation function) is so confusing
// (does it need only strength or seedlen of entropy?)
// that it's safer to assume minLength. In all other
// cases minLength equals to minEntropy.
// cases minLength is equal to minEntropy.
return getEntropyInput(minLength, minLength, maxLength, isPr);
}

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
@ -300,7 +300,7 @@ public class PolicyFile extends java.security.Policy {
* initialize the Policy object.
*/
private void init(URL url) {
// Properties are set once for each init(); ignore changes between
// Properties are set once for each init(); ignore changes
// between diff invocations of initPolicyFile(policy, url, info).
String numCacheStr =
AccessController.doPrivileged(new PrivilegedAction<>() {
@ -325,7 +325,6 @@ public class PolicyFile extends java.security.Policy {
} else {
numCaches = DEFAULT_CACHE_SIZE;
}
// System.out.println("number caches=" + numCaches);
PolicyInfo newInfo = new PolicyInfo(numCaches);
initPolicyFile(newInfo, url);
policyInfo = newInfo;