Skip to content

Commit

Permalink
8316038: Fix doc typos in java.io.Console and java.util.Scanner
Browse files Browse the repository at this point in the history
Reviewed-by: bpb, naoto, iris
  • Loading branch information
pavelrappo committed Sep 12, 2023
1 parent 9480078 commit f55e799
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/java.base/share/classes/java/io/Console.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ public PrintWriter writer() {
* For simple applications requiring only line-oriented reading, use
* {@link #readLine}.
* <p>
* The bulk read operations {@link java.io.Reader#read(char[]) read(char[]) },
* {@link java.io.Reader#read(char[], int, int) read(char[], int, int) } and
* The bulk read operations {@link java.io.Reader#read(char[]) read(char[])},
* {@link java.io.Reader#read(char[], int, int) read(char[], int, int)} and
* {@link java.io.Reader#read(java.nio.CharBuffer) read(java.nio.CharBuffer)}
* on the returned object will not read in characters beyond the line
* bound for each invocation, even if the destination buffer has space for
Expand All @@ -151,7 +151,7 @@ public Reader reader() {
*
* @param fmt
* A format string as described in <a
* href="../util/Formatter.html#syntax">Format string syntax</a>
* href="../util/Formatter.html#syntax">Format string syntax</a>.
*
* @param args
* Arguments referenced by the format specifiers in the format
Expand Down Expand Up @@ -306,7 +306,7 @@ public char[] readPassword(String fmt, Object ... args) {
}

/**
* Reads a password or passphrase from the console with echoing disabled
* Reads a password or passphrase from the console with echoing disabled.
*
* @throws IOError
* If an I/O error occurs.
Expand All @@ -321,7 +321,7 @@ public char[] readPassword() {

/**
* Flushes the console and forces any buffered output to be written
* immediately .
* immediately.
*/
public void flush() {
throw newUnsupportedOperationException();
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/classes/java/util/Scanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
*
* <p>The localized formats are defined in terms of the following parameters,
* which for a particular locale are taken from that locale's {@link
* java.text.DecimalFormat DecimalFormat} object, {@code df}, and its and
* java.text.DecimalFormat DecimalFormat} object, {@code df}, and its
* {@link java.text.DecimalFormatSymbols DecimalFormatSymbols} object,
* {@code dfs}.
*
Expand Down Expand Up @@ -1844,7 +1844,7 @@ public String findWithinHorizon(Pattern pattern, int horizon) {
* {@code NoSuchElementException} by using a pattern that can
* match nothing, e.g., {@code sc.skip("[ \t]*")}.
*
* @param pattern a string specifying the pattern to skip over
* @param pattern the pattern to skip over
* @return this scanner
* @throws NoSuchElementException if the specified pattern is not found
* @throws IllegalStateException if this scanner is closed
Expand Down

1 comment on commit f55e799

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.