diff --git a/src/java.base/share/classes/java/io/CharArrayReader.java b/src/java.base/share/classes/java/io/CharArrayReader.java index 1277248399d7..826e7993e38f 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 a6091388c0ac..20ce11d8afd5 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 @@ 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 1e88890a4c5e..d809ec5edc99 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 @@ static File generateFile(String prefix, String suffix, File dir)
} 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 cef1ca8c20f9..2e09efcaf812 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 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 d647c0c0e652..a64186c7ed7f 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 @@ protected void annotateProxyClass(Class> cl) throws IOException {
* 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 @@ private void writeEnum(Enum> en,
}
/**
- * 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 a2adf07d8a2b..66c6c57d2d56 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 @@ public int codePointCount(int beginIndex, int endIndex) {
* @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 8f3b633f75a6..c863804bf081 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 @@ static int codePointCountImpl(char[] a, int offset, int count) {
* @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 7ad0f6191013..e1ad30f5b115 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 final Package getDefinedPackage(String name) {
* 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 a97fa689517f..5fad1b889d55 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 final BufferedWriter outputWriter(Charset charset) {
* 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 72948a36485c..e66f1cecd6ae 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 @@ private synchronized StackTraceElement[] getOurStackTrace() {
* @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 2ddcaad33a27..be2eb2808e4e 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 @@
/**
* 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 ccff95896da3..ec910dbf8fe3 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 @@ boolean asCollectorChecks(Class> arrayType, int pos, int arrayLength) {
* 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 @@ boolean asCollectorChecks(Class> arrayType, int pos, int arrayLength) {
* 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 @@ public boolean isVarargsCollector() {
* 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:
* 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 2f748f2db215..15dcf63b5c9b 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 @@
* {@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 7030a0346e08..1a497ccbad6b 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 @@
* 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 53ef4cab71c0..adc405b9b81b 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 CookieManager(CookieStore store,
/**
* 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 7797738f6a8a..114794be1f99 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 @@ private static SocketException toSocketException(IOException e) {
* {@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
* Check, in the following order:
* If an attribute of the given name already exists then its value is
- * replaced. If the attribute does not exist then it is created. If it
- * implementation specific if a test to check for the existence of the
+ * replaced. If the attribute does not exist then it is created. It
+ * is implementation specific if a test to check for the existence of the
* attribute and the creation of attribute are atomic with respect to other
* file system activities.
*
diff --git a/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java b/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java
index bc7866ed6215..965ab557253c 100644
--- a/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java
+++ b/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java
@@ -1129,7 +1129,7 @@ public abstract void checkAccess(Path path, AccessMode... modes)
* installed, its {@link SecurityManager#checkRead(String) checkRead}
* method denies read access to the file. If this method is invoked
* to read security sensitive attributes then the security manager
- * may be invoke to check for additional permissions.
+ * may be invoked to check for additional permissions.
*/
public abstract Map The means by which this method determines the file type is highly
* implementation specific. It may simply examine the file name, it may use
* a file attribute,
- * or it may examines bytes in the file.
+ * or it may examine bytes in the file.
*
* The probe result is the string form of the value of a
* Multipurpose Internet Mail Extension (MIME) content type as
diff --git a/src/java.base/share/classes/java/util/Currency.java b/src/java.base/share/classes/java/util/Currency.java
index 37bbe6157274..59b44afed06f 100644
--- a/src/java.base/share/classes/java/util/Currency.java
+++ b/src/java.base/share/classes/java/util/Currency.java
@@ -280,7 +280,7 @@ public Void run() {
/**
* Constructs a {@code Currency} instance. The constructor is private
- * so that we can insure that there's never more than one instance for a
+ * so that we can ensure that there's never more than one instance for a
* given currency.
*/
private Currency(String currencyCode, int defaultFractionDigits, int numericCode) {
diff --git a/src/java.base/share/classes/java/util/Properties.java b/src/java.base/share/classes/java/util/Properties.java
index 21b2982b82c8..333b75f45b00 100644
--- a/src/java.base/share/classes/java/util/Properties.java
+++ b/src/java.base/share/classes/java/util/Properties.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
@@ -265,7 +265,7 @@ public synchronized Object setProperty(String key, String value) {
* If a logical line is spread across several natural lines, the
* backslash escaping the line terminator sequence, the line
* terminator sequence, and any white space at the start of the
- * following line have no affect on the key or element values.
+ * following line have no effect on the key or element values.
* The remainder of the discussion of key and element parsing
* (when loading) will assume all the characters constituting
* the key and element appear on a single natural line after
{@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 f48d370cebfa..d0af20349c6d 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 @@
*
*
*
diff --git a/src/java.base/share/classes/java/nio/charset/CoderResult.java b/src/java.base/share/classes/java/nio/charset/CoderResult.java
index a260b5d3bba3..8bfbf9f54af5 100644
--- a/src/java.base/share/classes/java/nio/charset/CoderResult.java
+++ b/src/java.base/share/classes/java/nio/charset/CoderResult.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -263,7 +263,7 @@ public static CoderResult unmappableForLength(int length) {
*
* @throws UnmappableCharacterException
* If this object represents an unmappable-character error; the
- * exceptions length value will be that of this object
+ * exception's length value will be that of this object
*/
public void throwException()
throws CharacterCodingException
diff --git a/src/java.base/share/classes/java/nio/file/FileSystem.java b/src/java.base/share/classes/java/nio/file/FileSystem.java
index 27bca11922e1..ab6577187516 100644
--- a/src/java.base/share/classes/java/nio/file/FileSystem.java
+++ b/src/java.base/share/classes/java/nio/file/FileSystem.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -66,7 +66,7 @@
* directory. The {@link #getRootDirectories getRootDirectories} method may be
* used to iterate over the root directories in the file system. A file system
* is typically composed of one or more underlying {@link FileStore file-stores}
- * that provide the storage for the files. Theses file stores can also vary in
+ * that provide the storage for the files. These file stores can also vary in
* the features they support, and the file attributes or meta-data that
* they associate with files.
*
diff --git a/src/java.base/share/classes/java/nio/file/Files.java b/src/java.base/share/classes/java/nio/file/Files.java
index 6270f00be264..1ccddff9a642 100644
--- a/src/java.base/share/classes/java/nio/file/Files.java
+++ b/src/java.base/share/classes/java/nio/file/Files.java
@@ -1841,7 +1841,7 @@ public static