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 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 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:
* 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
* 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 bc7866ed621..965ab557253 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 class FileSystemProvider {
* 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 37bbe615727..59b44afed06 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 final class Currency implements Serializable {
/**
* 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 21b2982b82c..333b75f45b0 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 class Properties extends Hashtable{@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;
*
*
*
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 a260b5d3bba..8bfbf9f54af 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 class CoderResult {
*
* @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 27bca11922e..ab657718751 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 @@ import java.io.IOException;
* 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 6270f00be26..1ccddff9a64 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 final class Files {
* installed, its {@link SecurityManager#checkRead(String) checkRead}
* method is invoked to check 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.
+ * security manager may be invoked to check for additional permissions.
*/
public static A readAttributes(Path path,
Class type,
@@ -2075,7 +2075,7 @@ public final class Files {
* 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 static Map