Skip to content
Permalink
Browse files
8241014: Miscellaneous typos in documentation comments
Reviewed-by: igerasim, prappo, psandoz, rriggs, weijun
  • Loading branch information
pavelrappo committed Mar 20, 2020
1 parent c5a7490 commit 17ff85d4ada184b65f091251820d5b0e0b3e4164
Showing with 104 additions and 107 deletions.
  1. +2 −2 src/java.base/share/classes/java/io/FilePermission.java
  2. +3 −3 src/java.base/share/classes/java/io/Reader.java
  3. +2 −2 src/java.base/share/classes/java/lang/Character.java
  4. +2 −2 src/java.base/share/classes/java/lang/ProcessHandleImpl.java
  5. +1 −1 src/java.base/share/classes/java/lang/Runtime.java
  6. +3 −3 src/java.base/share/classes/java/lang/String.java
  7. +3 −3 src/java.base/share/classes/java/lang/constant/DirectMethodHandleDescImpl.java
  8. +3 −3 src/java.base/share/classes/java/lang/constant/DynamicCallSiteDesc.java
  9. +3 −3 src/java.base/share/classes/java/lang/constant/DynamicConstantDesc.java
  10. +3 −3 src/java.base/share/classes/java/lang/constant/MethodTypeDescImpl.java
  11. +3 −3 src/java.base/share/classes/java/lang/constant/ReferenceClassDescImpl.java
  12. +3 −3 src/java.base/share/classes/java/lang/invoke/MethodType.java
  13. +3 −3 src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java
  14. +2 −2 src/java.base/share/classes/java/math/BigDecimal.java
  15. +2 −2 src/java.base/share/classes/java/net/HttpCookie.java
  16. +1 −1 src/java.base/share/classes/java/net/MulticastSocket.java
  17. +2 −2 src/java.base/share/classes/java/nio/file/DirectoryStream.java
  18. +2 −2 src/java.base/share/classes/java/nio/file/attribute/UserDefinedFileAttributeView.java
  19. +2 −2 src/java.base/share/classes/java/security/PKCS12Attribute.java
  20. +3 −3 src/java.base/share/classes/java/security/SignatureSpi.java
  21. +3 −3 src/java.base/share/classes/java/text/BreakIterator.java
  22. +2 −2 src/java.base/share/classes/java/time/chrono/ChronoLocalDateTimeImpl.java
  23. +3 −3 src/java.base/share/classes/java/time/chrono/package-info.java
  24. +2 −2 src/java.base/share/classes/java/time/temporal/TemporalAccessor.java
  25. +15 −15 src/java.base/share/classes/java/util/Arrays.java
  26. +2 −2 src/java.base/share/classes/java/util/BitSet.java
  27. +3 −3 src/java.base/share/classes/java/util/Enumeration.java
  28. +1 −2 src/java.base/share/classes/java/util/Map.java
  29. +3 −3 src/java.base/share/classes/java/util/StringJoiner.java
  30. +4 −5 src/java.base/share/classes/java/util/regex/Pattern.java
  31. +2 −2 src/java.base/share/classes/java/util/stream/Stream.java
  32. +2 −2 src/java.base/share/classes/java/util/stream/package-info.java
  33. +3 −3 src/java.base/share/classes/javax/crypto/CryptoPolicyParser.java
  34. +2 −2 src/java.base/share/classes/javax/security/cert/X509Certificate.java
  35. +1 −1 src/java.base/share/classes/jdk/internal/icu/util/VersionInfo.java
  36. +2 −2 src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java
  37. +2 −2 src/java.base/share/classes/sun/security/provider/AbstractDrbg.java
  38. +2 −3 src/java.base/share/classes/sun/security/provider/PolicyFile.java
  39. +2 −2 src/java.compiler/share/classes/javax/tools/JavaFileManager.java
@@ -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 FilePermission(String path, String actions) {
* 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>
@@ -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 @@
* 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 @@ protected Reader(Object lock) {
* @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);
@@ -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 @@ public static boolean isJavaLetterOrDigit(char ch) {
}

/**
* 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
@@ -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 @@ public static ProcessHandleImpl current() {
* @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,
@@ -960,7 +960,7 @@ public static Version version() {

/*
* 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.
*/
@@ -1383,7 +1383,7 @@ public boolean regionMatches(int toffset, String other, int ooffset, int len) {
* 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 static String join(CharSequence delimiter, CharSequence... elements) {
* <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.
@@ -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 @@ public MethodHandle resolveConstantDesc(MethodHandles.Lookup lookup)
* 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) {
@@ -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 CallSite resolveCallSiteDesc(MethodHandles.Lookup lookup) throws Throwabl
*
* @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) {
@@ -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 @@ private static ConstantDesc canonicalizeArrayVarHandle(DynamicConstantDesc<?> de
*
* @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
@@ -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 @@ public MethodType run() {
*
* @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) {
@@ -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 @@ public String descriptorString() {
*
* @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) {
@@ -1379,12 +1379,12 @@ public WeakEntry(T key, ReferenceQueue<T> queue) {

/**
* 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)
*/
@@ -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 static CallSite makeConcat(MethodHandles.Lookup lookup,
* <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>
*
@@ -3025,9 +3025,9 @@ public BigDecimal scaleByPowerOfTen(int n) {
* 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.
*
@@ -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 boolean equals(Object obj) {
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).
@@ -658,7 +658,7 @@ public NetworkInterface getNetworkInterface() throws SocketException {
}

/**
* 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.
@@ -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 @@
* 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;
@@ -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 @@
* 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>
*
@@ -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 PKCS12Attribute(String name, String value) {
* </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}
@@ -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 @@ void engineInitVerify(PublicKey publicKey,
try {
engineSetParameter(params);
} catch (UnsupportedOperationException usoe) {
// error out if not overrridden
// error out if not overridden
throw new InvalidAlgorithmParameterException(usoe);
}
}
@@ -155,7 +155,7 @@ void engineInitSign(PrivateKey privateKey,
try {
engineSetParameter(params);
} catch (UnsupportedOperationException usoe) {
// error out if not overrridden
// error out if not overridden
throw new InvalidAlgorithmParameterException(usoe);
}
}
@@ -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 Object clone()

/**
* 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 Object clone()

/**
* 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
@@ -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 @@ public long until(Temporal endExclusive, TemporalUnit unit) {
* <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

0 comments on commit 17ff85d

Please sign in to comment.