diff --git a/src/java.base/share/classes/java/io/CharArrayReader.java b/src/java.base/share/classes/java/io/CharArrayReader.java index 1277248399d..826e7993e38 100644 --- a/src/java.base/share/classes/java/io/CharArrayReader.java +++ b/src/java.base/share/classes/java/io/CharArrayReader.java @@ -46,7 +46,7 @@ public class CharArrayReader extends Reader { protected int markedPos = 0; /** - * The index of the end of this buffer. There is not valid + * The index of the end of this buffer. There is no valid * data at or beyond this index. */ protected int count; diff --git a/src/java.base/share/classes/java/io/CharArrayWriter.java b/src/java.base/share/classes/java/io/CharArrayWriter.java index a6091388c0a..20ce11d8afd 100644 --- a/src/java.base/share/classes/java/io/CharArrayWriter.java +++ b/src/java.base/share/classes/java/io/CharArrayWriter.java @@ -28,7 +28,7 @@ package java.io; import java.util.Arrays; /** - * This class implements a character buffer that can be used as an Writer. + * This class implements a character buffer that can be used as a Writer. * The buffer automatically grows when data is written to the stream. The data * can be retrieved using toCharArray() and toString(). *

diff --git a/src/java.base/share/classes/java/io/File.java b/src/java.base/share/classes/java/io/File.java index 1e88890a4c5..d809ec5edc9 100644 --- a/src/java.base/share/classes/java/io/File.java +++ b/src/java.base/share/classes/java/io/File.java @@ -2022,7 +2022,7 @@ public class File } else { // Name exceeds the maximum path component length: shorten it - // Attempt to shorten the prefix length to no less then 3 + // Attempt to shorten the prefix length to no less than 3 prefixLength = shortenSubName(prefixLength, excess, 3); excess = prefixLength + nusLength + suffixLength - nameMax; diff --git a/src/java.base/share/classes/java/io/FileCleanable.java b/src/java.base/share/classes/java/io/FileCleanable.java index cef1ca8c20f..2e09efcaf81 100644 --- a/src/java.base/share/classes/java/io/FileCleanable.java +++ b/src/java.base/share/classes/java/io/FileCleanable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2021, 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 @@ -65,7 +65,7 @@ final class FileCleanable extends PhantomCleanable { * Register a Cleanable with the FileDescriptor * if the FileDescriptor is non-null and valid. * @implNote - * A exception (OutOfMemoryException) will leave the FileDescriptor + * An exception (OutOfMemoryException) will leave the FileDescriptor * having allocated resources and leak the fd/handle. * * @param fdo the FileDescriptor; may be null diff --git a/src/java.base/share/classes/java/io/ObjectInputStream.java b/src/java.base/share/classes/java/io/ObjectInputStream.java index edcda187d79..315df036949 100644 --- a/src/java.base/share/classes/java/io/ObjectInputStream.java +++ b/src/java.base/share/classes/java/io/ObjectInputStream.java @@ -879,14 +879,14 @@ public class ObjectInputStream * objects is disabled until enableResolveObject is called. The * enableResolveObject method checks that the stream requesting to resolve * object can be trusted. Every reference to serializable objects is passed - * to resolveObject. To insure that the private state of objects is not + * to resolveObject. To ensure that the private state of objects is not * unintentionally exposed only trusted streams may use resolveObject. * *

This method is called after an object has been read but before it is * returned from readObject. The default resolveObject method just returns * the same object. * - *

When a subclass is replacing objects it must insure that the + *

When a subclass is replacing objects it must ensure that the * substituted object is compatible with every field where the reference * will be stored. Objects whose type is not a subclass of the type of the * field or array element abort the deserialization by raising an exception diff --git a/src/java.base/share/classes/java/io/ObjectOutputStream.java b/src/java.base/share/classes/java/io/ObjectOutputStream.java index d647c0c0e65..a64186c7ed7 100644 --- a/src/java.base/share/classes/java/io/ObjectOutputStream.java +++ b/src/java.base/share/classes/java/io/ObjectOutputStream.java @@ -568,7 +568,7 @@ public class ObjectOutputStream * Object (as opposed to type Serializable) to allow for cases where * non-serializable objects are replaced by serializable ones. * - *

When a subclass is replacing objects it must insure that either a + *

When a subclass is replacing objects it must ensure that either a * complementary substitution must be made during deserialization or that * the substituted object is compatible with every field where the * reference will be stored. Objects whose type is not a subclass of the @@ -1419,7 +1419,7 @@ public class ObjectOutputStream } /** - * Writes representation of a "ordinary" (i.e., not a String, Class, + * Writes representation of an "ordinary" (i.e., not a String, Class, * ObjectStreamClass, array, or enum constant) serializable object to the * stream. */ diff --git a/src/java.base/share/classes/java/lang/AbstractStringBuilder.java b/src/java.base/share/classes/java/lang/AbstractStringBuilder.java index a2adf07d8a2..66c6c57d2d5 100644 --- a/src/java.base/share/classes/java/lang/AbstractStringBuilder.java +++ b/src/java.base/share/classes/java/lang/AbstractStringBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2021, 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 @@ -458,7 +458,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { * @param codePointOffset the offset in code points * @return the index within this sequence * @throws IndexOutOfBoundsException if {@code index} - * is negative or larger then the length of this sequence, + * is negative or larger than the length of this sequence, * or if {@code codePointOffset} is positive and the subsequence * starting with {@code index} has fewer than * {@code codePointOffset} code points, diff --git a/src/java.base/share/classes/java/lang/Character.java b/src/java.base/share/classes/java/lang/Character.java index 0ec08a60056..211dc631953 100644 --- a/src/java.base/share/classes/java/lang/Character.java +++ b/src/java.base/share/classes/java/lang/Character.java @@ -9313,7 +9313,7 @@ class Character implements java.io.Serializable, Comparable, Constabl * @return the index within the char sequence * @throws NullPointerException if {@code seq} is null. * @throws IndexOutOfBoundsException if {@code index} - * is negative or larger then the length of the char sequence, + * is negative or larger than the length of the char sequence, * or if {@code codePointOffset} is positive and the * subsequence starting with {@code index} has fewer than * {@code codePointOffset} code points, or if diff --git a/src/java.base/share/classes/java/lang/ClassLoader.java b/src/java.base/share/classes/java/lang/ClassLoader.java index 7ad0f619101..e1ad30f5b11 100644 --- a/src/java.base/share/classes/java/lang/ClassLoader.java +++ b/src/java.base/share/classes/java/lang/ClassLoader.java @@ -2247,7 +2247,7 @@ public abstract class ClassLoader { * for consistency with the existing {@link #getPackages} method. * * @return The array of {@code Package} objects that have been defined by - * this class loader; or an zero length array if no package has been + * this class loader; or a zero length array if no package has been * defined by this class loader. * * @jvms 5.3 Creation and Loading diff --git a/src/java.base/share/classes/java/lang/Process.java b/src/java.base/share/classes/java/lang/Process.java index a97fa689517..5fad1b889d5 100644 --- a/src/java.base/share/classes/java/lang/Process.java +++ b/src/java.base/share/classes/java/lang/Process.java @@ -440,7 +440,7 @@ public abstract class Process { * terminated and the timeout value is less than, or equal to, zero, then * this method returns immediately with the value {@code false}. * - *

The default implementation of this methods polls the {@code exitValue} + *

The default implementation of this method polls the {@code exitValue} * to check if the process has terminated. Concrete implementations of this * class are strongly encouraged to override this method with a more * efficient implementation. diff --git a/src/java.base/share/classes/java/lang/Throwable.java b/src/java.base/share/classes/java/lang/Throwable.java index 72948a36485..e66f1cecd6a 100644 --- a/src/java.base/share/classes/java/lang/Throwable.java +++ b/src/java.base/share/classes/java/lang/Throwable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2021, 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 @@ -862,7 +862,7 @@ public class Throwable implements Serializable { * @param stackTrace the stack trace elements to be associated with * this {@code Throwable}. The specified array is copied by this * call; changes in the specified array after the method invocation - * returns will have no affect on this {@code Throwable}'s stack + * returns will have no effect on this {@code Throwable}'s stack * trace. * * @throws NullPointerException if {@code stackTrace} is diff --git a/src/java.base/share/classes/java/lang/invoke/BootstrapCallInfo.java b/src/java.base/share/classes/java/lang/invoke/BootstrapCallInfo.java index 2ddcaad33a2..be2eb2808e4 100644 --- a/src/java.base/share/classes/java/lang/invoke/BootstrapCallInfo.java +++ b/src/java.base/share/classes/java/lang/invoke/BootstrapCallInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2021, 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 @@ -30,7 +30,7 @@ import java.lang.invoke.MethodHandles.Lookup; /** * An interface providing full static information about a particular * call to a - * bootstrap method of an + * bootstrap method of a * dynamic call site or dynamic constant. * This information includes the method itself, the associated * name and type, and any associated static arguments. diff --git a/src/java.base/share/classes/java/lang/invoke/MethodHandle.java b/src/java.base/share/classes/java/lang/invoke/MethodHandle.java index ccff95896da..ec910dbf8fe 100644 --- a/src/java.base/share/classes/java/lang/invoke/MethodHandle.java +++ b/src/java.base/share/classes/java/lang/invoke/MethodHandle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2021, 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 @@ -1399,7 +1399,7 @@ assertEquals("[123]", (String) longsToString.invokeExact((long)123)); * a new array of type {@code arrayType}, whose elements * comprise (in order) the replaced arguments. *

- * The caller type must provides as least enough arguments, + * The caller type must provide at least enough arguments, * and of the correct type, to satisfy the target's requirement for * positional arguments before the trailing array argument. * Thus, the caller must supply, at a minimum, {@code N-1} arguments, @@ -1493,7 +1493,7 @@ assertEquals("[three, thee, tee]", Arrays.toString((Object[])ls.get(0))); * array or a single element of an array to be collected. * Note that the dynamic type of the trailing argument has no * effect on this decision, only a comparison between the symbolic - * type descriptor of the call site and the type descriptor of the method handle.) + * type descriptor of the call site and the type descriptor of the method handle. * * @param arrayType often {@code Object[]}, the type of the array argument which will collect the arguments * @return a new method handle which can collect any number of trailing arguments @@ -1548,7 +1548,7 @@ assertEquals("[three, thee, tee]", Arrays.toString((Object[])ls.get(0))); * except that {@link #isVarargsCollector isVarargsCollector} * will be false. * The fixed-arity method handle may (or may not) be the - * a previous argument to {@code asVarargsCollector}. + * previous argument to {@code asVarargsCollector}. *

* Here is an example, of a list-making variable arity method handle: *

{@code
diff --git a/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java b/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java
index f48d370cebf..d0af20349c6 100644
--- a/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java
+++ b/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java
@@ -57,7 +57,7 @@ import java.util.Objects;
  *
  * 

The identity of a function object produced by deserializing the serialized * form is unpredictable, and therefore identity-sensitive operations (such as - * reference equality, object locking, and {@code System.identityHashCode()} may + * reference equality, object locking, and {@code System.identityHashCode()}) may * produce different results in different implementations, or even upon * different deserializations in the same implementation. * diff --git a/src/java.base/share/classes/java/lang/invoke/VarHandle.java b/src/java.base/share/classes/java/lang/invoke/VarHandle.java index 2f748f2db21..15dcf63b5c9 100644 --- a/src/java.base/share/classes/java/lang/invoke/VarHandle.java +++ b/src/java.base/share/classes/java/lang/invoke/VarHandle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2021, 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 @@ -382,7 +382,7 @@ import static java.lang.invoke.MethodHandleStatics.UNSAFE; * {@code invokevirtual} instruction is linked. *

* Apart from type descriptor checks, a VarHandles's capability to - * access it's variables is unrestricted. + * access its variables is unrestricted. * If a VarHandle is formed on a non-public variable by a class that has access * to that variable, the resulting VarHandle can be used in any place by any * caller who receives a reference to it. diff --git a/src/java.base/share/classes/java/net/ContentHandler.java b/src/java.base/share/classes/java/net/ContentHandler.java index 7030a0346e0..1a497ccbad6 100644 --- a/src/java.base/share/classes/java/net/ContentHandler.java +++ b/src/java.base/share/classes/java/net/ContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2021, 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 @@ -39,7 +39,7 @@ import java.io.IOException; * The application's content handler factory (an instance of a class that * implements the interface {@code ContentHandlerFactory} set up by a call to * {@link URLConnection#setContentHandlerFactory(ContentHandlerFactory) - * setContentHandlerFactory} is called with a {@code String} giving the + * setContentHandlerFactory}) is called with a {@code String} giving the * MIME type of the object being received on the socket. The factory returns an * instance of a subclass of {@code ContentHandler}, and its * {@code getContent} method is called to create the object. diff --git a/src/java.base/share/classes/java/net/CookieManager.java b/src/java.base/share/classes/java/net/CookieManager.java index 53ef4cab71c..adc405b9b81 100644 --- a/src/java.base/share/classes/java/net/CookieManager.java +++ b/src/java.base/share/classes/java/net/CookieManager.java @@ -169,7 +169,7 @@ public class CookieManager extends CookieHandler /** * To set the cookie policy of this cookie manager. * - *

A instance of {@code CookieManager} will have + *

An instance of {@code CookieManager} will have * cookie policy ACCEPT_ORIGINAL_SERVER by default. Users always * can call this method to set another cookie policy. * diff --git a/src/java.base/share/classes/java/net/DatagramSocket.java b/src/java.base/share/classes/java/net/DatagramSocket.java index 7797738f6a8..114794be1f9 100644 --- a/src/java.base/share/classes/java/net/DatagramSocket.java +++ b/src/java.base/share/classes/java/net/DatagramSocket.java @@ -1376,7 +1376,7 @@ public class DatagramSocket implements java.io.Closeable { * {@code java.net.MulticastSocket}. * @return {@code null} if {@code bindaddr == NO_DELEGATE}, otherwise returns a * delegate for the requested {@code type}. - * @throws SocketException if an exception occurs while creating or binding the + * @throws SocketException if an exception occurs while creating or binding * the delegate. */ static T createDelegate(SocketAddress bindaddr, Class type) diff --git a/src/java.base/share/classes/java/net/HttpCookie.java b/src/java.base/share/classes/java/net/HttpCookie.java index 74c1c6dc693..dd8ae13914d 100644 --- a/src/java.base/share/classes/java/net/HttpCookie.java +++ b/src/java.base/share/classes/java/net/HttpCookie.java @@ -474,7 +474,7 @@ public final class HttpCookie implements Cloneable { /** * Returns {@code true} if sending this cookie should be restricted to a - * secure protocol, or {@code false} if the it can be sent using any + * secure protocol, or {@code false} if it can be sent using any * protocol. * * @return {@code false} if the cookie can be sent over any standard diff --git a/src/java.base/share/classes/java/net/Inet4Address.java b/src/java.base/share/classes/java/net/Inet4Address.java index a504f4f398c..921818c4525 100644 --- a/src/java.base/share/classes/java/net/Inet4Address.java +++ b/src/java.base/share/classes/java/net/Inet4Address.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2021, 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 @@ -186,7 +186,7 @@ class Inet4Address extends InetAddress { } /** - * Utility routine to check if the InetAddress is an link local address. + * Utility routine to check if the InetAddress is a link local address. * * @return a {@code boolean} indicating if the InetAddress is * a link local address; or false if address is not a link local unicast address. diff --git a/src/java.base/share/classes/java/net/Inet6Address.java b/src/java.base/share/classes/java/net/Inet6Address.java index 4943362a5fb..bbb31b45241 100644 --- a/src/java.base/share/classes/java/net/Inet6Address.java +++ b/src/java.base/share/classes/java/net/Inet6Address.java @@ -710,7 +710,7 @@ class Inet6Address extends InetAddress { } /** - * Utility routine to check if the InetAddress is an link local address. + * Utility routine to check if the InetAddress is a link local address. * * @return a {@code boolean} indicating if the InetAddress is a link local * address; or false if address is not a link local unicast address. diff --git a/src/java.base/share/classes/java/net/InetAddress.java b/src/java.base/share/classes/java/net/InetAddress.java index 548496f0a57..a0189aa6ae9 100644 --- a/src/java.base/share/classes/java/net/InetAddress.java +++ b/src/java.base/share/classes/java/net/InetAddress.java @@ -400,7 +400,7 @@ public class InetAddress implements java.io.Serializable { } /** - * Utility routine to check if the InetAddress is an link local address. + * Utility routine to check if the InetAddress is a link local address. * * @return a {@code boolean} indicating if the InetAddress is * a link local address; or false if address is not a link local unicast address. @@ -486,7 +486,7 @@ public class InetAddress implements java.io.Serializable { /** * Test whether that address is reachable. Best effort is made by the * implementation to try to reach the host, but firewalls and server - * configuration may block requests resulting in a unreachable status + * configuration may block requests resulting in an unreachable status * while some specific ports may be accessible. * A typical implementation will use ICMP ECHO REQUESTs if the * privilege can be obtained, otherwise it will try to establish diff --git a/src/java.base/share/classes/java/net/Proxy.java b/src/java.base/share/classes/java/net/Proxy.java index eef964038b6..448c9290b1c 100644 --- a/src/java.base/share/classes/java/net/Proxy.java +++ b/src/java.base/share/classes/java/net/Proxy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2021, 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 @@ -108,7 +108,7 @@ public class Proxy { /** * Returns the socket address of the proxy, or - * {@code null} if its a direct connection. + * {@code null} if it's a direct connection. * * @return a {@code SocketAddress} representing the socket end * point of the proxy diff --git a/src/java.base/share/classes/java/net/ProxySelector.java b/src/java.base/share/classes/java/net/ProxySelector.java index 5ce5cdbc5eb..b9b800a5328 100644 --- a/src/java.base/share/classes/java/net/ProxySelector.java +++ b/src/java.base/share/classes/java/net/ProxySelector.java @@ -132,7 +132,7 @@ public abstract class ProxySelector { * Selects all the applicable proxies based on the protocol to * access the resource with and a destination address to access * the resource at. - * The format of the URI is defined as follow: + * The format of the URI is defined as follows: *