# HG changeset patch # User jboes # Date 1568974072 -3600 # Node ID 94bb65cb37d310e64e486a93d9e55ccb1cc2f8c6 # Parent 33de7752835c6dd2a6515fc1bbee640d8ec6d837 8230648: Replace @exception tag with @throws in java.base Summary: Minor coding style update of javadoc tag in any file in java.base Reviewed-by: prappo, lancea diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/BufferedInputStream.java --- a/src/java.base/share/classes/java/io/BufferedInputStream.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/BufferedInputStream.java Fri Sep 20 11:07:52 2019 +0100 @@ -192,7 +192,7 @@ * * @param in the underlying input stream. * @param size the buffer size. - * @exception IllegalArgumentException if {@code size <= 0}. + * @throws IllegalArgumentException if {@code size <= 0}. */ public BufferedInputStream(InputStream in, int size) { super(in); @@ -254,7 +254,7 @@ * * @return the next byte of data, or -1 if the end of the * stream is reached. - * @exception IOException if this input stream has been closed by + * @throws IOException if this input stream has been closed by * invoking its {@link #close()} method, * or an I/O error occurs. * @see java.io.FilterInputStream#in @@ -325,7 +325,7 @@ * @param len maximum number of bytes to read. * @return the number of bytes read, or -1 if the end of * the stream has been reached. - * @exception IOException if this input stream has been closed by + * @throws IOException if this input stream has been closed by * invoking its {@link #close()} method, * or an I/O error occurs. */ @@ -400,7 +400,7 @@ * * @return an estimate of the number of bytes that can be read (or skipped * over) from this input stream without blocking. - * @exception IOException if this input stream has been closed by + * @throws IOException if this input stream has been closed by * invoking its {@link #close()} method, * or an I/O error occurs. */ @@ -435,7 +435,7 @@ * is thrown. Otherwise, pos is * set equal to markpos. * - * @exception IOException if this stream has not been marked or, + * @throws IOException if this stream has not been marked or, * if the mark has been invalidated, or the stream * has been closed by invoking its {@link #close()} * method, or an I/O error occurs. @@ -470,7 +470,7 @@ * or skip() invocations will throw an IOException. * Closing a previously closed stream has no effect. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void close() throws IOException { byte[] buffer; diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/BufferedOutputStream.java --- a/src/java.base/share/classes/java/io/BufferedOutputStream.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/BufferedOutputStream.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2019, 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 @@ * * @param out the underlying output stream. * @param size the buffer size. - * @exception IllegalArgumentException if size <= 0. + * @throws IllegalArgumentException if size <= 0. */ public BufferedOutputStream(OutputStream out, int size) { super(out); @@ -87,7 +87,7 @@ * Writes the specified byte to this buffered output stream. * * @param b the byte to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ @Override public synchronized void write(int b) throws IOException { @@ -111,7 +111,7 @@ * @param b the data. * @param off the start offset in the data. * @param len the number of bytes to write. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ @Override public synchronized void write(byte b[], int off, int len) throws IOException { @@ -134,7 +134,7 @@ * Flushes this buffered output stream. This forces any buffered * output bytes to be written out to the underlying output stream. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterOutputStream#out */ @Override diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/BufferedReader.java --- a/src/java.base/share/classes/java/io/BufferedReader.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/BufferedReader.java Fri Sep 20 11:07:52 2019 +0100 @@ -95,7 +95,7 @@ * @param in A Reader * @param sz Input-buffer size * - * @exception IllegalArgumentException If {@code sz <= 0} + * @throws IllegalArgumentException If {@code sz <= 0} */ public BufferedReader(Reader in, int sz) { super(in); @@ -172,7 +172,7 @@ * @return The character read, as an integer in the range * 0 to 65535 ({@code 0x00-0xffff}), or -1 if the * end of the stream has been reached - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public int read() throws IOException { synchronized (lock) { @@ -271,8 +271,8 @@ * @return The number of characters read, or -1 if the end of the * stream has been reached * - * @exception IOException If an I/O error occurs - * @exception IndexOutOfBoundsException {@inheritDoc} + * @throws IOException If an I/O error occurs + * @throws IndexOutOfBoundsException {@inheritDoc} */ public int read(char cbuf[], int off, int len) throws IOException { synchronized (lock) { @@ -311,7 +311,7 @@ * * @see java.io.LineNumberReader#readLine() * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ String readLine(boolean ignoreLF, boolean[] term) throws IOException { StringBuffer s = null; @@ -388,7 +388,7 @@ * any line-termination characters, or null if the end of the * stream has been reached without reading any characters * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs * * @see java.nio.file.Files#readAllLines */ @@ -403,8 +403,8 @@ * * @return The number of characters actually skipped * - * @exception IllegalArgumentException If n is negative. - * @exception IOException If an I/O error occurs + * @throws IllegalArgumentException If n is negative. + * @throws IOException If an I/O error occurs */ public long skip(long n) throws IOException { if (n < 0L) { @@ -444,7 +444,7 @@ * stream is ready if the buffer is not empty, or if the underlying * character stream is ready. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public boolean ready() throws IOException { synchronized (lock) { @@ -491,8 +491,8 @@ * whose size is no smaller than limit. * Therefore large values should be used with care. * - * @exception IllegalArgumentException If {@code readAheadLimit < 0} - * @exception IOException If an I/O error occurs + * @throws IllegalArgumentException If {@code readAheadLimit < 0} + * @throws IOException If an I/O error occurs */ public void mark(int readAheadLimit) throws IOException { if (readAheadLimit < 0) { @@ -509,7 +509,7 @@ /** * Resets the stream to the most recent mark. * - * @exception IOException If the stream has never been marked, + * @throws IOException If the stream has never been marked, * or if the mark has been invalidated */ public void reset() throws IOException { diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/BufferedWriter.java --- a/src/java.base/share/classes/java/io/BufferedWriter.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/BufferedWriter.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, 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 @@ -89,7 +89,7 @@ * @param out A Writer * @param sz Output-buffer size, a positive integer * - * @exception IllegalArgumentException If {@code sz <= 0} + * @throws IllegalArgumentException If {@code sz <= 0} */ public BufferedWriter(Writer out, int sz) { super(out); @@ -125,7 +125,7 @@ /** * Writes a single character. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public void write(int c) throws IOException { synchronized (lock) { @@ -240,7 +240,7 @@ * system property {@code line.separator}, and is not necessarily a single * newline ('\n') character. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public void newLine() throws IOException { write(System.lineSeparator()); @@ -249,7 +249,7 @@ /** * Flushes the stream. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public void flush() throws IOException { synchronized (lock) { diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/CharArrayReader.java --- a/src/java.base/share/classes/java/io/CharArrayReader.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/CharArrayReader.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, 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 @@ -95,7 +95,7 @@ /** * Reads a single character. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public int read() throws IOException { synchronized (lock) { @@ -109,14 +109,14 @@ /** * Reads characters into a portion of an array. - * @param b Destination buffer - * @param off Offset at which to start storing characters - * @param len Maximum number of characters to read + * @param b Destination buffer + * @param off Offset at which to start storing characters + * @param len Maximum number of characters to read * @return The actual number of characters read, or -1 if * the end of the stream has been reached * - * @exception IOException If an I/O error occurs - * @exception IndexOutOfBoundsException {@inheritDoc} + * @throws IOException If an I/O error occurs + * @throws IndexOutOfBoundsException {@inheritDoc} */ public int read(char b[], int off, int len) throws IOException { synchronized (lock) { @@ -153,9 +153,9 @@ * an exception in this case. If n is negative, then * this method does nothing and returns 0. * - * @param n The number of characters to skip - * @return The number of characters actually skipped - * @exception IOException If the stream is closed, or an I/O error occurs + * @param n The number of characters to skip + * @return The number of characters actually skipped + * @throws IOException If the stream is closed, or an I/O error occurs */ public long skip(long n) throws IOException { synchronized (lock) { @@ -177,7 +177,7 @@ * Tells whether this stream is ready to be read. Character-array readers * are always ready to be read. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public boolean ready() throws IOException { synchronized (lock) { @@ -203,7 +203,7 @@ * there is no actual limit; hence this argument is * ignored. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public void mark(int readAheadLimit) throws IOException { synchronized (lock) { @@ -216,7 +216,7 @@ * Resets the stream to the most recent mark, or to the beginning if it has * never been marked. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public void reset() throws IOException { synchronized (lock) { diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/CharArrayWriter.java --- a/src/java.base/share/classes/java/io/CharArrayWriter.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/CharArrayWriter.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, 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 @@ -61,8 +61,8 @@ /** * Creates a new CharArrayWriter with the specified initial size. * - * @param initialSize an int specifying the initial buffer size. - * @exception IllegalArgumentException if initialSize is negative + * @param initialSize an int specifying the initial buffer size. + * @throws IllegalArgumentException if initialSize is negative */ public CharArrayWriter(int initialSize) { if (initialSize < 0) { diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/DataInput.java --- a/src/java.base/share/classes/java/io/DataInput.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/DataInput.java Fri Sep 20 11:07:52 2019 +0100 @@ -268,7 +268,7 @@ * * @param n the number of bytes to be skipped. * @return the number of bytes actually skipped. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ int skipBytes(int n) throws IOException; @@ -281,9 +281,9 @@ * method of interface {@code DataOutput}. * * @return the {@code boolean} value read. - * @exception EOFException if this stream reaches the end before reading + * @throws EOFException if this stream reaches the end before reading * all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ boolean readBoolean() throws IOException; @@ -297,9 +297,9 @@ * method of interface {@code DataOutput}. * * @return the 8-bit value read. - * @exception EOFException if this stream reaches the end before reading + * @throws EOFException if this stream reaches the end before reading * all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ byte readByte() throws IOException; @@ -317,9 +317,9 @@ * {@code 0} through {@code 255}. * * @return the unsigned 8-bit value read. - * @exception EOFException if this stream reaches the end before reading + * @throws EOFException if this stream reaches the end before reading * all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ int readUnsignedByte() throws IOException; @@ -338,9 +338,9 @@ * interface {@code DataOutput}. * * @return the 16-bit value read. - * @exception EOFException if this stream reaches the end before reading + * @throws EOFException if this stream reaches the end before reading * all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ short readShort() throws IOException; @@ -361,9 +361,9 @@ * {@code 0} through {@code 65535}. * * @return the unsigned 16-bit value read. - * @exception EOFException if this stream reaches the end before reading + * @throws EOFException if this stream reaches the end before reading * all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ int readUnsignedShort() throws IOException; @@ -381,9 +381,9 @@ * {@code DataOutput}. * * @return the {@code char} value read. - * @exception EOFException if this stream reaches the end before reading + * @throws EOFException if this stream reaches the end before reading * all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ char readChar() throws IOException; @@ -400,9 +400,9 @@ * method of interface {@code DataOutput}. * * @return the {@code int} value read. - * @exception EOFException if this stream reaches the end before reading + * @throws EOFException if this stream reaches the end before reading * all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ int readInt() throws IOException; @@ -427,9 +427,9 @@ * method of interface {@code DataOutput}. * * @return the {@code long} value read. - * @exception EOFException if this stream reaches the end before reading + * @throws EOFException if this stream reaches the end before reading * all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ long readLong() throws IOException; @@ -447,9 +447,9 @@ * method of interface {@code DataOutput}. * * @return the {@code float} value read. - * @exception EOFException if this stream reaches the end before reading + * @throws EOFException if this stream reaches the end before reading * all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ float readFloat() throws IOException; @@ -467,9 +467,9 @@ * method of interface {@code DataOutput}. * * @return the {@code double} value read. - * @exception EOFException if this stream reaches the end before reading + * @throws EOFException if this stream reaches the end before reading * all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ double readDouble() throws IOException; @@ -510,7 +510,7 @@ * @return the next line of text from the input stream, * or {@code null} if the end of file is * encountered before a byte can be read. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ String readLine() throws IOException; @@ -593,10 +593,10 @@ * may be used to write data that is suitable * for reading by this method. * @return a Unicode string. - * @exception EOFException if this stream reaches the end + * @throws EOFException if this stream reaches the end * before reading all the bytes. - * @exception IOException if an I/O error occurs. - * @exception UTFDataFormatException if the bytes do not represent a + * @throws IOException if an I/O error occurs. + * @throws UTFDataFormatException if the bytes do not represent a * valid modified UTF-8 encoding of a string. */ String readUTF() throws IOException; diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/DataInputStream.java --- a/src/java.base/share/classes/java/io/DataInputStream.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/DataInputStream.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2019, 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 @@ -89,10 +89,10 @@ * @return the total number of bytes read into the buffer, or * -1 if there is no more data because the end * of the stream has been reached. - * @exception IOException if the first byte cannot be read for any reason - * other than end of file, the stream has been closed and the underlying - * input stream does not support reading after close, or another I/O - * error occurs. + * @throws IOException if the first byte cannot be read for any reason + * other than end of file, the stream has been closed and the underlying + * input stream does not support reading after close, or another I/O + * error occurs. * @see java.io.FilterInputStream#in * @see java.io.InputStream#read(byte[], int, int) */ @@ -129,19 +129,19 @@ * b[b.length-1] are unaffected. * * @param b the buffer into which the data is read. - * @param off the start offset in the destination array b + * @param off the start offset in the destination array b * @param len the maximum number of bytes read. * @return the total number of bytes read into the buffer, or * -1 if there is no more data because the end * of the stream has been reached. - * @exception NullPointerException If b is null. - * @exception IndexOutOfBoundsException If off is negative, - * len is negative, or len is greater than - * b.length - off - * @exception IOException if the first byte cannot be read for any reason - * other than end of file, the stream has been closed and the underlying - * input stream does not support reading after close, or another I/O - * error occurs. + * @throws NullPointerException If b is null. + * @throws IndexOutOfBoundsException If off is negative, + * len is negative, or len is greater than + * b.length - off + * @throws IOException if the first byte cannot be read for any reason + * other than end of file, the stream has been closed and the underlying + * input stream does not support reading after close, or another I/O + * error occurs. * @see java.io.FilterInputStream#in * @see java.io.InputStream#read(byte[], int, int) */ @@ -181,13 +181,13 @@ * @param b the buffer into which the data is read. * @param off the start offset in the data array {@code b}. * @param len the number of bytes to read. - * @exception NullPointerException if {@code b} is {@code null}. - * @exception IndexOutOfBoundsException if {@code off} is negative, + * @throws NullPointerException if {@code b} is {@code null}. + * @throws IndexOutOfBoundsException if {@code off} is negative, * {@code len} is negative, or {@code len} is greater than * {@code b.length - off}. - * @exception EOFException if this input stream reaches the end before + * @throws EOFException if this input stream reaches the end before * reading all the bytes. - * @exception IOException the stream has been closed and the contained + * @throws IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.io.FilterInputStream#in @@ -213,7 +213,7 @@ * * @param n the number of bytes to be skipped. * @return the actual number of bytes skipped. - * @exception IOException if the contained input stream does not support + * @throws IOException if the contained input stream does not support * seek, or the stream has been closed and * the contained input stream does not support * reading after close, or another I/O error occurs. @@ -237,8 +237,8 @@ * input stream. * * @return the boolean value read. - * @exception EOFException if this input stream has reached the end. - * @exception IOException the stream has been closed and the contained + * @throws EOFException if this input stream has reached the end. + * @throws IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.io.FilterInputStream#in @@ -260,8 +260,8 @@ * * @return the next byte of this input stream as a signed 8-bit * byte. - * @exception EOFException if this input stream has reached the end. - * @exception IOException the stream has been closed and the contained + * @throws EOFException if this input stream has reached the end. + * @throws IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.io.FilterInputStream#in @@ -283,8 +283,8 @@ * * @return the next byte of this input stream, interpreted as an * unsigned 8-bit number. - * @exception EOFException if this input stream has reached the end. - * @exception IOException the stream has been closed and the contained + * @throws EOFException if this input stream has reached the end. + * @throws IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.io.FilterInputStream#in @@ -306,9 +306,9 @@ * * @return the next two bytes of this input stream, interpreted as a * signed 16-bit number. - * @exception EOFException if this input stream reaches the end before + * @throws EOFException if this input stream reaches the end before * reading two bytes. - * @exception IOException the stream has been closed and the contained + * @throws IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.io.FilterInputStream#in @@ -331,9 +331,9 @@ * * @return the next two bytes of this input stream, interpreted as an * unsigned 16-bit integer. - * @exception EOFException if this input stream reaches the end before + * @throws EOFException if this input stream reaches the end before * reading two bytes. - * @exception IOException the stream has been closed and the contained + * @throws IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.io.FilterInputStream#in @@ -356,9 +356,9 @@ * * @return the next two bytes of this input stream, interpreted as a * char. - * @exception EOFException if this input stream reaches the end before + * @throws EOFException if this input stream reaches the end before * reading two bytes. - * @exception IOException the stream has been closed and the contained + * @throws IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.io.FilterInputStream#in @@ -381,9 +381,9 @@ * * @return the next four bytes of this input stream, interpreted as an * int. - * @exception EOFException if this input stream reaches the end before + * @throws EOFException if this input stream reaches the end before * reading four bytes. - * @exception IOException the stream has been closed and the contained + * @throws IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.io.FilterInputStream#in @@ -410,9 +410,9 @@ * * @return the next eight bytes of this input stream, interpreted as a * long. - * @exception EOFException if this input stream reaches the end before + * @throws EOFException if this input stream reaches the end before * reading eight bytes. - * @exception IOException the stream has been closed and the contained + * @throws IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.io.FilterInputStream#in @@ -439,9 +439,9 @@ * * @return the next four bytes of this input stream, interpreted as a * float. - * @exception EOFException if this input stream reaches the end before + * @throws EOFException if this input stream reaches the end before * reading four bytes. - * @exception IOException the stream has been closed and the contained + * @throws IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.io.DataInputStream#readInt() @@ -461,9 +461,9 @@ * * @return the next eight bytes of this input stream, interpreted as a * double. - * @exception EOFException if this input stream reaches the end before + * @throws EOFException if this input stream reaches the end before * reading eight bytes. - * @exception IOException the stream has been closed and the contained + * @throws IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.io.DataInputStream#readLong() @@ -498,7 +498,7 @@ * * * @return the next line of text from this input stream. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.BufferedReader#readLine() * @see java.io.FilterInputStream#in */ @@ -556,12 +556,12 @@ * input stream. * * @return a Unicode string. - * @exception EOFException if this input stream reaches the end before + * @throws EOFException if this input stream reaches the end before * reading all the bytes. - * @exception IOException the stream has been closed and the contained + * @throws IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. - * @exception UTFDataFormatException if the bytes do not represent a valid + * @throws UTFDataFormatException if the bytes do not represent a valid * modified UTF-8 encoding of a string. * @see java.io.DataInputStream#readUTF(java.io.DataInput) */ @@ -581,12 +581,12 @@ * * @param in a data input stream. * @return a Unicode string. - * @exception EOFException if the input stream reaches the end + * @throws EOFException if the input stream reaches the end * before all the bytes. - * @exception IOException the stream has been closed and the contained + * @throws IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. - * @exception UTFDataFormatException if the bytes do not represent a + * @throws UTFDataFormatException if the bytes do not represent a * valid modified UTF-8 encoding of a Unicode string. * @see java.io.DataInputStream#readUnsignedShort() */ diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/DataOutputStream.java --- a/src/java.base/share/classes/java/io/DataOutputStream.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/DataOutputStream.java Fri Sep 20 11:07:52 2019 +0100 @@ -81,7 +81,7 @@ * Implements the write method of OutputStream. * * @param b the byte to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterOutputStream#out */ public synchronized void write(int b) throws IOException { @@ -98,7 +98,7 @@ * @param b the data. * @param off the start offset in the data. * @param len the number of bytes to write. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterOutputStream#out */ public synchronized void write(byte b[], int off, int len) @@ -115,7 +115,7 @@ * The flush method of DataOutputStream * calls the flush method of its underlying output stream. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterOutputStream#out * @see java.io.OutputStream#flush() */ @@ -132,7 +132,7 @@ * 1. * * @param v a boolean value to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterOutputStream#out */ public final void writeBoolean(boolean v) throws IOException { @@ -146,7 +146,7 @@ * written is incremented by 1. * * @param v a byte value to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterOutputStream#out */ public final void writeByte(int v) throws IOException { @@ -160,7 +160,7 @@ * written is incremented by 2. * * @param v a short to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterOutputStream#out */ public final void writeShort(int v) throws IOException { @@ -175,7 +175,7 @@ * counter written is incremented by 2. * * @param v a char value to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterOutputStream#out */ public final void writeChar(int v) throws IOException { @@ -190,7 +190,7 @@ * written is incremented by 4. * * @param v an int to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterOutputStream#out */ public final void writeInt(int v) throws IOException { @@ -209,7 +209,7 @@ * written is incremented by 8. * * @param v a long to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterOutputStream#out */ public final void writeLong(long v) throws IOException { @@ -234,7 +234,7 @@ * incremented by 4. * * @param v a float value to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterOutputStream#out * @see java.lang.Float#floatToIntBits(float) */ @@ -251,7 +251,7 @@ * incremented by 8. * * @param v a double value to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterOutputStream#out * @see java.lang.Double#doubleToLongBits(double) */ @@ -267,7 +267,7 @@ * length of s. * * @param s a string of bytes to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterOutputStream#out */ public final void writeBytes(String s) throws IOException { @@ -286,7 +286,7 @@ * the length of s. * * @param s a String value to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.DataOutputStream#writeChar(int) * @see java.io.FilterOutputStream#out */ diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/Externalizable.java --- a/src/java.base/share/classes/java/io/Externalizable.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/Externalizable.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, 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 @@ -76,8 +76,8 @@ * relate the element to a public/protected field and/or * method of this Externalizable class. * - * @param out the stream to write the object to - * @exception IOException Includes any I/O exceptions that may occur + * @param out the stream to write the object to + * @throws IOException Includes any I/O exceptions that may occur */ void writeExternal(ObjectOutput out) throws IOException; @@ -88,10 +88,10 @@ * readExternal method must read the values in the same sequence * and with the same types as were written by writeExternal. * - * @param in the stream to read data from in order to restore the object - * @exception IOException if I/O errors occur - * @exception ClassNotFoundException If the class for an object being - * restored cannot be found. + * @param in the stream to read data from in order to restore the object + * @throws IOException if I/O errors occur + * @throws ClassNotFoundException If the class for an object being + * restored cannot be found. */ void readExternal(ObjectInput in) throws IOException, ClassNotFoundException; } diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/FileDescriptor.java --- a/src/java.base/share/classes/java/io/FileDescriptor.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/FileDescriptor.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2019, 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 @@ -199,7 +199,7 @@ * be flushed into the FileDescriptor (for example, by invoking * OutputStream.flush) before that data will be affected by sync. * - * @exception SyncFailedException + * @throws SyncFailedException * Thrown when the buffers cannot be flushed, * or because the system cannot guarantee that all the * buffers have been synchronized with physical media. diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/FileInputStream.java --- a/src/java.base/share/classes/java/io/FileInputStream.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/FileInputStream.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2019, 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 @@ -97,13 +97,13 @@ * FileNotFoundException is thrown. * * @param name the system-dependent file name. - * @exception FileNotFoundException if the file does not exist, - * is a directory rather than a regular file, - * or for some other reason cannot be opened for - * reading. - * @exception SecurityException if a security manager exists and its - * checkRead method denies read access - * to the file. + * @throws FileNotFoundException if the file does not exist, + * is a directory rather than a regular file, + * or for some other reason cannot be opened for + * reading. + * @throws SecurityException if a security manager exists and its + * checkRead method denies read access + * to the file. * @see java.lang.SecurityManager#checkRead(java.lang.String) */ public FileInputStream(String name) throws FileNotFoundException { @@ -128,12 +128,12 @@ * FileNotFoundException is thrown. * * @param file the file to be opened for reading. - * @exception FileNotFoundException if the file does not exist, - * is a directory rather than a regular file, - * or for some other reason cannot be opened for - * reading. - * @exception SecurityException if a security manager exists and its - * checkRead method denies read access to the file. + * @throws FileNotFoundException if the file does not exist, + * is a directory rather than a regular file, + * or for some other reason cannot be opened for + * reading. + * @throws SecurityException if a security manager exists and its + * checkRead method denies read access to the file. * @see java.io.File#getPath() * @see java.lang.SecurityManager#checkRead(java.lang.String) */ @@ -176,8 +176,8 @@ * * @param fdObj the file descriptor to be opened for reading. * @throws SecurityException if a security manager exists and its - * checkRead method denies read access to the - * file descriptor. + * checkRead method denies read access to the + * file descriptor. * @see SecurityManager#checkRead(java.io.FileDescriptor) */ public FileInputStream(FileDescriptor fdObj) { @@ -219,7 +219,7 @@ * * @return the next byte of data, or -1 if the end of the * file is reached. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public int read() throws IOException { return read0(); @@ -229,10 +229,10 @@ /** * Reads a subarray as a sequence of bytes. - * @param b the data to be written - * @param off the start offset in the data - * @param len the number of bytes that are written - * @exception IOException If an I/O error has occurred. + * @param b the data to be written + * @param off the start offset in the data + * @param len the number of bytes that are written + * @throws IOException If an I/O error has occurred. */ private native int readBytes(byte b[], int off, int len) throws IOException; @@ -245,7 +245,7 @@ * @return the total number of bytes read into the buffer, or * -1 if there is no more data because the end of * the file has been reached. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public int read(byte b[]) throws IOException { return readBytes(b, 0, b.length); @@ -263,11 +263,11 @@ * @return the total number of bytes read into the buffer, or * -1 if there is no more data because the end of * the file has been reached. - * @exception NullPointerException If b is null. - * @exception IndexOutOfBoundsException If off is negative, - * len is negative, or len is greater than - * b.length - off - * @exception IOException if an I/O error occurs. + * @throws NullPointerException If b is null. + * @throws IndexOutOfBoundsException If off is negative, + * len is negative, or len is greater than + * b.length - off + * @throws IOException if an I/O error occurs. */ public int read(byte b[], int off, int len) throws IOException { return readBytes(b, off, len); @@ -294,7 +294,7 @@ * * @param n the number of bytes to be skipped. * @return the actual number of bytes skipped. - * @exception IOException if n is negative, if the stream does not + * @throws IOException if n is negative, if the stream does not * support seek, or if an I/O error occurs. */ public long skip(long n) throws IOException { @@ -317,7 +317,7 @@ * * @return an estimate of the number of remaining bytes that can be read * (or skipped over) from this input stream without blocking. - * @exception IOException if this file input stream has been closed by calling + * @throws IOException if this file input stream has been closed by calling * {@code close} or an I/O error occurs. */ public int available() throws IOException { @@ -341,7 +341,7 @@ * If cleanup of native resources is needed, other mechanisms such as * {@linkplain java.lang.ref.Cleaner} should be used. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * * @revised 1.4 * @spec JSR-51 @@ -378,7 +378,7 @@ * used by this FileInputStream. * * @return the file descriptor object associated with this stream. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FileDescriptor */ public final FileDescriptor getFD() throws IOException { diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/FileOutputStream.java --- a/src/java.base/share/classes/java/io/FileOutputStream.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/FileOutputStream.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2019, 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 @@ -112,10 +112,10 @@ * new FileOutputStream(name, false)}. * * @param name the system-dependent filename - * @exception FileNotFoundException if the file exists but is a directory + * @throws FileNotFoundException if the file exists but is a directory * rather than a regular file, does not exist but cannot * be created, or cannot be opened for any other reason - * @exception SecurityException if a security manager exists and its + * @throws SecurityException if a security manager exists and its * checkWrite method denies write access * to the file. * @see java.lang.SecurityManager#checkWrite(java.lang.String) @@ -141,10 +141,10 @@ * @param name the system-dependent file name * @param append if true, then bytes will be written * to the end of the file rather than the beginning - * @exception FileNotFoundException if the file exists but is a directory + * @throws FileNotFoundException if the file exists but is a directory * rather than a regular file, does not exist but cannot * be created, or cannot be opened for any other reason. - * @exception SecurityException if a security manager exists and its + * @throws SecurityException if a security manager exists and its * checkWrite method denies write access * to the file. * @see java.lang.SecurityManager#checkWrite(java.lang.String) @@ -171,10 +171,10 @@ * reason then a FileNotFoundException is thrown. * * @param file the file to be opened for writing. - * @exception FileNotFoundException if the file exists but is a directory + * @throws FileNotFoundException if the file exists but is a directory * rather than a regular file, does not exist but cannot * be created, or cannot be opened for any other reason - * @exception SecurityException if a security manager exists and its + * @throws SecurityException if a security manager exists and its * checkWrite method denies write access * to the file. * @see java.io.File#getPath() @@ -203,10 +203,10 @@ * @param file the file to be opened for writing. * @param append if true, then bytes will be written * to the end of the file rather than the beginning - * @exception FileNotFoundException if the file exists but is a directory + * @throws FileNotFoundException if the file exists but is a directory * rather than a regular file, does not exist but cannot * be created, or cannot be opened for any other reason - * @exception SecurityException if a security manager exists and its + * @throws SecurityException if a security manager exists and its * checkWrite method denies write access * to the file. * @see java.io.File#getPath() @@ -254,7 +254,7 @@ * I/O on the stream, an IOException is thrown. * * @param fdObj the file descriptor to be opened for writing - * @exception SecurityException if a security manager exists and its + * @throws SecurityException if a security manager exists and its * checkWrite method denies * write access to the file descriptor * @see java.lang.SecurityManager#checkWrite(java.io.FileDescriptor) @@ -306,7 +306,7 @@ * the write method of OutputStream. * * @param b the byte to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void write(int b) throws IOException { write(b, fdAccess.getAppend(fd)); @@ -319,7 +319,7 @@ * @param len the number of bytes that are written * @param append {@code true} to first advance the position to the * end of file - * @exception IOException If an I/O error has occurred. + * @throws IOException If an I/O error has occurred. */ private native void writeBytes(byte b[], int off, int len, boolean append) throws IOException; @@ -329,7 +329,7 @@ * to this file output stream. * * @param b the data. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void write(byte b[]) throws IOException { writeBytes(b, 0, b.length, fdAccess.getAppend(fd)); @@ -342,7 +342,7 @@ * @param b the data. * @param off the start offset in the data. * @param len the number of bytes to write. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void write(byte b[], int off, int len) throws IOException { writeBytes(b, off, len, fdAccess.getAppend(fd)); @@ -364,7 +364,7 @@ * If cleanup of native resources is needed, other mechanisms such as * {@linkplain java.lang.ref.Cleaner} should be used. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * * @revised 1.4 * @spec JSR-51 @@ -401,7 +401,7 @@ * the connection to the file in the file system being used * by this FileOutputStream object. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FileDescriptor */ public final FileDescriptor getFD() throws IOException { diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/FilePermission.java --- a/src/java.base/share/classes/java/io/FilePermission.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/FilePermission.java Fri Sep 20 11:07:52 2019 +0100 @@ -1127,10 +1127,10 @@ * * @param permission the Permission object to add. * - * @exception IllegalArgumentException - if the permission is not a + * @throws IllegalArgumentException - if the permission is not a * FilePermission * - * @exception SecurityException - if this FilePermissionCollection object + * @throws SecurityException - if this FilePermissionCollection object * has been marked readonly */ @Override diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/FileReader.java --- a/src/java.base/share/classes/java/io/FileReader.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/FileReader.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, 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 @@ -50,11 +50,11 @@ * using the platform's * {@linkplain java.nio.charset.Charset#defaultCharset() default charset}. * - * @param fileName the name of the file to read - * @exception FileNotFoundException if the named file does not exist, - * is a directory rather than a regular file, - * or for some other reason cannot be opened for - * reading. + * @param fileName the name of the file to read + * @throws FileNotFoundException if the named file does not exist, + * is a directory rather than a regular file, + * or for some other reason cannot be opened for + * reading. */ public FileReader(String fileName) throws FileNotFoundException { super(new FileInputStream(fileName)); @@ -65,11 +65,11 @@ * using the platform's * {@linkplain java.nio.charset.Charset#defaultCharset() default charset}. * - * @param file the {@code File} to read - * @exception FileNotFoundException if the file does not exist, - * is a directory rather than a regular file, - * or for some other reason cannot be opened for - * reading. + * @param file the {@code File} to read + * @throws FileNotFoundException if the file does not exist, + * is a directory rather than a regular file, + * or for some other reason cannot be opened for + * reading. */ public FileReader(File file) throws FileNotFoundException { super(new FileInputStream(file)); @@ -90,12 +90,12 @@ * Creates a new {@code FileReader}, given the name of the file to read * and the {@linkplain java.nio.charset.Charset charset}. * - * @param fileName the name of the file to read - * @param charset the {@linkplain java.nio.charset.Charset charset} - * @exception IOException if the named file does not exist, - * is a directory rather than a regular file, - * or for some other reason cannot be opened for - * reading. + * @param fileName the name of the file to read + * @param charset the {@linkplain java.nio.charset.Charset charset} + * @throws IOException if the named file does not exist, + * is a directory rather than a regular file, + * or for some other reason cannot be opened for + * reading. * * @since 11 */ @@ -107,12 +107,12 @@ * Creates a new {@code FileReader}, given the {@code File} to read and * the {@linkplain java.nio.charset.Charset charset}. * - * @param file the {@code File} to read - * @param charset the {@linkplain java.nio.charset.Charset charset} - * @exception IOException if the file does not exist, - * is a directory rather than a regular file, - * or for some other reason cannot be opened for - * reading. + * @param file the {@code File} to read + * @param charset the {@linkplain java.nio.charset.Charset charset} + * @throws IOException if the file does not exist, + * is a directory rather than a regular file, + * or for some other reason cannot be opened for + * reading. * * @since 11 */ diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/FilterInputStream.java --- a/src/java.base/share/classes/java/io/FilterInputStream.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/FilterInputStream.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2019, 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 @@ -76,7 +76,7 @@ * * @return the next byte of data, or -1 if the end of the * stream is reached. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterInputStream#in */ public int read() throws IOException { @@ -100,7 +100,7 @@ * @return the total number of bytes read into the buffer, or * -1 if there is no more data because the end of * the stream has been reached. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterInputStream#read(byte[], int, int) */ public int read(byte b[]) throws IOException { @@ -122,11 +122,11 @@ * @return the total number of bytes read into the buffer, or * -1 if there is no more data because the end of * the stream has been reached. - * @exception NullPointerException If b is null. - * @exception IndexOutOfBoundsException If off is negative, - * len is negative, or len is greater than - * b.length - off - * @exception IOException if an I/O error occurs. + * @throws NullPointerException If b is null. + * @throws IndexOutOfBoundsException If off is negative, + * len is negative, or len is greater than + * b.length - off + * @throws IOException if an I/O error occurs. * @see java.io.FilterInputStream#in */ public int read(byte b[], int off, int len) throws IOException { @@ -161,7 +161,7 @@ * * @return an estimate of the number of bytes that can be read (or skipped * over) from this input stream without blocking. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public int available() throws IOException { return in.available(); @@ -173,7 +173,7 @@ * This * method simply performs in.close(). * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterInputStream#in */ public void close() throws IOException { @@ -216,7 +216,7 @@ * If this happens within readlimit bytes, it allows the outer * code to reset the stream and try another parser. * - * @exception IOException if the stream has not been marked or if the + * @throws IOException if the stream has not been marked or if the * mark has been invalidated. * @see java.io.FilterInputStream#in * @see java.io.FilterInputStream#mark(int) diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/FilterOutputStream.java --- a/src/java.base/share/classes/java/io/FilterOutputStream.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/FilterOutputStream.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2019, 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 @@ -80,7 +80,7 @@ * Implements the abstract {@code write} method of {@code OutputStream}. * * @param b the byte. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ @Override public void write(int b) throws IOException { @@ -100,7 +100,7 @@ * the single argument b. * * @param b the data to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterOutputStream#write(byte[], int, int) */ @Override @@ -125,7 +125,7 @@ * @param b the data. * @param off the start offset in the data. * @param len the number of bytes to write. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterOutputStream#write(int) */ @Override @@ -145,7 +145,7 @@ * The flush method of FilterOutputStream * calls the flush method of its underlying output stream. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterOutputStream#out */ @Override @@ -161,7 +161,7 @@ * FilterOutputStream} calls its {@code flush} method, and then * calls the {@code close} method of its underlying output stream. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterOutputStream#flush() * @see java.io.FilterOutputStream#out */ diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/FilterReader.java --- a/src/java.base/share/classes/java/io/FilterReader.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/FilterReader.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, 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 @@ -59,7 +59,7 @@ /** * Reads a single character. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public int read() throws IOException { return in.read(); @@ -68,8 +68,8 @@ /** * Reads characters into a portion of an array. * - * @exception IOException If an I/O error occurs - * @exception IndexOutOfBoundsException {@inheritDoc} + * @throws IOException If an I/O error occurs + * @throws IndexOutOfBoundsException {@inheritDoc} */ public int read(char cbuf[], int off, int len) throws IOException { return in.read(cbuf, off, len); @@ -78,7 +78,7 @@ /** * Skips characters. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public long skip(long n) throws IOException { return in.skip(n); @@ -87,7 +87,7 @@ /** * Tells whether this stream is ready to be read. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public boolean ready() throws IOException { return in.ready(); @@ -103,7 +103,7 @@ /** * Marks the present position in the stream. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public void mark(int readAheadLimit) throws IOException { in.mark(readAheadLimit); @@ -112,7 +112,7 @@ /** * Resets the stream. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public void reset() throws IOException { in.reset(); diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/FilterWriter.java --- a/src/java.base/share/classes/java/io/FilterWriter.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/FilterWriter.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, 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 @@ -59,7 +59,7 @@ /** * Writes a single character. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public void write(int c) throws IOException { out.write(c); @@ -104,7 +104,7 @@ /** * Flushes the stream. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public void flush() throws IOException { out.flush(); diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/InputStream.java --- a/src/java.base/share/classes/java/io/InputStream.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/InputStream.java Fri Sep 20 11:07:52 2019 +0100 @@ -177,7 +177,7 @@ * * @return the next byte of data, or -1 if the end of the * stream is reached. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public abstract int read() throws IOException; @@ -208,10 +208,10 @@ * @return the total number of bytes read into the buffer, or * -1 if there is no more data because the end of * the stream has been reached. - * @exception IOException If the first byte cannot be read for any reason - * other than the end of the file, if the input stream has been closed, or - * if some other I/O error occurs. - * @exception NullPointerException if b is null. + * @throws IOException If the first byte cannot be read for any reason + * other than the end of the file, if the input stream has been + * closed, or if some other I/O error occurs. + * @throws NullPointerException if b is null. * @see java.io.InputStream#read(byte[], int, int) */ public int read(byte b[]) throws IOException { @@ -266,13 +266,13 @@ * @return the total number of bytes read into the buffer, or * -1 if there is no more data because the end of * the stream has been reached. - * @exception IOException If the first byte cannot be read for any reason - * other than end of file, or if the input stream has been closed, or if - * some other I/O error occurs. - * @exception NullPointerException If b is null. - * @exception IndexOutOfBoundsException If off is negative, - * len is negative, or len is greater than - * b.length - off + * @throws IOException If the first byte cannot be read for any reason + * other than end of file, or if the input stream has been closed, + * or if some other I/O error occurs. + * @throws NullPointerException If b is null. + * @throws IndexOutOfBoundsException If off is negative, + * len is negative, or len is greater than + * b.length - off * @see java.io.InputStream#read() */ public int read(byte b[], int off, int len) throws IOException { @@ -634,7 +634,7 @@ * @return an estimate of the number of bytes that can be read (or * skipped over) from this input stream without blocking or * {@code 0} when it reaches the end of the input stream. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public int available() throws IOException { return 0; @@ -647,7 +647,7 @@ *

The close method of InputStream does * nothing. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void close() throws IOException {} @@ -718,8 +718,8 @@ *

The method reset for class InputStream * does nothing except throw an IOException. * - * @exception IOException if this stream has not been marked or if the - * mark has been invalidated. + * @throws IOException if this stream has not been marked or if the + * mark has been invalidated. * @see java.io.InputStream#mark(int) * @see java.io.IOException */ diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/InputStreamReader.java --- a/src/java.base/share/classes/java/io/InputStreamReader.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/InputStreamReader.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, 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 @@ -88,7 +88,7 @@ * The name of a supported * {@link java.nio.charset.Charset charset} * - * @exception UnsupportedEncodingException + * @throws UnsupportedEncodingException * If the named charset is not supported */ public InputStreamReader(InputStream in, String charsetName) @@ -162,7 +162,7 @@ * @return The character read, or -1 if the end of the stream has been * reached * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public int read() throws IOException { return sd.read(); @@ -178,8 +178,8 @@ * @return The number of characters read, or -1 if the end of the * stream has been reached * - * @exception IOException If an I/O error occurs - * @exception IndexOutOfBoundsException {@inheritDoc} + * @throws IOException If an I/O error occurs + * @throws IndexOutOfBoundsException {@inheritDoc} */ public int read(char cbuf[], int offset, int length) throws IOException { return sd.read(cbuf, offset, length); @@ -190,7 +190,7 @@ * ready if its input buffer is not empty, or if bytes are available to be * read from the underlying byte stream. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public boolean ready() throws IOException { return sd.ready(); diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/LineNumberInputStream.java --- a/src/java.base/share/classes/java/io/LineNumberInputStream.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/LineNumberInputStream.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2019, 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 @@ -83,7 +83,7 @@ * * @return the next byte of data, or {@code -1} if the end of this * stream is reached. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterInputStream#in * @see java.io.LineNumberInputStream#getLineNumber() */ @@ -124,7 +124,7 @@ * @return the total number of bytes read into the buffer, or * {@code -1} if there is no more data because the end of * this stream has been reached. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.LineNumberInputStream#read() */ public int read(byte b[], int off, int len) throws IOException { @@ -173,7 +173,7 @@ * * @param n the number of bytes to be skipped. * @return the actual number of bytes skipped. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterInputStream#in */ public long skip(long n) throws IOException { @@ -234,7 +234,7 @@ * * @return the number of bytes that can be read from this input stream * without blocking. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterInputStream#in */ public int available() throws IOException { @@ -281,7 +281,7 @@ * which, if it happens within readlimit bytes, allows the outer * code to reset the stream and try another parser. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FilterInputStream#in * @see java.io.LineNumberInputStream#mark(int) */ diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/ObjectInput.java --- a/src/java.base/share/classes/java/io/ObjectInput.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/ObjectInput.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, 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 @@ -41,11 +41,11 @@ * Read and return an object. The class that implements this interface * defines where the object is "read" from. * - * @return the object read from the stream - * @exception java.lang.ClassNotFoundException If the class of a serialized - * object cannot be found. - * @exception IOException If any of the usual Input/Output - * related exceptions occur. + * @return the object read from the stream + * @throws java.lang.ClassNotFoundException If the class of a serialized + * object cannot be found. + * @throws IOException If any of the usual Input/Output + * related exceptions occur. */ public Object readObject() throws ClassNotFoundException, IOException; @@ -55,45 +55,45 @@ * available. * @return the byte read, or -1 if the end of the * stream is reached. - * @exception IOException If an I/O error has occurred. + * @throws IOException If an I/O error has occurred. */ public int read() throws IOException; /** * Reads into an array of bytes. This method will * block until some input is available. - * @param b the buffer into which the data is read + * @param b the buffer into which the data is read * @return the actual number of bytes read, -1 is * returned when the end of the stream is reached. - * @exception IOException If an I/O error has occurred. + * @throws IOException If an I/O error has occurred. */ public int read(byte b[]) throws IOException; /** * Reads into an array of bytes. This method will * block until some input is available. - * @param b the buffer into which the data is read - * @param off the start offset of the data - * @param len the maximum number of bytes read + * @param b the buffer into which the data is read + * @param off the start offset of the data + * @param len the maximum number of bytes read * @return the actual number of bytes read, -1 is * returned when the end of the stream is reached. - * @exception IOException If an I/O error has occurred. + * @throws IOException If an I/O error has occurred. */ public int read(byte b[], int off, int len) throws IOException; /** * Skips n bytes of input. - * @param n the number of bytes to be skipped + * @param n the number of bytes to be skipped * @return the actual number of bytes skipped. - * @exception IOException If an I/O error has occurred. + * @throws IOException If an I/O error has occurred. */ public long skip(long n) throws IOException; /** * Returns the number of bytes that can be read * without blocking. - * @return the number of available bytes. - * @exception IOException If an I/O error has occurred. + * @return the number of available bytes. + * @throws IOException If an I/O error has occurred. */ public int available() throws IOException; @@ -101,7 +101,7 @@ * Closes the input stream. Must be called * to release any resources associated with * the stream. - * @exception IOException If an I/O error has occurred. + * @throws IOException If an I/O error has occurred. */ public void close() throws IOException; } diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/ObjectInputValidation.java --- a/src/java.base/share/classes/java/io/ObjectInputValidation.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/ObjectInputValidation.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, 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 @@ /** * Validates the object. * - * @exception InvalidObjectException If the object cannot validate itself. + * @throws InvalidObjectException If the object cannot validate itself. */ public void validateObject() throws InvalidObjectException; } diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/ObjectOutput.java --- a/src/java.base/share/classes/java/io/ObjectOutput.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/ObjectOutput.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, 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 @@ -42,8 +42,8 @@ * class that implements this interface defines how the object is * written. * - * @param obj the object to be written - * @exception IOException Any of the usual Input/Output related exceptions. + * @param obj the object to be written + * @throws IOException Any of the usual Input/Output related exceptions. */ public void writeObject(Object obj) throws IOException; @@ -51,32 +51,32 @@ /** * Writes a byte. This method will block until the byte is actually * written. - * @param b the byte - * @exception IOException If an I/O error has occurred. + * @param b the byte + * @throws IOException If an I/O error has occurred. */ public void write(int b) throws IOException; /** * Writes an array of bytes. This method will block until the bytes * are actually written. - * @param b the data to be written - * @exception IOException If an I/O error has occurred. + * @param b the data to be written + * @throws IOException If an I/O error has occurred. */ public void write(byte b[]) throws IOException; /** * Writes a sub array of bytes. - * @param b the data to be written - * @param off the start offset in the data - * @param len the number of bytes that are written - * @exception IOException If an I/O error has occurred. + * @param b the data to be written + * @param off the start offset in the data + * @param len the number of bytes that are written + * @throws IOException If an I/O error has occurred. */ public void write(byte b[], int off, int len) throws IOException; /** * Flushes the stream. This will write any buffered * output bytes. - * @exception IOException If an I/O error has occurred. + * @throws IOException If an I/O error has occurred. */ public void flush() throws IOException; @@ -84,7 +84,7 @@ * Closes the stream. This method must be called * to release any resources associated with the * stream. - * @exception IOException If an I/O error has occurred. + * @throws IOException If an I/O error has occurred. */ public void close() throws IOException; } diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/OutputStream.java --- a/src/java.base/share/classes/java/io/OutputStream.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/OutputStream.java Fri Sep 20 11:07:52 2019 +0100 @@ -107,7 +107,7 @@ * implementation for this method. * * @param b the byte. - * @exception IOException if an I/O error occurs. In particular, + * @throws IOException if an I/O error occurs. In particular, * an IOException may be thrown if the * output stream has been closed. */ @@ -120,7 +120,7 @@ * write(b, 0, b.length). * * @param b the data. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.OutputStream#write(byte[], int, int) */ public void write(byte b[]) throws IOException { @@ -151,7 +151,7 @@ * @param b the data. * @param off the start offset in the data. * @param len the number of bytes to write. - * @exception IOException if an I/O error occurs. In particular, + * @throws IOException if an I/O error occurs. In particular, * an IOException is thrown if the output * stream is closed. */ @@ -179,7 +179,7 @@ *

* The flush method of OutputStream does nothing. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void flush() throws IOException { } @@ -192,7 +192,7 @@ *

* The close method of OutputStream does nothing. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void close() throws IOException { } diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/OutputStreamWriter.java --- a/src/java.base/share/classes/java/io/OutputStreamWriter.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/OutputStreamWriter.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, 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 @@ -87,7 +87,7 @@ * The name of a supported * {@link java.nio.charset.Charset charset} * - * @exception UnsupportedEncodingException + * @throws UnsupportedEncodingException * If the named encoding is not supported */ public OutputStreamWriter(OutputStream out, String charsetName) @@ -187,7 +187,7 @@ /** * Writes a single character. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public void write(int c) throws IOException { se.write(c); @@ -248,7 +248,7 @@ /** * Flushes the stream. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public void flush() throws IOException { se.flush(); diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/PipedInputStream.java --- a/src/java.base/share/classes/java/io/PipedInputStream.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/PipedInputStream.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2019, 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 @@ -100,7 +100,7 @@ * as input from this stream. * * @param src the stream to connect to. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public PipedInputStream(PipedOutputStream src) throws IOException { this(src, DEFAULT_PIPE_SIZE); @@ -116,8 +116,8 @@ * * @param src the stream to connect to. * @param pipeSize the size of the pipe's buffer. - * @exception IOException if an I/O error occurs. - * @exception IllegalArgumentException if {@code pipeSize <= 0}. + * @throws IOException if an I/O error occurs. + * @throws IllegalArgumentException if {@code pipeSize <= 0}. * @since 1.6 */ public PipedInputStream(PipedOutputStream src, int pipeSize) @@ -147,7 +147,7 @@ * connected} to a PipedOutputStream before being used. * * @param pipeSize the size of the pipe's buffer. - * @exception IllegalArgumentException if {@code pipeSize <= 0}. + * @throws IllegalArgumentException if {@code pipeSize <= 0}. * @since 1.6 */ public PipedInputStream(int pipeSize) { @@ -182,7 +182,7 @@ * The two calls have the same effect. * * @param src The piped output stream to connect to. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void connect(PipedOutputStream src) throws IOException { src.connect(this); @@ -191,11 +191,11 @@ /** * Receives a byte of data. This method will block if no input is * available. - * @param b the byte being received - * @exception IOException If the pipe is broken, + * @param b the byte being received + * @throws IOException If the pipe is broken, * {@link #connect(java.io.PipedOutputStream) unconnected}, * closed, or if an I/O error occurs. - * @since 1.1 + * @since 1.1 */ protected synchronized void receive(int b) throws IOException { checkStateForReceive(); @@ -215,10 +215,10 @@ /** * Receives data into an array of bytes. This method will * block until some input is available. - * @param b the buffer into which the data is received - * @param off the start offset of the data - * @param len the maximum number of bytes received - * @exception IOException If the pipe is broken, + * @param b the buffer into which the data is received + * @param off the start offset of the data + * @param len the maximum number of bytes received + * @throws IOException If the pipe is broken, * {@link #connect(java.io.PipedOutputStream) unconnected}, * closed,or if an I/O error occurs. */ @@ -293,9 +293,9 @@ * This method blocks until input data is available, the end of the * stream is detected, or an exception is thrown. * - * @return the next byte of data, or -1 if the end of the - * stream is reached. - * @exception IOException if the pipe is + * @return the next byte of data, or -1 if the end of the + * stream is reached. + * @throws IOException if the pipe is * {@link #connect(java.io.PipedOutputStream) unconnected}, * broken, closed, * or if an I/O error occurs. @@ -356,11 +356,11 @@ * @return the total number of bytes read into the buffer, or * -1 if there is no more data because the end of * the stream has been reached. - * @exception NullPointerException If b is null. - * @exception IndexOutOfBoundsException If off is negative, - * len is negative, or len is greater than - * b.length - off - * @exception IOException if the pipe is broken, + * @throws NullPointerException If b is null. + * @throws IndexOutOfBoundsException If off is negative, + * len is negative, or len is greater than + * b.length - off + * @throws IOException if the pipe is broken, * {@link #connect(java.io.PipedOutputStream) unconnected}, * closed, or if an I/O error occurs. */ @@ -418,10 +418,10 @@ * without blocking, or {@code 0} if this input stream has been * closed by invoking its {@link #close()} method, or if the pipe * is {@link #connect(java.io.PipedOutputStream) unconnected}, or - * broken. + * broken. * - * @exception IOException if an I/O error occurs. - * @since 1.0.2 + * @throws IOException if an I/O error occurs. + * @since 1.0.2 */ public synchronized int available() throws IOException { if(in < 0) @@ -438,7 +438,7 @@ * Closes this piped input stream and releases any system resources * associated with the stream. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void close() throws IOException { closedByReader = true; diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/PipedOutputStream.java --- a/src/java.base/share/classes/java/io/PipedOutputStream.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/PipedOutputStream.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2019, 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 @@ -58,7 +58,7 @@ * available as input from snk. * * @param snk The piped input stream to connect to. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public PipedOutputStream(PipedInputStream snk) throws IOException { connect(snk); @@ -91,7 +91,7 @@ * The two calls have the same effect. * * @param snk the piped input stream to connect to. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public synchronized void connect(PipedInputStream snk) throws IOException { if (snk == null) { @@ -110,8 +110,8 @@ *

* Implements the write method of OutputStream. * - * @param b the byte to be written. - * @exception IOException if the pipe is broken, + * @param b the byte to be written. + * @throws IOException if the pipe is broken, * {@link #connect(java.io.PipedInputStream) unconnected}, * closed, or if an I/O error occurs. */ @@ -128,10 +128,10 @@ * This method blocks until all the bytes are written to the output * stream. * - * @param b the data. - * @param off the start offset in the data. - * @param len the number of bytes to write. - * @exception IOException if the pipe is broken, + * @param b the data. + * @param off the start offset in the data. + * @param len the number of bytes to write. + * @throws IOException if the pipe is broken, * {@link #connect(java.io.PipedInputStream) unconnected}, * closed, or if an I/O error occurs. */ @@ -154,7 +154,7 @@ * to be written out. * This will notify any readers that bytes are waiting in the pipe. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public synchronized void flush() throws IOException { if (sink != null) { @@ -169,7 +169,7 @@ * associated with this stream. This stream may no longer be used for * writing bytes. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void close() throws IOException { if (sink != null) { diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/PipedReader.java --- a/src/java.base/share/classes/java/io/PipedReader.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/PipedReader.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, 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 @@ -76,7 +76,7 @@ * will then be available as input from this stream. * * @param src the stream to connect to. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public PipedReader(PipedWriter src) throws IOException { this(src, DEFAULT_PIPE_SIZE); @@ -90,8 +90,8 @@ * @param src the stream to connect to. * @param pipeSize the size of the pipe's buffer. - * @exception IOException if an I/O error occurs. - * @exception IllegalArgumentException if {@code pipeSize <= 0}. + * @throws IOException if an I/O error occurs. + * @throws IllegalArgumentException if {@code pipeSize <= 0}. * @since 1.6 */ public PipedReader(PipedWriter src, int pipeSize) throws IOException { @@ -120,8 +120,8 @@ * before being used. * * @param pipeSize the size of the pipe's buffer. - * @exception IllegalArgumentException if {@code pipeSize <= 0}. - * @since 1.6 + * @throws IllegalArgumentException if {@code pipeSize <= 0}. + * @since 1.6 */ public PipedReader(int pipeSize) { initPipe(pipeSize); @@ -155,7 +155,7 @@ * The two calls have the same effect. * * @param src The piped writer to connect to. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void connect(PipedWriter src) throws IOException { src.connect(this); @@ -223,9 +223,9 @@ * This method blocks until input data is available, the end of * the stream is detected, or an exception is thrown. * - * @return the next character of data, or -1 if the end of the - * stream is reached. - * @exception IOException if the pipe is + * @return the next character of data, or -1 if the end of the + * stream is reached. + * @throws IOException if the pipe is * broken, * {@link #connect(java.io.PipedWriter) unconnected}, closed, * or an I/O error occurs. @@ -282,11 +282,11 @@ * @return the total number of characters read into the buffer, or * -1 if there is no more data because the end of * the stream has been reached. - * @exception IOException if the pipe is - * broken, - * {@link #connect(java.io.PipedWriter) unconnected}, closed, - * or an I/O error occurs. - * @exception IndexOutOfBoundsException {@inheritDoc} + * @throws IOException if the pipe is + * broken, + * {@link #connect(java.io.PipedWriter) unconnected}, closed, + * or an I/O error occurs. + * @throws IndexOutOfBoundsException {@inheritDoc} */ public synchronized int read(char cbuf[], int off, int len) throws IOException { if (!connected) { @@ -330,9 +330,9 @@ * Tell whether this stream is ready to be read. A piped character * stream is ready if the circular buffer is not empty. * - * @exception IOException if the pipe is - * broken, - * {@link #connect(java.io.PipedWriter) unconnected}, or closed. + * @throws IOException if the pipe is + * broken, + * {@link #connect(java.io.PipedWriter) unconnected}, or closed. */ public synchronized boolean ready() throws IOException { if (!connected) { @@ -354,7 +354,7 @@ * Closes this piped stream and releases any system resources * associated with the stream. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void close() throws IOException { in = -1; diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/PipedWriter.java --- a/src/java.base/share/classes/java/io/PipedWriter.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/PipedWriter.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, 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 @@ -53,7 +53,7 @@ * available as input from snk. * * @param snk The piped reader to connect to. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public PipedWriter(PipedReader snk) throws IOException { connect(snk); @@ -86,7 +86,7 @@ * The two calls have the same effect. * * @param snk the piped reader to connect to. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public synchronized void connect(PipedReader snk) throws IOException { if (snk == null) { @@ -111,8 +111,8 @@ *

* Implements the write method of Writer. * - * @param c the char to be written. - * @exception IOException if the pipe is + * @param c the char to be written. + * @throw IOException if the pipe is * broken, * {@link #connect(java.io.PipedReader) unconnected}, closed * or an I/O error occurs. @@ -133,9 +133,9 @@ * stream, but the thread is no longer alive, then an * {@code IOException} is thrown. * - * @param cbuf the data. - * @param off the start offset in the data. - * @param len the number of characters to write. + * @param cbuf the data. + * @param off the start offset in the data. + * @param len the number of characters to write. * * @throws IndexOutOfBoundsException * If {@code off} is negative, or {@code len} is negative, @@ -161,7 +161,7 @@ * to be written out. * This will notify any readers that characters are waiting in the pipe. * - * @exception IOException if the pipe is closed, or an I/O error occurs. + * @throws IOException if the pipe is closed, or an I/O error occurs. */ public synchronized void flush() throws IOException { if (sink != null) { @@ -179,7 +179,7 @@ * associated with this stream. This stream may no longer be used for * writing characters. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void close() throws IOException { closed = true; diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/PushbackInputStream.java --- a/src/java.base/share/classes/java/io/PushbackInputStream.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/PushbackInputStream.java Fri Sep 20 11:07:52 2019 +0100 @@ -84,7 +84,7 @@ * * @param in the input stream from which bytes will be read. * @param size the size of the pushback buffer. - * @exception IllegalArgumentException if {@code size <= 0} + * @throws IllegalArgumentException if {@code size <= 0} * @since 1.1 */ public PushbackInputStream(InputStream in, int size) { @@ -123,7 +123,7 @@ * * @return the next byte of data, or -1 if the end of the * stream has been reached. - * @exception IOException if this input stream has been closed by + * @throws IOException if this input stream has been closed by * invoking its {@link #close()} method, * or an I/O error occurs. * @see java.io.InputStream#read() @@ -150,11 +150,11 @@ * @return the total number of bytes read into the buffer, or * -1 if there is no more data because the end of * the stream has been reached. - * @exception NullPointerException If b is null. - * @exception IndexOutOfBoundsException If off is negative, - * len is negative, or len is greater than - * b.length - off - * @exception IOException if this input stream has been closed by + * @throws NullPointerException If b is null. + * @throws IndexOutOfBoundsException If off is negative, + * len is negative, or len is greater than + * b.length - off + * @throws IOException if this input stream has been closed by * invoking its {@link #close()} method, * or an I/O error occurs. * @see java.io.InputStream#read(byte[], int, int) @@ -196,7 +196,7 @@ * * @param b the int value whose low-order * byte is to be pushed back. - * @exception IOException If there is not enough room in the pushback + * @throws IOException If there is not enough room in the pushback * buffer for the byte, or this input stream has been closed by * invoking its {@link #close()} method. */ @@ -214,11 +214,11 @@ * read will have the value b[off], the byte after that will * have the value b[off+1], and so forth. * - * @param b the byte array to push back. - * @param off the start offset of the data. - * @param len the number of bytes to push back. - * @exception NullPointerException If b is null. - * @exception IOException If there is not enough room in the pushback + * @param b the byte array to push back. + * @param off the start offset of the data. + * @param len the number of bytes to push back. + * @throws NullPointerException If b is null. + * @throws IOException If there is not enough room in the pushback * buffer for the specified number of bytes, * or this input stream has been closed by * invoking its {@link #close()} method. @@ -239,9 +239,9 @@ * will have the value b[0], the byte after that will have the * value b[1], and so forth. * - * @param b the byte array to push back - * @exception NullPointerException If b is null. - * @exception IOException If there is not enough room in the pushback + * @param b the byte array to push back + * @throws NullPointerException If b is null. + * @throws IOException If there is not enough room in the pushback * buffer for the specified number of bytes, * or this input stream has been closed by * invoking its {@link #close()} method. @@ -264,7 +264,7 @@ * * @return the number of bytes that can be read (or skipped over) from * the input stream without blocking. - * @exception IOException if this input stream has been closed by + * @throws IOException if this input stream has been closed by * invoking its {@link #close()} method, * or an I/O error occurs. * @see java.io.FilterInputStream#in @@ -327,8 +327,8 @@ * * @return false, since this class does not support the * mark and reset methods. - * @see java.io.InputStream#mark(int) - * @see java.io.InputStream#reset() + * @see java.io.InputStream#mark(int) + * @see java.io.InputStream#reset() */ public boolean markSupported() { return false; @@ -355,7 +355,7 @@ * PushbackInputStream does nothing except throw an * IOException. * - * @exception IOException if this method is invoked. + * @throws IOException if this method is invoked. * @see java.io.InputStream#mark(int) * @see java.io.IOException */ @@ -370,7 +370,7 @@ * available(), reset(), or skip() invocations will throw an IOException. * Closing a previously closed stream has no effect. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public synchronized void close() throws IOException { if (in == null) diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/PushbackReader.java --- a/src/java.base/share/classes/java/io/PushbackReader.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/PushbackReader.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, 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 @@ -47,7 +47,7 @@ * * @param in The reader from which characters will be read * @param size The size of the pushback buffer - * @exception IllegalArgumentException if {@code size <= 0} + * @throws IllegalArgumentException if {@code size <= 0} */ public PushbackReader(Reader in, int size) { super(in); @@ -79,7 +79,7 @@ * @return The character read, or -1 if the end of the stream has been * reached * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public int read() throws IOException { synchronized (lock) { @@ -101,8 +101,8 @@ * @return The number of characters read, or -1 if the end of the * stream has been reached * - * @exception IOException If an I/O error occurs - * @exception IndexOutOfBoundsException {@inheritDoc} + * @throws IOException If an I/O error occurs + * @throws IndexOutOfBoundsException {@inheritDoc} */ public int read(char cbuf[], int off, int len) throws IOException { synchronized (lock) { @@ -146,8 +146,8 @@ * * @param c The int value representing a character to be pushed back * - * @exception IOException If the pushback buffer is full, - * or if some other I/O error occurs + * @throws IOException If the pushback buffer is full, + * or if some other I/O error occurs */ public void unread(int c) throws IOException { synchronized (lock) { @@ -165,11 +165,11 @@ * character after that will have the value cbuf[off+1], and * so forth. * - * @param cbuf Character array - * @param off Offset of first character to push back - * @param len Number of characters to push back + * @param cbuf Character array + * @param off Offset of first character to push back + * @param len Number of characters to push back * - * @exception IOException If there is insufficient room in the pushback + * @throws IOException If there is insufficient room in the pushback * buffer, or if some other I/O error occurs */ public void unread(char cbuf[], int off, int len) throws IOException { @@ -188,9 +188,9 @@ * read will have the value cbuf[0], the character after that * will have the value cbuf[1], and so forth. * - * @param cbuf Character array to push back + * @param cbuf Character array to push back * - * @exception IOException If there is insufficient room in the pushback + * @throws IOException If there is insufficient room in the pushback * buffer, or if some other I/O error occurs */ public void unread(char cbuf[]) throws IOException { @@ -200,7 +200,7 @@ /** * Tells whether this stream is ready to be read. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public boolean ready() throws IOException { synchronized (lock) { @@ -213,7 +213,7 @@ * Marks the present position in the stream. The mark * for class PushbackReader always throws an exception. * - * @exception IOException Always, since mark is not supported + * @throws IOException Always, since mark is not supported */ public void mark(int readAheadLimit) throws IOException { throw new IOException("mark/reset not supported"); @@ -223,7 +223,7 @@ * Resets the stream. The reset method of * PushbackReader always throws an exception. * - * @exception IOException Always, since reset is not supported + * @throws IOException Always, since reset is not supported */ public void reset() throws IOException { throw new IOException("mark/reset not supported"); @@ -244,7 +244,7 @@ * Closing a previously closed stream has no effect. This method will block * while there is another thread blocking on the reader. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public void close() throws IOException { synchronized (lock) { @@ -257,12 +257,12 @@ * Skips characters. This method will block until some characters are * available, an I/O error occurs, or the end of the stream is reached. * - * @param n The number of characters to skip + * @param n The number of characters to skip * * @return The number of characters actually skipped * - * @exception IllegalArgumentException If n is negative. - * @exception IOException If an I/O error occurs + * @throws IllegalArgumentException If n is negative. + * @throws IOException If an I/O error occurs */ public long skip(long n) throws IOException { if (n < 0L) diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/RandomAccessFile.java --- a/src/java.base/share/classes/java/io/RandomAccessFile.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/RandomAccessFile.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2019, 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 @@ -103,17 +103,17 @@ * * @param name the system-dependent filename * @param mode the access mode - * @exception IllegalArgumentException if the mode argument is not equal + * @throws IllegalArgumentException if the mode argument is not equal * to one of {@code "r"}, {@code "rw"}, {@code "rws"}, or * {@code "rwd"} - * @exception FileNotFoundException - * if the mode is {@code "r"} but the given string does not - * denote an existing regular file, or if the mode begins with - * {@code "rw"} but the given string does not denote an - * existing, writable regular file and a new regular file of - * that name cannot be created, or if some other error occurs - * while opening or creating the file - * @exception SecurityException if a security manager exists and its + * @throws FileNotFoundException + * if the mode is {@code "r"} but the given string does not + * denote an existing regular file, or if the mode begins with + * {@code "rw"} but the given string does not denote an + * existing, writable regular file and a new regular file of + * that name cannot be created, or if some other error occurs + * while opening or creating the file + * @throws SecurityException if a security manager exists and its * {@code checkRead} method denies read access to the file * or the mode is {@code "rw"} and the security manager's * {@code checkWrite} method denies write access to the file @@ -190,17 +190,17 @@ * @param file the file object * @param mode the access mode, as described * above - * @exception IllegalArgumentException if the mode argument is not equal + * @throws IllegalArgumentException if the mode argument is not equal * to one of {@code "r"}, {@code "rw"}, {@code "rws"}, or * {@code "rwd"} - * @exception FileNotFoundException - * if the mode is {@code "r"} but the given file object does - * not denote an existing regular file, or if the mode begins - * with {@code "rw"} but the given file object does not denote - * an existing, writable regular file and a new regular file of - * that name cannot be created, or if some other error occurs - * while opening or creating the file - * @exception SecurityException if a security manager exists and its + * @throws FileNotFoundException + * if the mode is {@code "r"} but the given file object does + * not denote an existing regular file, or if the mode begins + * with {@code "rw"} but the given file object does not denote + * an existing, writable regular file and a new regular file of + * that name cannot be created, or if some other error occurs + * while opening or creating the file + * @throws SecurityException if a security manager exists and its * {@code checkRead} method denies read access to the file * or the mode is {@code "rw"} and the security manager's * {@code checkWrite} method denies write access to the file @@ -267,7 +267,7 @@ * stream. * * @return the file descriptor object associated with this stream. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.FileDescriptor */ public final FileDescriptor getFD() throws IOException { @@ -361,7 +361,7 @@ * * @return the next byte of data, or {@code -1} if the end of the * file has been reached. - * @exception IOException if an I/O error occurs. Not thrown if + * @throws IOException if an I/O error occurs. Not thrown if * end-of-file has been reached. */ public int read() throws IOException { @@ -372,10 +372,10 @@ /** * Reads a sub array as a sequence of bytes. - * @param b the buffer into which the data is read. - * @param off the start offset of the data. - * @param len the number of bytes to read. - * @exception IOException If an I/O error has occurred. + * @param b the buffer into which the data is read. + * @param off the start offset of the data. + * @param len the number of bytes to read. + * @throws IOException If an I/O error has occurred. */ private native int readBytes(byte b[], int off, int len) throws IOException; @@ -396,13 +396,13 @@ * @return the total number of bytes read into the buffer, or * {@code -1} if there is no more data because the end of * the file has been reached. - * @exception IOException If the first byte cannot be read for any reason - * other than end of file, or if the random access file has been closed, or if - * some other I/O error occurs. - * @exception NullPointerException If {@code b} is {@code null}. - * @exception IndexOutOfBoundsException If {@code off} is negative, - * {@code len} is negative, or {@code len} is greater than - * {@code b.length - off} + * @throws IOException If the first byte cannot be read for any reason + * other than end of file, or if the random access file has been closed, + * or if some other I/O error occurs. + * @throws NullPointerException If {@code b} is {@code null}. + * @throws IndexOutOfBoundsException If {@code off} is negative, + * {@code len} is negative, or {@code len} is greater than + * {@code b.length - off} */ public int read(byte b[], int off, int len) throws IOException { return readBytes(b, off, len); @@ -422,10 +422,10 @@ * @return the total number of bytes read into the buffer, or * {@code -1} if there is no more data because the end of * this file has been reached. - * @exception IOException If the first byte cannot be read for any reason - * other than end of file, or if the random access file has been closed, or if - * some other I/O error occurs. - * @exception NullPointerException If {@code b} is {@code null}. + * @throws IOException If the first byte cannot be read for any reason + * other than end of file, or if the random access file has been closed, + * or if some other I/O error occurs. + * @throws NullPointerException If {@code b} is {@code null}. */ public int read(byte b[]) throws IOException { return readBytes(b, 0, b.length); @@ -490,7 +490,7 @@ * * @param n the number of bytes to be skipped. * @return the actual number of bytes skipped. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public int skipBytes(int n) throws IOException { long pos; @@ -519,7 +519,7 @@ * the current file pointer. * * @param b the {@code byte} to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void write(int b) throws IOException { write0(b); @@ -529,11 +529,11 @@ /** * Writes a sub array as a sequence of bytes. - * @param b the data to be written + * @param b the data to be written - * @param off the start offset in the data - * @param len the number of bytes that are written - * @exception IOException If an I/O error has occurred. + * @param off the start offset in the data + * @param len the number of bytes that are written + * @throws IOException If an I/O error has occurred. */ private native void writeBytes(byte b[], int off, int len) throws IOException; @@ -542,7 +542,7 @@ * to this file, starting at the current file pointer. * * @param b the data. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void write(byte b[]) throws IOException { writeBytes(b, 0, b.length); @@ -555,7 +555,7 @@ * @param b the data. * @param off the start offset in the data. * @param len the number of bytes to write. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void write(byte b[], int off, int len) throws IOException { writeBytes(b, off, len); @@ -568,7 +568,7 @@ * * @return the offset from the beginning of the file, in bytes, * at which the next read or write occurs. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public native long getFilePointer() throws IOException; @@ -583,7 +583,7 @@ * @param pos the offset position, measured in bytes from the * beginning of the file, at which to set the file * pointer. - * @exception IOException if {@code pos} is less than + * @throws IOException if {@code pos} is less than * {@code 0} or if an I/O error occurs. */ public void seek(long pos) throws IOException { @@ -600,7 +600,7 @@ * Returns the length of this file. * * @return the length of this file, measured in bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public native long length() throws IOException; @@ -620,7 +620,7 @@ * the extended portion of the file are not defined. * * @param newLength The desired length of the file - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs * @since 1.2 */ public native void setLength(long newLength) throws IOException; @@ -634,7 +634,7 @@ *

If this file has an associated channel then the channel is closed * as well. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * * @revised 1.4 * @spec JSR-51 @@ -678,8 +678,8 @@ * is detected, or an exception is thrown. * * @return the {@code boolean} value read. - * @exception EOFException if this file has reached the end. - * @exception IOException if an I/O error occurs. + * @throws EOFException if this file has reached the end. + * @throws IOException if an I/O error occurs. */ public final boolean readBoolean() throws IOException { int ch = this.read(); @@ -703,8 +703,8 @@ * * @return the next byte of this file as a signed eight-bit * {@code byte}. - * @exception EOFException if this file has reached the end. - * @exception IOException if an I/O error occurs. + * @throws EOFException if this file has reached the end. + * @throws IOException if an I/O error occurs. */ public final byte readByte() throws IOException { int ch = this.read(); @@ -723,8 +723,8 @@ * * @return the next byte of this file, interpreted as an unsigned * eight-bit number. - * @exception EOFException if this file has reached the end. - * @exception IOException if an I/O error occurs. + * @throws EOFException if this file has reached the end. + * @throws IOException if an I/O error occurs. */ public final int readUnsignedByte() throws IOException { int ch = this.read(); @@ -749,9 +749,9 @@ * * @return the next two bytes of this file, interpreted as a signed * 16-bit number. - * @exception EOFException if this file reaches the end before reading + * @throws EOFException if this file reaches the end before reading * two bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public final short readShort() throws IOException { int ch1 = this.read(); @@ -777,9 +777,9 @@ * * @return the next two bytes of this file, interpreted as an unsigned * 16-bit integer. - * @exception EOFException if this file reaches the end before reading + * @throws EOFException if this file reaches the end before reading * two bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public final int readUnsignedShort() throws IOException { int ch1 = this.read(); @@ -805,9 +805,9 @@ * * @return the next two bytes of this file, interpreted as a * {@code char}. - * @exception EOFException if this file reaches the end before reading + * @throws EOFException if this file reaches the end before reading * two bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public final char readChar() throws IOException { int ch1 = this.read(); @@ -833,9 +833,9 @@ * * @return the next four bytes of this file, interpreted as an * {@code int}. - * @exception EOFException if this file reaches the end before reading + * @throws EOFException if this file reaches the end before reading * four bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public final int readInt() throws IOException { int ch1 = this.read(); @@ -871,9 +871,9 @@ * * @return the next eight bytes of this file, interpreted as a * {@code long}. - * @exception EOFException if this file reaches the end before reading + * @throws EOFException if this file reaches the end before reading * eight bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public final long readLong() throws IOException { return ((long)(readInt()) << 32) + (readInt() & 0xFFFFFFFFL); @@ -892,9 +892,9 @@ * * @return the next four bytes of this file, interpreted as a * {@code float}. - * @exception EOFException if this file reaches the end before reading + * @throws EOFException if this file reaches the end before reading * four bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.RandomAccessFile#readInt() * @see java.lang.Float#intBitsToFloat(int) */ @@ -915,9 +915,9 @@ * * @return the next eight bytes of this file, interpreted as a * {@code double}. - * @exception EOFException if this file reaches the end before reading + * @throws EOFException if this file reaches the end before reading * eight bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.RandomAccessFile#readLong() * @see java.lang.Double#longBitsToDouble(long) */ @@ -946,7 +946,7 @@ * * @return the next line of text from this file, or null if end * of file is encountered before even one byte is read. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public final String readLine() throws IOException { @@ -997,10 +997,10 @@ * stream is detected, or an exception is thrown. * * @return a Unicode string. - * @exception EOFException if this file reaches the end before + * @throws EOFException if this file reaches the end before * reading all the bytes. - * @exception IOException if an I/O error occurs. - * @exception UTFDataFormatException if the bytes do not represent + * @throws IOException if an I/O error occurs. + * @throws UTFDataFormatException if the bytes do not represent * valid modified UTF-8 encoding of a Unicode string. * @see java.io.RandomAccessFile#readUnsignedShort() */ @@ -1016,7 +1016,7 @@ * the current position of the file pointer. * * @param v a {@code boolean} value to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public final void writeBoolean(boolean v) throws IOException { write(v ? 1 : 0); @@ -1028,7 +1028,7 @@ * write starts at the current position of the file pointer. * * @param v a {@code byte} value to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public final void writeByte(int v) throws IOException { write(v); @@ -1040,7 +1040,7 @@ * The write starts at the current position of the file pointer. * * @param v a {@code short} to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public final void writeShort(int v) throws IOException { write((v >>> 8) & 0xFF); @@ -1054,7 +1054,7 @@ * file pointer. * * @param v a {@code char} value to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public final void writeChar(int v) throws IOException { write((v >>> 8) & 0xFF); @@ -1067,7 +1067,7 @@ * The write starts at the current position of the file pointer. * * @param v an {@code int} to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public final void writeInt(int v) throws IOException { write((v >>> 24) & 0xFF); @@ -1082,7 +1082,7 @@ * The write starts at the current position of the file pointer. * * @param v a {@code long} to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public final void writeLong(long v) throws IOException { write((int)(v >>> 56) & 0xFF); @@ -1104,7 +1104,7 @@ * current position of the file pointer. * * @param v a {@code float} value to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.lang.Float#floatToIntBits(float) */ public final void writeFloat(float v) throws IOException { @@ -1119,7 +1119,7 @@ * position of the file pointer. * * @param v a {@code double} value to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.lang.Double#doubleToLongBits(double) */ public final void writeDouble(double v) throws IOException { @@ -1133,7 +1133,7 @@ * the file pointer. * * @param s a string of bytes to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ @SuppressWarnings("deprecation") public final void writeBytes(String s) throws IOException { @@ -1150,7 +1150,7 @@ * position of the file pointer. * * @param s a {@code String} value to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.RandomAccessFile#writeChar(int) */ public final void writeChars(String s) throws IOException { @@ -1180,7 +1180,7 @@ * for each character. * * @param str a string to be written. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public final void writeUTF(String str) throws IOException { DataOutputStream.writeUTF(str, this); diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/Reader.java --- a/src/java.base/share/classes/java/io/Reader.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/Reader.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, 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 @@ -203,7 +203,7 @@ * ({@code 0x00-0xffff}), or -1 if the end of the stream has * been reached * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public int read() throws IOException { char cb[] = new char[1]; @@ -223,7 +223,7 @@ * if the end of the stream * has been reached * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public int read(char cbuf[]) throws IOException { return read(cbuf, 0, cbuf.length); @@ -241,8 +241,8 @@ * @return The number of characters read, or -1 if the end of the * stream has been reached * - * @exception IOException If an I/O error occurs - * @exception IndexOutOfBoundsException + * @throws IOException If an I/O error occurs + * @throws IndexOutOfBoundsException * If {@code off} is negative, or {@code len} is negative, * or {@code len} is greater than {@code cbuf.length - off} */ @@ -262,8 +262,8 @@ * * @return The number of characters actually skipped * - * @exception IllegalArgumentException If n is negative. - * @exception IOException If an I/O error occurs + * @throws IllegalArgumentException If n is negative. + * @throws IOException If an I/O error occurs */ public long skip(long n) throws IOException { if (n < 0L) @@ -290,7 +290,7 @@ * false otherwise. Note that returning false does not guarantee that the * next read will block. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public boolean ready() throws IOException { return false; @@ -317,7 +317,7 @@ * reading this many characters, attempting to * reset the stream may fail. * - * @exception IOException If the stream does not support mark(), + * @throws IOException If the stream does not support mark(), * or if some other I/O error occurs */ public void mark(int readAheadLimit) throws IOException { @@ -332,7 +332,7 @@ * character-input streams support the reset() operation, and some support * reset() without supporting mark(). * - * @exception IOException If the stream has not been marked, + * @throws IOException If the stream has not been marked, * or if the mark has been invalidated, * or if the stream does not support reset(), * or if some other I/O error occurs @@ -347,7 +347,7 @@ * mark(), reset(), or skip() invocations will throw an IOException. * Closing a previously closed stream has no effect. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public abstract void close() throws IOException; diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/SequenceInputStream.java --- a/src/java.base/share/classes/java/io/SequenceInputStream.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/SequenceInputStream.java Fri Sep 20 11:07:52 2019 +0100 @@ -118,13 +118,13 @@ * This method simply calls {@code available} of the current underlying * input stream and returns the result. * - * @return an estimate of the number of bytes that can be read (or - * skipped over) from the current underlying input stream - * without blocking or {@code 0} if this input stream - * has been closed by invoking its {@link #close()} method - * @exception IOException if an I/O error occurs. + * @return an estimate of the number of bytes that can be read (or + * skipped over) from the current underlying input stream + * without blocking or {@code 0} if this input stream + * has been closed by invoking its {@link #close()} method + * @throw IOException if an I/O error occurs. * - * @since 1.1 + * @since 1.1 */ public int available() throws IOException { if (in == null) { @@ -149,7 +149,7 @@ * * @return the next byte of data, or -1 if the end of the * stream is reached. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public int read() throws IOException { while (in != null) { @@ -179,11 +179,11 @@ * at which the data is written. * @param len the maximum number of bytes read. * @return int the number of bytes read. - * @exception NullPointerException If b is null. - * @exception IndexOutOfBoundsException If off is negative, - * len is negative, or len is greater than - * b.length - off - * @exception IOException if an I/O error occurs. + * @throws NullPointerException If b is null. + * @throws IndexOutOfBoundsException If off is negative, + * len is negative, or len is + * greater than b.length - off + * @throws IOException if an I/O error occurs. */ public int read(byte b[], int off, int len) throws IOException { if (in == null) { @@ -217,7 +217,7 @@ * are requested from the enumeration and closed * before the close method returns. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void close() throws IOException { IOException ioe = null; diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/StreamTokenizer.java --- a/src/java.base/share/classes/java/io/StreamTokenizer.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/StreamTokenizer.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2019, 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 @@ -517,7 +517,7 @@ * is returned. * * @return the value of the {@code ttype} field. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @see java.io.StreamTokenizer#nval * @see java.io.StreamTokenizer#sval * @see java.io.StreamTokenizer#ttype diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/io/StringReader.java --- a/src/java.base/share/classes/java/io/StringReader.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/io/StringReader.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, 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 @@ -62,7 +62,7 @@ * @return The character read, or -1 if the end of the stream has been * reached * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public int read() throws IOException { synchronized (lock) { @@ -83,8 +83,8 @@ * @return The number of characters read, or -1 if the end of the * stream has been reached * - * @exception IOException If an I/O error occurs - * @exception IndexOutOfBoundsException {@inheritDoc} + * @throws IOException If an I/O error occurs + * @throws IndexOutOfBoundsException {@inheritDoc} */ public int read(char cbuf[], int off, int len) throws IOException { synchronized (lock) { @@ -118,7 +118,7 @@ *

If the entire string has been read or skipped, then this method has * no effect and always returns 0. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public long skip(long ns) throws IOException { synchronized (lock) { @@ -138,7 +138,7 @@ * * @return True if the next read() is guaranteed not to block for input * - * @exception IOException If the stream is closed + * @throws IOException If the stream is closed */ public boolean ready() throws IOException { synchronized (lock) { @@ -164,8 +164,8 @@ * is no actual limit, so this argument must not * be negative, but is otherwise ignored. * - * @exception IllegalArgumentException If {@code readAheadLimit < 0} - * @exception IOException If an I/O error occurs + * @throws IllegalArgumentException If {@code readAheadLimit < 0} + * @throws IOException If an I/O error occurs */ public void mark(int readAheadLimit) throws IOException { if (readAheadLimit < 0){ @@ -181,7 +181,7 @@ * Resets the stream to the most recent mark, or to the beginning of the * string if it has never been marked. * - * @exception IOException If an I/O error occurs + * @throws IOException If an I/O error occurs */ public void reset() throws IOException { synchronized (lock) { diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/lang/Class.java --- a/src/java.base/share/classes/java/lang/Class.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/lang/Class.java Fri Sep 20 11:07:52 2019 +0100 @@ -321,10 +321,10 @@ * @param className the fully qualified name of the desired class. * @return the {@code Class} object for the class with the * specified name. - * @exception LinkageError if the linkage fails - * @exception ExceptionInInitializerError if the initialization provoked + * @throws LinkageError if the linkage fails + * @throws ExceptionInInitializerError if the initialization provoked * by this method fails - * @exception ClassNotFoundException if the class cannot be located + * @throws ClassNotFoundException if the class cannot be located */ @CallerSensitive public static Class forName(String className) @@ -379,12 +379,12 @@ * @param loader class loader from which the class must be loaded * @return class object representing the desired class * - * @exception LinkageError if the linkage fails - * @exception ExceptionInInitializerError if the initialization provoked + * @throws LinkageError if the linkage fails + * @throws ExceptionInInitializerError if the initialization provoked * by this method fails - * @exception ClassNotFoundException if the class cannot be located by + * @throws ClassNotFoundException if the class cannot be located by * the specified class loader - * @exception SecurityException + * @throws SecurityException * if a security manager is present, and the {@code loader} is * {@code null}, and the caller's class loader is not * {@code null}, and the caller does not have the @@ -667,12 +667,12 @@ * or via a widening reference conversion. See The Java Language * Specification, sections 5.1.1 and 5.1.4 , for details. * - * @param cls the {@code Class} object to be checked - * @return the {@code boolean} value indicating whether objects of the - * type {@code cls} can be assigned to objects of this class - * @exception NullPointerException if the specified Class parameter is + * @param cls the {@code Class} object to be checked + * @return the {@code boolean} value indicating whether objects of the + * type {@code cls} can be assigned to objects of this class + * @throws NullPointerException if the specified Class parameter is * null. - * @since 1.1 + * @since 1.1 */ @HotSpotIntrinsicCandidate public native boolean isAssignableFrom(Class cls); @@ -1512,7 +1512,7 @@ * class. If the underlying class is a top level class this * method returns {@code null}. * @return the immediately enclosing class of the underlying class - * @exception SecurityException + * @throws SecurityException * If a security manager, s, is present and the caller's * class loader is not the same as or an ancestor of the class * loader for the enclosing class and invocation of {@link diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/lang/ClassLoader.java --- a/src/java.base/share/classes/java/lang/ClassLoader.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/lang/ClassLoader.java Fri Sep 20 11:07:52 2019 +0100 @@ -445,10 +445,10 @@ * @param parent * The parent class loader * - * @throws SecurityException - * If a security manager exists and its - * {@code checkCreateClassLoader} method doesn't allow creation - * of a new class loader. + * @throws SecurityException + * If a security manager exists and its + * {@code checkCreateClassLoader} method doesn't allow creation + * of a new class loader. * * @since 1.2 */ @@ -509,8 +509,8 @@ * to invoking {@link #loadClass(String, boolean) loadClass(name, * false)}. * - * @param name - * The binary name of the class + * @param name + * The binary name of the class * * @return The resulting {@code Class} object * @@ -551,11 +551,11 @@ * {@link #getClassLoadingLock getClassLoadingLock} method * during the entire class loading process. * - * @param name - * The binary name of the class + * @param name + * The binary name of the class * - * @param resolve - * If {@code true} then resolve the class + * @param resolve + * If {@code true} then resolve the class * * @return The resulting {@code Class} object * @@ -704,8 +704,8 @@ * * @implSpec The default implementation throws {@code ClassNotFoundException}. * - * @param name - * The binary name of the class + * @param name + * The binary name of the class * * @return The resulting {@code Class} object * diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/lang/Integer.java --- a/src/java.base/share/classes/java/lang/Integer.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/lang/Integer.java Fri Sep 20 11:07:52 2019 +0100 @@ -598,7 +598,7 @@ * @param radix the radix to be used while parsing {@code s}. * @return the integer represented by the string argument in the * specified radix. - * @exception NumberFormatException if the {@code String} + * @throws NumberFormatException if the {@code String} * does not contain a parsable {@code int}. */ public static int parseInt(String s, int radix) @@ -763,7 +763,7 @@ * @param s a {@code String} containing the {@code int} * representation to be parsed * @return the integer value represented by the argument in decimal. - * @exception NumberFormatException if the string does not contain a + * @throws NumberFormatException if the string does not contain a * parsable integer. */ public static int parseInt(String s) throws NumberFormatException { @@ -950,7 +950,7 @@ * @return an {@code Integer} object holding the value * represented by the string argument in the specified * radix. - * @exception NumberFormatException if the {@code String} + * @throws NumberFormatException if the {@code String} * does not contain a parsable {@code int}. */ public static Integer valueOf(String s, int radix) throws NumberFormatException { @@ -976,7 +976,7 @@ * @param s the string to be parsed. * @return an {@code Integer} object holding the value * represented by the string argument. - * @exception NumberFormatException if the string cannot be parsed + * @throws NumberFormatException if the string cannot be parsed * as an integer. */ public static Integer valueOf(String s) throws NumberFormatException { @@ -1393,7 +1393,7 @@ * @param nm the {@code String} to decode. * @return an {@code Integer} object holding the {@code int} * value represented by {@code nm} - * @exception NumberFormatException if the {@code String} does not + * @throws NumberFormatException if the {@code String} does not * contain a parsable integer. * @see java.lang.Integer#parseInt(java.lang.String, int) */ diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/lang/Package.java --- a/src/java.base/share/classes/java/lang/Package.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/lang/Package.java Fri Sep 20 11:07:52 2019 +0100 @@ -233,7 +233,7 @@ * Returns true if this package is sealed with respect to the specified * code source {@code url}. * - * @param url the code source URL + * @param url the code source URL * @return true if this package is sealed with respect to the given {@code url} */ public boolean isSealed(URL url) { @@ -267,12 +267,12 @@ * If the values are equal the period is skipped and the next pair of * components is compared. * - * @param desired the version string of the desired version. + * @param desired the version string of the desired version. * @return true if this package's version number is greater - * than or equal to the desired version number + * than or equal to the desired version number * - * @exception NumberFormatException if the current version is not known or - * the desired or current version is not of the correct dotted form. + * @throws NumberFormatException if the current version is not known or + * the desired or current version is not of the correct dotted form. */ public boolean isCompatibleWith(String desired) throws NumberFormatException diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/lang/ProcessHandleImpl.java --- a/src/java.base/share/classes/java/lang/ProcessHandleImpl.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/lang/ProcessHandleImpl.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2019, 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 @@ -223,9 +223,9 @@ /** * Returns a ProcessHandle for an existing native process. * - * @param pid the native process identifier + * @param pid the native process identifier * @return The ProcessHandle for the pid if the process is alive; - * or {@code null} if the process ID does not exist in the native system. + * or {@code null} if the process ID does not exist in the native system. * @throws SecurityException if RuntimePermission("manageProcess") is not granted */ static Optional get(long pid) { diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/lang/SecurityManager.java --- a/src/java.base/share/classes/java/lang/SecurityManager.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/lang/SecurityManager.java Fri Sep 20 11:07:52 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2019, 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 @@ -331,7 +331,7 @@ * security manager. * This may result in throwing a SecurityException. * - * @exception java.lang.SecurityException if a security manager already + * @throws java.lang.SecurityException if a security manager already * exists and its checkPermission method * doesn't allow creation of a new security manager. * @see java.lang.System#getSecurityManager() @@ -398,9 +398,9 @@ * with the given permission. * * @param perm the requested permission. - * @exception SecurityException if access is not permitted based on + * @throws SecurityException if access is not permitted based on * the current security policy. - * @exception NullPointerException if the permission argument is + * @throws NullPointerException if the permission argument is * null. * @since 1.2 */ @@ -429,11 +429,11 @@ * * @param perm the specified permission * @param context a system-dependent security context. - * @exception SecurityException if the specified security context + * @throws SecurityException if the specified security context * is not an instance of AccessControlContext * (e.g., is null), or is denied access to the * resource specified by the given permission. - * @exception NullPointerException if the permission argument is + * @throws NullPointerException if the permission argument is * null. * @see java.lang.SecurityManager#getSecurityContext() * @see java.security.AccessControlContext#checkPermission(java.security.Permission) @@ -460,7 +460,7 @@ * at the point the overridden method would normally throw an * exception. * - * @exception SecurityException if the calling thread does not + * @throws SecurityException if the calling thread does not * have permission * to create a new class loader. * @see java.lang.ClassLoader#ClassLoader() @@ -515,9 +515,9 @@ * equivalent security check should be placed in the overridden method. * * @param t the thread to be checked. - * @exception SecurityException if the calling thread does not have + * @throws SecurityException if the calling thread does not have * permission to modify the thread. - * @exception NullPointerException if the thread argument is + * @throws NullPointerException if the thread argument is * null. * @see java.lang.Thread#resume() resume * @see java.lang.Thread#setDaemon(boolean) setDaemon @@ -568,9 +568,9 @@ * equivalent security check should be placed in the overridden method. * * @param g the thread group to be checked. - * @exception SecurityException if the calling thread does not have + * @throws SecurityException if the calling thread does not have * permission to modify the thread group. - * @exception NullPointerException if the thread group argument is + * @throws NullPointerException if the thread group argument is * null. * @see java.lang.ThreadGroup#destroy() destroy * @see java.lang.ThreadGroup#resume() resume @@ -610,7 +610,7 @@ * exception. * * @param status the exit status. - * @exception SecurityException if the calling thread does not have + * @throws SecurityException if the calling thread does not have * permission to halt the Java Virtual Machine with * the specified status. * @see java.lang.Runtime#exit(int) exit @@ -639,9 +639,9 @@ * exception. * * @param cmd the specified system command. - * @exception SecurityException if the calling thread does not have + * @throws SecurityException if the calling thread does not have * permission to create a subprocess. - * @exception NullPointerException if the cmd argument is + * @throws NullPointerException if the cmd argument is * null. * @see java.lang.Runtime#exec(java.lang.String) * @see java.lang.Runtime#exec(java.lang.String, java.lang.String[]) @@ -679,9 +679,9 @@ * exception. * * @param lib the name of the library. - * @exception SecurityException if the calling thread does not have + * @throws SecurityException if the calling thread does not have * permission to dynamically link the library. - * @exception NullPointerException if the lib argument is + * @throws NullPointerException if the lib argument is * null. * @see java.lang.Runtime#load(java.lang.String) * @see java.lang.Runtime#loadLibrary(java.lang.String) @@ -709,9 +709,9 @@ * exception. * * @param fd the system-dependent file descriptor. - * @exception SecurityException if the calling thread does not have + * @throws SecurityException if the calling thread does not have * permission to access the specified file descriptor. - * @exception NullPointerException if the file descriptor argument is + * @throws NullPointerException if the file descriptor argument is * null. * @see java.io.FileDescriptor * @see #checkPermission(java.security.Permission) checkPermission @@ -737,9 +737,9 @@ * exception. * * @param file the system-dependent file name. - * @exception SecurityException if the calling thread does not have + * @throws SecurityException if the calling thread does not have * permission to access the specified file. - * @exception NullPointerException if the file argument is + * @throws NullPointerException if the file argument is * null. * @see #checkPermission(java.security.Permission) checkPermission */ @@ -769,11 +769,11 @@ * * @param file the system-dependent filename. * @param context a system-dependent security context. - * @exception SecurityException if the specified security context + * @throws SecurityException if the specified security context * is not an instance of AccessControlContext * (e.g., is null), or does not have permission * to read the specified file. - * @exception NullPointerException if the file argument is + * @throws NullPointerException if the file argument is * null. * @see java.lang.SecurityManager#getSecurityContext() * @see java.security.AccessControlContext#checkPermission(java.security.Permission) @@ -799,9 +799,9 @@ * exception. * * @param fd the system-dependent file descriptor. - * @exception SecurityException if the calling thread does not have + * @throws SecurityException if the calling thread does not have * permission to access the specified file descriptor. - * @exception NullPointerException if the file descriptor argument is + * @throws NullPointerException if the file descriptor argument is * null. * @see java.io.FileDescriptor * @see #checkPermission(java.security.Permission) checkPermission @@ -828,9 +828,9 @@ * exception. * * @param file the system-dependent filename. - * @exception SecurityException if the calling thread does not + * @throws SecurityException if the calling thread does not * have permission to access the specified file. - * @exception NullPointerException if the file argument is + * @throws NullPointerException if the file argument is * null. * @see #checkPermission(java.security.Permission) checkPermission */ @@ -855,9 +855,9 @@ * exception. * * @param file the system-dependent filename. - * @exception SecurityException if the calling thread does not + * @throws SecurityException if the calling thread does not * have permission to delete the file. - * @exception NullPointerException if the file argument is + * @throws NullPointerException if the file argument is * null. * @see java.io.File#delete() * @see #checkPermission(java.security.Permission) checkPermission @@ -889,10 +889,10 @@ * * @param host the host name port to connect to. * @param port the protocol port to connect to. - * @exception SecurityException if the calling thread does not have + * @throws SecurityException if the calling thread does not have * permission to open a socket connection to the specified * host and port. - * @exception NullPointerException if the host argument is + * @throws NullPointerException if the host argument is * null. * @see #checkPermission(java.security.Permission) checkPermission */ @@ -941,12 +941,12 @@ * @param host the host name port to connect to. * @param port the protocol port to connect to. * @param context a system-dependent security context. - * @exception SecurityException if the specified security context + * @throws SecurityException if the specified security context * is not an instance of AccessControlContext * (e.g., is null), or does not have permission * to open a socket connection to the specified * host and port. - * @exception NullPointerException if the host argument is + * @throws NullPointerException if the host argument is * null. * @see java.lang.SecurityManager#getSecurityContext() * @see java.security.AccessControlContext#checkPermission(java.security.Permission) @@ -982,7 +982,7 @@ * exception. * * @param port the local port. - * @exception SecurityException if the calling thread does not have + * @throws SecurityException if the calling thread does not have * permission to listen on the specified port. * @see #checkPermission(java.security.Permission) checkPermission */ @@ -1009,9 +1009,9 @@ * * @param host the host name of the socket connection. * @param port the port number of the socket connection. - * @exception SecurityException if the calling thread does not have + * @throws SecurityException if the calling thread does not have * permission to accept the connection. - * @exception NullPointerException if the host argument is + * @throws NullPointerException if the host argument is * null. * @see java.net.ServerSocket#accept() * @see #checkPermission(java.security.Permission) checkPermission @@ -1042,9 +1042,9 @@ * exception. * * @param maddr Internet group address to be used. - * @exception SecurityException if the calling thread is not allowed to + * @throws SecurityException if the calling thread is not allowed to * use (join/leave/send/receive) IP multicast. - * @exception NullPointerException if the address argument is + * @throws NullPointerException if the address argument is * null. * @since 1.1 * @see #checkPermission(java.security.Permission) checkPermission @@ -1076,9 +1076,9 @@ * @param ttl value in use, if it is multicast send. * Note: this particular implementation does not use the ttl * parameter. - * @exception SecurityException if the calling thread is not allowed to + * @throws SecurityException if the calling thread is not allowed to * use (join/leave/send/receive) IP multicast. - * @exception NullPointerException if the address argument is + * @throws NullPointerException if the address argument is * null. * @since 1.1 * @deprecated Use #checkPermission(java.security.Permission) instead @@ -1110,7 +1110,7 @@ * at the point the overridden method would normally throw an * exception. * - * @exception SecurityException if the calling thread does not have + * @throws SecurityException if the calling thread does not have * permission to access or modify the system properties. * @see java.lang.System#getProperties() * @see java.lang.System#setProperties(java.util.Properties) @@ -1139,11 +1139,11 @@ * * @param key a system property key. * - * @exception SecurityException if the calling thread does not have + * @throws SecurityException if the calling thread does not have * permission to access the specified system property. - * @exception NullPointerException if the key argument is + * @throws NullPointerException if the key argument is * null. - * @exception IllegalArgumentException if key is empty. + * @throws IllegalArgumentException if key is empty. * * @see java.lang.System#getProperty(java.lang.String) * @see #checkPermission(java.security.Permission) checkPermission @@ -1166,7 +1166,7 @@ * at the point the overridden method would normally throw an * exception. * - * @exception SecurityException if the calling thread does not have + * @throws SecurityException if the calling thread does not have * permission to initiate a print job request. * @since 1.1 * @see #checkPermission(java.security.Permission) checkPermission @@ -1474,7 +1474,7 @@ * at the point the overridden method would normally throw an * exception. * - * @exception SecurityException if the calling thread does not have + * @throws SecurityException if the calling thread does not have * permission to specify a socket factory or a stream * handler factory. * @@ -1509,10 +1509,10 @@ * * @param target the target name of the SecurityPermission. * - * @exception SecurityException if the calling thread does not have + * @throws SecurityException if the calling thread does not have * permission for the requested access. - * @exception NullPointerException if target is null. - * @exception IllegalArgumentException if target is empty. + * @throws NullPointerException if target is null. + * @throws IllegalArgumentException if target is empty. * * @since 1.1 * @see #checkPermission(java.security.Permission) checkPermission diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/lang/String.java --- a/src/java.base/share/classes/java/lang/String.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/lang/String.java Fri Sep 20 11:07:52 2019 +0100 @@ -702,7 +702,7 @@ * @param index the index of the {@code char} value. * @return the {@code char} value at the specified index of this string. * The first {@code char} value is at index {@code 0}. - * @exception IndexOutOfBoundsException if the {@code index} + * @throws IndexOutOfBoundsException if the {@code index} * argument is negative or not less than the length of this * string. */ @@ -731,7 +731,7 @@ * @param index the index to the {@code char} values * @return the code point value of the character at the * {@code index} - * @exception IndexOutOfBoundsException if the {@code index} + * @throws IndexOutOfBoundsException if the {@code index} * argument is negative or not less than the length of this * string. * @since 1.5 @@ -763,7 +763,7 @@ * * @param index the index following the code point that should be returned * @return the Unicode code point value before the given index. - * @exception IndexOutOfBoundsException if the {@code index} + * @throws IndexOutOfBoundsException if the {@code index} * argument is less than 1 or greater than the length * of this string. * @since 1.5 @@ -794,7 +794,7 @@ * the text range. * @return the number of Unicode code points in the specified text * range - * @exception IndexOutOfBoundsException if the + * @throws IndexOutOfBoundsException if the * {@code beginIndex} is negative, or {@code endIndex} * is larger than the length of this {@code String}, or * {@code beginIndex} is larger than {@code endIndex}. @@ -821,7 +821,7 @@ * @param index the index to be offset * @param codePointOffset the offset in code points * @return the index within this {@code String} - * @exception IndexOutOfBoundsException if {@code index} + * @throws IndexOutOfBoundsException if {@code index} * is negative or larger then the length of this * {@code String}, or if {@code codePointOffset} is positive * and the substring starting with {@code index} has fewer @@ -858,7 +858,7 @@ * to copy. * @param dst the destination array. * @param dstBegin the start offset in the destination array. - * @exception IndexOutOfBoundsException If any of the following + * @throws IndexOutOfBoundsException If any of the following * is true: *