Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8273616: Fix trivial doc typos in the java.base module #5475

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -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;
@@ -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().
* <P>
@@ -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;

@@ -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<FileDescriptor> {
* 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
@@ -879,14 +879,14 @@ protected Class<?> resolveProxyClass(String[] interfaces)
* 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.
*
* <p>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.
*
* <p>When a subclass is replacing objects it must insure that the
* <p>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
@@ -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.
*
* <p>When a subclass is replacing objects it must insure that either a
* <p>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.
*/
@@ -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,
@@ -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
@@ -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
@@ -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}.
*
* <p>The default implementation of this methods polls the {@code exitValue}
* <p>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.
@@ -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
@@ -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
* <a href="package-summary.html#bsm">bootstrap method</a> of an
* <a href="package-summary.html#bsm">bootstrap method</a> of a
* dynamic call site or dynamic constant.
* This information includes the method itself, the associated
* name and type, and any associated static arguments.
@@ -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.
* <p>
* 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}.
* <p>
* Here is an example, of a list-making variable arity method handle:
* <blockquote><pre>{@code
@@ -57,7 +57,7 @@
*
* <p>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.
*
@@ -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.
* <p>
* 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.
@@ -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.
@@ -169,7 +169,7 @@ public CookieManager(CookieStore store,
/**
* To set the cookie policy of this cookie manager.
*
* <p> A instance of {@code CookieManager} will have
* <p> 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.
*
@@ -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 <T extends DatagramSocket> T createDelegate(SocketAddress bindaddr, Class<T> type)
@@ -474,7 +474,7 @@ public void setSecure(boolean flag) {

/**
* 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
@@ -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 @@ public boolean isLoopbackAddress() {
}

/**
* 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.
@@ -710,7 +710,7 @@ public boolean isLoopbackAddress() {
}

/**
* 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.
@@ -400,7 +400,7 @@ public boolean isLoopbackAddress() {
}

/**
* 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 boolean isMCOrgLocal() {
/**
* 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
@@ -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 Type type() {

/**
* 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
@@ -132,7 +132,7 @@ public static void setDefault(ProxySelector ps) {
* 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:
* <UL>
* <LI>http URI for http connections</LI>
* <LI>https URI for https connections
@@ -873,7 +873,7 @@ public boolean implies(Permission p) {

/**
* Checks if the incoming Permission's action are a proper subset of
* the this object's actions.
* this object's actions.
* <P>
* Check, in the following order:
* <ul>
@@ -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
@@ -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 <em>meta-data</em> that
* they associate with files.
*
@@ -1841,7 +1841,7 @@ public static <V extends FileAttributeView> V getFileAttributeView(Path path,
* 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 extends BasicFileAttributes> A readAttributes(Path path,
Class<A> type,
@@ -2075,7 +2075,7 @@ public static Object getAttribute(Path path, String attribute,
* 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<String,Object> readAttributes(Path path, String attributes,
LinkOption... options)