# 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 The number of dimensions of the new array must not
* exceed 255.
*
- * @param componentType the {@code Class} object representing the
- * component type of the new array
- * @param length the length of the new array
+ * @param componentType the {@code Class} object representing the
+ * component type of the new array
+ * @param length the length of the new array
* @return the new array
- * @exception NullPointerException if the specified
- * {@code componentType} parameter is null
- * @exception IllegalArgumentException if componentType is {@link
- * Void#TYPE} or if the number of dimensions of the requested array
- * instance exceed 255.
- * @exception NegativeArraySizeException if the specified {@code length}
- * is negative
+ * @throws NullPointerException if the specified
+ * {@code componentType} parameter is null
+ * @throws IllegalArgumentException if componentType is {@link
+ * Void#TYPE} or if the number of dimensions of the requested array
+ * instance exceed 255.
+ * @throws NegativeArraySizeException if the specified {@code length}
+ * is negative
*/
public static Object newInstance(Class> componentType, int length)
throws NegativeArraySizeException {
@@ -100,13 +100,13 @@
* @param dimensions an array of {@code int} representing the dimensions of
* the new array
* @return the new array
- * @exception NullPointerException if the specified
+ * @throws NullPointerException if the specified
* {@code componentType} argument is null
- * @exception IllegalArgumentException if the specified {@code dimensions}
+ * @throws IllegalArgumentException if the specified {@code dimensions}
* argument is a zero-dimensional array, if componentType is {@link
* Void#TYPE}, or if the number of dimensions of the requested array
* instance exceed 255.
- * @exception NegativeArraySizeException if any of the components in
+ * @throws NegativeArraySizeException if any of the components in
* the specified {@code dimensions} argument is negative.
*/
public static Object newInstance(Class> componentType, int... dimensions)
@@ -119,7 +119,7 @@
*
* @param array the array
* @return the length of the array
- * @exception IllegalArgumentException if the object argument is not
+ * @throws IllegalArgumentException if the object argument is not
* an array
*/
@HotSpotIntrinsicCandidate
@@ -135,10 +135,10 @@
* @param index the index
* @return the (possibly wrapped) value of the indexed component in
* the specified array
- * @exception NullPointerException If the specified object is null
- * @exception IllegalArgumentException If the specified object is not
+ * @throws NullPointerException If the specified object is null
+ * @throws IllegalArgumentException If the specified object is not
* an array
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
*/
@@ -152,11 +152,11 @@
* @param array the array
* @param index the index
* @return the value of the indexed component in the specified array
- * @exception NullPointerException If the specified object is null
- * @exception IllegalArgumentException If the specified object is not
+ * @throws NullPointerException If the specified object is null
+ * @throws IllegalArgumentException If the specified object is not
* an array, or if the indexed element cannot be converted to the
* return type by an identity or widening conversion
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
* @see Array#get
@@ -171,11 +171,11 @@
* @param array the array
* @param index the index
* @return the value of the indexed component in the specified array
- * @exception NullPointerException If the specified object is null
- * @exception IllegalArgumentException If the specified object is not
+ * @throws NullPointerException If the specified object is null
+ * @throws IllegalArgumentException If the specified object is not
* an array, or if the indexed element cannot be converted to the
* return type by an identity or widening conversion
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
* @see Array#get
@@ -190,11 +190,11 @@
* @param array the array
* @param index the index
* @return the value of the indexed component in the specified array
- * @exception NullPointerException If the specified object is null
- * @exception IllegalArgumentException If the specified object is not
+ * @throws NullPointerException If the specified object is null
+ * @throws IllegalArgumentException If the specified object is not
* an array, or if the indexed element cannot be converted to the
* return type by an identity or widening conversion
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
* @see Array#get
@@ -209,11 +209,11 @@
* @param array the array
* @param index the index
* @return the value of the indexed component in the specified array
- * @exception NullPointerException If the specified object is null
- * @exception IllegalArgumentException If the specified object is not
+ * @throws NullPointerException If the specified object is null
+ * @throws IllegalArgumentException If the specified object is not
* an array, or if the indexed element cannot be converted to the
* return type by an identity or widening conversion
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
* @see Array#get
@@ -228,11 +228,11 @@
* @param array the array
* @param index the index
* @return the value of the indexed component in the specified array
- * @exception NullPointerException If the specified object is null
- * @exception IllegalArgumentException If the specified object is not
+ * @throws NullPointerException If the specified object is null
+ * @throws IllegalArgumentException If the specified object is not
* an array, or if the indexed element cannot be converted to the
* return type by an identity or widening conversion
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
* @see Array#get
@@ -247,11 +247,11 @@
* @param array the array
* @param index the index
* @return the value of the indexed component in the specified array
- * @exception NullPointerException If the specified object is null
- * @exception IllegalArgumentException If the specified object is not
+ * @throws NullPointerException If the specified object is null
+ * @throws IllegalArgumentException If the specified object is not
* an array, or if the indexed element cannot be converted to the
* return type by an identity or widening conversion
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
* @see Array#get
@@ -266,11 +266,11 @@
* @param array the array
* @param index the index
* @return the value of the indexed component in the specified array
- * @exception NullPointerException If the specified object is null
- * @exception IllegalArgumentException If the specified object is not
+ * @throws NullPointerException If the specified object is null
+ * @throws IllegalArgumentException If the specified object is not
* an array, or if the indexed element cannot be converted to the
* return type by an identity or widening conversion
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
* @see Array#get
@@ -285,11 +285,11 @@
* @param array the array
* @param index the index
* @return the value of the indexed component in the specified array
- * @exception NullPointerException If the specified object is null
- * @exception IllegalArgumentException If the specified object is not
+ * @throws NullPointerException If the specified object is null
+ * @throws IllegalArgumentException If the specified object is not
* an array, or if the indexed element cannot be converted to the
* return type by an identity or widening conversion
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to the
* length of the specified array
* @see Array#get
@@ -305,12 +305,12 @@
* @param array the array
* @param index the index into the array
* @param value the new value of the indexed component
- * @exception NullPointerException If the specified object argument
+ * @throws NullPointerException If the specified object argument
* is null
- * @exception IllegalArgumentException If the specified object argument
+ * @throws IllegalArgumentException If the specified object argument
* is not an array, or if the array component type is primitive and
* an unwrapping conversion fails
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
*/
@@ -323,13 +323,13 @@
* @param array the array
* @param index the index into the array
* @param z the new value of the indexed component
- * @exception NullPointerException If the specified object argument
+ * @throws NullPointerException If the specified object argument
* is null
- * @exception IllegalArgumentException If the specified object argument
+ * @throws IllegalArgumentException If the specified object argument
* is not an array, or if the specified value cannot be converted
* to the underlying array's component type by an identity or a
* primitive widening conversion
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
* @see Array#set
@@ -343,13 +343,13 @@
* @param array the array
* @param index the index into the array
* @param b the new value of the indexed component
- * @exception NullPointerException If the specified object argument
+ * @throws NullPointerException If the specified object argument
* is null
- * @exception IllegalArgumentException If the specified object argument
+ * @throws IllegalArgumentException If the specified object argument
* is not an array, or if the specified value cannot be converted
* to the underlying array's component type by an identity or a
* primitive widening conversion
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
* @see Array#set
@@ -363,13 +363,13 @@
* @param array the array
* @param index the index into the array
* @param c the new value of the indexed component
- * @exception NullPointerException If the specified object argument
+ * @throws NullPointerException If the specified object argument
* is null
- * @exception IllegalArgumentException If the specified object argument
+ * @throws IllegalArgumentException If the specified object argument
* is not an array, or if the specified value cannot be converted
* to the underlying array's component type by an identity or a
* primitive widening conversion
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
* @see Array#set
@@ -383,13 +383,13 @@
* @param array the array
* @param index the index into the array
* @param s the new value of the indexed component
- * @exception NullPointerException If the specified object argument
+ * @throws NullPointerException If the specified object argument
* is null
- * @exception IllegalArgumentException If the specified object argument
+ * @throws IllegalArgumentException If the specified object argument
* is not an array, or if the specified value cannot be converted
* to the underlying array's component type by an identity or a
* primitive widening conversion
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
* @see Array#set
@@ -403,13 +403,13 @@
* @param array the array
* @param index the index into the array
* @param i the new value of the indexed component
- * @exception NullPointerException If the specified object argument
+ * @throws NullPointerException If the specified object argument
* is null
- * @exception IllegalArgumentException If the specified object argument
+ * @throws IllegalArgumentException If the specified object argument
* is not an array, or if the specified value cannot be converted
* to the underlying array's component type by an identity or a
* primitive widening conversion
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
* @see Array#set
@@ -423,13 +423,13 @@
* @param array the array
* @param index the index into the array
* @param l the new value of the indexed component
- * @exception NullPointerException If the specified object argument
+ * @throws NullPointerException If the specified object argument
* is null
- * @exception IllegalArgumentException If the specified object argument
+ * @throws IllegalArgumentException If the specified object argument
* is not an array, or if the specified value cannot be converted
* to the underlying array's component type by an identity or a
* primitive widening conversion
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
* @see Array#set
@@ -443,13 +443,13 @@
* @param array the array
* @param index the index into the array
* @param f the new value of the indexed component
- * @exception NullPointerException If the specified object argument
+ * @throws NullPointerException If the specified object argument
* is null
- * @exception IllegalArgumentException If the specified object argument
+ * @throws IllegalArgumentException If the specified object argument
* is not an array, or if the specified value cannot be converted
* to the underlying array's component type by an identity or a
* primitive widening conversion
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
* @see Array#set
@@ -463,13 +463,13 @@
* @param array the array
* @param index the index into the array
* @param d the new value of the indexed component
- * @exception NullPointerException If the specified object argument
+ * @throws NullPointerException If the specified object argument
* is null
- * @exception IllegalArgumentException If the specified object argument
+ * @throws IllegalArgumentException If the specified object argument
* is not an array, or if the specified value cannot be converted
* to the underlying array's component type by an identity or a
* primitive widening conversion
- * @exception ArrayIndexOutOfBoundsException If the specified {@code index}
+ * @throws ArrayIndexOutOfBoundsException If the specified {@code index}
* argument is negative, or if it is greater than or equal to
* the length of the specified array
* @see Array#set
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/lang/reflect/Constructor.java
--- a/src/java.base/share/classes/java/lang/reflect/Constructor.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/lang/reflect/Constructor.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
@@ -454,21 +454,21 @@
* @return a new object created by calling the constructor
* this object represents
*
- * @exception IllegalAccessException if this {@code Constructor} object
+ * @throws IllegalAccessException if this {@code Constructor} object
* is enforcing Java language access control and the underlying
* constructor is inaccessible.
- * @exception IllegalArgumentException if the number of actual
+ * @throws IllegalArgumentException if the number of actual
* and formal parameters differ; if an unwrapping
* conversion for primitive arguments fails; or if,
* after possible unwrapping, a parameter value
* cannot be converted to the corresponding formal
* parameter type by a method invocation conversion; if
* this constructor pertains to an enum type.
- * @exception InstantiationException if the class that declares the
+ * @throws InstantiationException if the class that declares the
* underlying constructor represents an abstract class.
- * @exception InvocationTargetException if the underlying constructor
+ * @throws InvocationTargetException if the underlying constructor
* throws an exception.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
*/
@CallerSensitive
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/lang/reflect/Field.java
--- a/src/java.base/share/classes/java/lang/reflect/Field.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/lang/reflect/Field.java Fri Sep 20 11:07:52 2019 +0100
@@ -393,15 +393,15 @@
* {@code obj}; primitive values are wrapped in an appropriate
* object before being returned
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof).
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
*/
@CallerSensitive
@@ -423,18 +423,18 @@
* from
* @return the value of the {@code boolean} field
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not
+ * @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code boolean} by a
* widening conversion.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@@ -457,18 +457,18 @@
* from
* @return the value of the {@code byte} field
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not
+ * @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code byte} by a
* widening conversion.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@@ -493,18 +493,18 @@
* from
* @return the value of the field converted to type {@code char}
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not
+ * @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code char} by a
* widening conversion.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@@ -529,18 +529,18 @@
* from
* @return the value of the field converted to type {@code short}
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not
+ * @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code short} by a
* widening conversion.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@@ -565,18 +565,18 @@
* from
* @return the value of the field converted to type {@code int}
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not
+ * @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code int} by a
* widening conversion.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@@ -601,18 +601,18 @@
* from
* @return the value of the field converted to type {@code long}
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not
+ * @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code long} by a
* widening conversion.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@@ -637,18 +637,18 @@
* from
* @return the value of the field converted to type {@code float}
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not
+ * @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code float} by a
* widening conversion.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@@ -673,18 +673,18 @@
* from
* @return the value of the field converted to type {@code double}
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not
+ * @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code double} by a
* widening conversion.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@@ -754,16 +754,16 @@
* @param value the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
*/
@CallerSensitive
@@ -789,16 +789,16 @@
* @param z the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@@ -825,16 +825,16 @@
* @param b the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@@ -861,16 +861,16 @@
* @param c the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@@ -897,16 +897,16 @@
* @param s the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@@ -933,16 +933,16 @@
* @param i the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@@ -969,16 +969,16 @@
* @param l the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@@ -1005,16 +1005,16 @@
* @param f the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@@ -1041,16 +1041,16 @@
* @param d the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/lang/reflect/Method.java
--- a/src/java.base/share/classes/java/lang/reflect/Method.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/lang/reflect/Method.java Fri Sep 20 11:07:52 2019 +0100
@@ -524,10 +524,10 @@
* this object on {@code obj} with parameters
* {@code args}
*
- * @exception IllegalAccessException if this {@code Method} object
+ * @throws IllegalAccessException if this {@code Method} object
* is enforcing Java language access control and the underlying
* method is inaccessible.
- * @exception IllegalArgumentException if the method is an
+ * @throws IllegalArgumentException if the method is an
* instance method and the specified object argument
* is not an instance of the class or interface
* declaring the underlying method (or of a subclass
@@ -537,11 +537,11 @@
* after possible unwrapping, a parameter value
* cannot be converted to the corresponding formal
* parameter type by a method invocation conversion.
- * @exception InvocationTargetException if the underlying method
+ * @throws InvocationTargetException if the underlying method
* throws an exception.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the method is an instance method.
- * @exception ExceptionInInitializerError if the initialization
+ * @throws ExceptionInInitializerError if the initialization
* provoked by this method fails.
*/
@CallerSensitive
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/ContentHandler.java
--- a/src/java.base/share/classes/java/net/ContentHandler.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/ContentHandler.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
@@ -90,7 +90,7 @@
*
* @param urlc a URL connection.
* @return the object read by the {@code ContentHandler}.
- * @exception IOException if an I/O error occurs while reading the object.
+ * @throws IOException if an I/O error occurs while reading the object.
*/
public abstract Object getContent(URLConnection urlc) throws IOException;
@@ -108,7 +108,7 @@
* @return the object read by the {@code ContentHandler} that is
* the first match of the suggested types or
* {@code null} if none of the requested are supported.
- * @exception IOException if an I/O error occurs while reading the object.
+ * @throws IOException if an I/O error occurs while reading the object.
* @since 1.3
*/
@SuppressWarnings("rawtypes")
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/DatagramPacket.java
--- a/src/java.base/share/classes/java/net/DatagramPacket.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/DatagramPacket.java Fri Sep 20 11:07:52 2019 +0100
@@ -245,7 +245,7 @@
* @param length the length of the data
* and/or the length of the buffer used to receive data
*
- * @exception NullPointerException if the argument is null
+ * @throws NullPointerException if the argument is null
*
* @see #getData
* @see #getOffset
@@ -331,7 +331,7 @@
*
* @param buf the buffer to set for this packet.
*
- * @exception NullPointerException if the argument is null.
+ * @throws NullPointerException if the argument is null.
*
* @see #getLength
* @see #getData
@@ -357,7 +357,7 @@
*
* @param length the length to set for this packet.
*
- * @exception IllegalArgumentException if the length is negative
+ * @throws IllegalArgumentException if the length is negative
* of if the length is greater than the packet's data buffer
* length.
*
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/DatagramSocket.java
--- a/src/java.base/share/classes/java/net/DatagramSocket.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/DatagramSocket.java Fri Sep 20 11:07:52 2019 +0100
@@ -188,9 +188,9 @@
* with 0 as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
*
- * @exception SocketException if the socket could not be opened,
+ * @throws SocketException if the socket could not be opened,
* or the socket could not bind to the specified local port.
- * @exception SecurityException if a security manager exists and its
+ * @throws SecurityException if a security manager exists and its
* {@code checkListen} method doesn't allow the operation.
*
* @see SecurityManager#checkListen
@@ -229,9 +229,9 @@
* @param bindaddr local socket address to bind, or {@code null}
* for an unbound socket.
*
- * @exception SocketException if the socket could not be opened,
+ * @throws SocketException if the socket could not be opened,
* or the socket could not bind to the specified local port.
- * @exception SecurityException if a security manager exists and its
+ * @throws SecurityException if a security manager exists and its
* {@code checkListen} method doesn't allow the operation.
*
* @see SecurityManager#checkListen
@@ -263,9 +263,9 @@
* This could result in a SecurityException.
*
* @param port port to use.
- * @exception SocketException if the socket could not be opened,
+ * @throws SocketException if the socket could not be opened,
* or the socket could not bind to the specified local port.
- * @exception SecurityException if a security manager exists and its
+ * @throws SecurityException if a security manager exists and its
* {@code checkListen} method doesn't allow the operation.
*
* @see SecurityManager#checkListen
@@ -290,9 +290,9 @@
* @param port local port to use
* @param laddr local address to bind
*
- * @exception SocketException if the socket could not be opened,
+ * @throws SocketException if the socket could not be opened,
* or the socket could not bind to the specified local port.
- * @exception SecurityException if a security manager exists and its
+ * @throws SecurityException if a security manager exists and its
* {@code checkListen} method doesn't allow the operation.
*
* @see SecurityManager#checkListen
@@ -635,17 +635,17 @@
*
* @param p the {@code DatagramPacket} to be sent.
*
- * @exception IOException if an I/O error occurs.
- * @exception SecurityException if a security manager exists and its
+ * @throws IOException if an I/O error occurs.
+ * @throws SecurityException if a security manager exists and its
* {@code checkMulticast} or {@code checkConnect}
* method doesn't allow the send.
- * @exception PortUnreachableException may be thrown if the socket is connected
+ * @throws PortUnreachableException may be thrown if the socket is connected
* to a currently unreachable destination. Note, there is no
* guarantee that the exception will be thrown.
- * @exception java.nio.channels.IllegalBlockingModeException
+ * @throws java.nio.channels.IllegalBlockingModeException
* if this socket has an associated channel,
* and the channel is in non-blocking mode.
- * @exception IllegalArgumentException if the socket is connected,
+ * @throws IllegalArgumentException if the socket is connected,
* and connected address and packet address differ.
*
* @see java.net.DatagramPacket
@@ -714,13 +714,13 @@
*
* @param p the {@code DatagramPacket} into which to place
* the incoming data.
- * @exception IOException if an I/O error occurs.
- * @exception SocketTimeoutException if setSoTimeout was previously called
+ * @throws IOException if an I/O error occurs.
+ * @throws SocketTimeoutException if setSoTimeout was previously called
* and the timeout has expired.
- * @exception PortUnreachableException may be thrown if the socket is connected
+ * @throws PortUnreachableException may be thrown if the socket is connected
* to a currently unreachable destination. Note, there is no guarantee that the
* exception will be thrown.
- * @exception java.nio.channels.IllegalBlockingModeException
+ * @throws java.nio.channels.IllegalBlockingModeException
* if this socket has an associated channel,
* and the channel is in non-blocking mode.
* @see java.net.DatagramPacket
@@ -951,9 +951,9 @@
* @param size the size to which to set the send buffer
* size. This value must be greater than 0.
*
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as an UDP error.
- * @exception IllegalArgumentException if the value is 0 or is
+ * @throws IllegalArgumentException if the value is 0 or is
* negative.
* @see #getSendBufferSize()
*/
@@ -972,7 +972,7 @@
* buffer size used by the platform for output on this {@code DatagramSocket}.
*
* @return the value of the SO_SNDBUF option for this {@code DatagramSocket}
- * @exception SocketException if there is an error in
+ * @throws SocketException if there is an error in
* the underlying protocol, such as an UDP error.
* @see #setSendBufferSize
*/
@@ -1009,9 +1009,9 @@
* @param size the size to which to set the receive buffer
* size. This value must be greater than 0.
*
- * @exception SocketException if there is an error in
+ * @throws SocketException if there is an error in
* the underlying protocol, such as an UDP error.
- * @exception IllegalArgumentException if the value is 0 or is
+ * @throws IllegalArgumentException if the value is 0 or is
* negative.
* @see #getReceiveBufferSize()
*/
@@ -1030,7 +1030,7 @@
* buffer size used by the platform for input on this {@code DatagramSocket}.
*
* @return the value of the SO_RCVBUF option for this {@code DatagramSocket}
- * @exception SocketException if there is an error in the underlying protocol, such as an UDP error.
+ * @throws SocketException if there is an error in the underlying protocol, such as an UDP error.
* @see #setReceiveBufferSize(int)
*/
public synchronized int getReceiveBufferSize()
@@ -1070,7 +1070,7 @@
* is not defined.
*
* @param on whether to enable or disable the
- * @exception SocketException if an error occurs enabling or
+ * @throws SocketException if an error occurs enabling or
* disabling the {@code SO_REUSEADDR} socket option,
* or the socket is closed.
* @since 1.4
@@ -1093,7 +1093,7 @@
* Tests if SO_REUSEADDR is enabled.
*
* @return a {@code boolean} indicating whether or not SO_REUSEADDR is enabled.
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as an UDP error.
* @since 1.4
* @see #setReuseAddress(boolean)
@@ -1131,7 +1131,7 @@
/**
* Tests if SO_BROADCAST is enabled.
* @return a {@code boolean} indicating whether or not SO_BROADCAST is enabled.
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as an UDP error.
* @since 1.4
* @see #setBroadcast(boolean)
@@ -1290,10 +1290,10 @@
* This could result in a SecurityException.
*
* @param fac the desired factory.
- * @exception IOException if an I/O error occurs when setting the
+ * @throws IOException if an I/O error occurs when setting the
* datagram socket factory.
- * @exception SocketException if the factory is already defined.
- * @exception SecurityException if a security manager exists and its
+ * @throws SocketException if the factory is already defined.
+ * @throws SecurityException if a security manager exists and its
* {@code checkSetFactory} method doesn't allow the operation.
* @see java.net.DatagramSocketImplFactory#createDatagramSocketImpl()
* @see SecurityManager#checkSetFactory
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/DatagramSocketImpl.java
--- a/src/java.base/share/classes/java/net/DatagramSocketImpl.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/DatagramSocketImpl.java Fri Sep 20 11:07:52 2019 +0100
@@ -70,29 +70,29 @@
/**
* Creates a datagram socket.
- * @exception SocketException if there is an error in the
+ * @throws SocketException if there is an error in the
* underlying protocol, such as a TCP error.
*/
protected abstract void create() throws SocketException;
/**
* Binds a datagram socket to a local port and address.
- * @param lport the local port
- * @param laddr the local address
- * @exception SocketException if there is an error in the
- * underlying protocol, such as a TCP error.
+ * @param lport the local port
+ * @param laddr the local address
+ * @throws SocketException if there is an error in the
+ * underlying protocol, such as a TCP error.
*/
protected abstract void bind(int lport, InetAddress laddr) throws SocketException;
/**
* Sends a datagram packet. The packet contains the data and the
* destination address to send the packet to.
- * @param p the packet to be sent.
- * @exception IOException if an I/O exception occurs while sending the
- * datagram packet.
- * @exception PortUnreachableException may be thrown if the socket is connected
- * to a currently unreachable destination. Note, there is no guarantee that
- * the exception will be thrown.
+ * @param p the packet to be sent.
+ * @throws IOException if an I/O exception occurs while sending the
+ * datagram packet.
+ * @throws PortUnreachableException may be thrown if the socket is connected
+ * to a currently unreachable destination. Note, there is no guarantee that
+ * the exception will be thrown.
*/
protected abstract void send(DatagramPacket p) throws IOException;
@@ -107,11 +107,11 @@
* packet has been received for that address, then a subsequent call to
* send or receive may throw a PortUnreachableException.
* Note, there is no guarantee that the exception will be thrown.
- * @param address the remote InetAddress to connect to
- * @param port the remote port number
- * @exception SocketException may be thrown if the socket cannot be
- * connected to the remote destination
- * @since 1.4
+ * @param address the remote InetAddress to connect to
+ * @param port the remote port number
+ * @throws SocketException may be thrown if the socket cannot be
+ * connected to the remote destination
+ * @since 1.4
*/
protected void connect(InetAddress address, int port) throws SocketException {}
@@ -124,12 +124,12 @@
/**
* Peek at the packet to see who it is from. Updates the specified {@code InetAddress}
* to the address which the packet came from.
- * @param i an InetAddress object
- * @return the port number which the packet came from.
- * @exception IOException if an I/O exception occurs
- * @exception PortUnreachableException may be thrown if the socket is connected
- * to a currently unreachable destination. Note, there is no guarantee that the
- * exception will be thrown.
+ * @param i an InetAddress object
+ * @return the port number which the packet came from.
+ * @throws IOException if an I/O exception occurs
+ * @throws PortUnreachableException may be thrown if the socket is connected
+ * to a currently unreachable destination. Note, there is no guarantee that the
+ * exception will be thrown.
*/
protected abstract int peek(InetAddress i) throws IOException;
@@ -138,23 +138,23 @@
* {@code DatagramPacket}. The data is returned,
* but not consumed, so that a subsequent peekData/receive operation
* will see the same data.
- * @param p the Packet Received.
- * @return the port number which the packet came from.
- * @exception IOException if an I/O exception occurs
- * @exception PortUnreachableException may be thrown if the socket is connected
- * to a currently unreachable destination. Note, there is no guarantee that the
- * exception will be thrown.
+ * @param p the Packet Received.
+ * @return the port number which the packet came from.
+ * @throws IOException if an I/O exception occurs
+ * @throws PortUnreachableException may be thrown if the socket is connected
+ * to a currently unreachable destination. Note, there is no guarantee that the
+ * exception will be thrown.
* @since 1.4
*/
protected abstract int peekData(DatagramPacket p) throws IOException;
/**
* Receive the datagram packet.
- * @param p the Packet Received.
- * @exception IOException if an I/O exception occurs
- * while receiving the datagram packet.
- * @exception PortUnreachableException may be thrown if the socket is connected
- * to a currently unreachable destination. Note, there is no guarantee that the
- * exception will be thrown.
+ * @param p the Packet Received.
+ * @throws IOException if an I/O exception occurs
+ * while receiving the datagram packet.
+ * @throws PortUnreachableException may be thrown if the socket is connected
+ * to a currently unreachable destination. Note, there is no guarantee that the
+ * exception will be thrown.
*/
protected abstract void receive(DatagramPacket p) throws IOException;
@@ -163,7 +163,7 @@
* @param ttl a byte specifying the TTL value
*
* @deprecated use setTimeToLive instead.
- * @exception IOException if an I/O exception occurs while setting
+ * @throws IOException if an I/O exception occurs while setting
* the time-to-live option.
* @see #getTTL()
*/
@@ -173,7 +173,7 @@
/**
* Retrieve the TTL (time-to-live) option.
*
- * @exception IOException if an I/O exception occurs
+ * @throws IOException if an I/O exception occurs
* while retrieving the time-to-live option
* @deprecated use getTimeToLive instead.
* @return a byte representing the TTL value
@@ -185,7 +185,7 @@
/**
* Set the TTL (time-to-live) option.
* @param ttl an {@code int} specifying the time-to-live value
- * @exception IOException if an I/O exception occurs
+ * @throws IOException if an I/O exception occurs
* while setting the time-to-live option.
* @see #getTimeToLive()
*/
@@ -193,7 +193,7 @@
/**
* Retrieve the TTL (time-to-live) option.
- * @exception IOException if an I/O exception occurs
+ * @throws IOException if an I/O exception occurs
* while retrieving the time-to-live option
* @return an {@code int} representing the time-to-live value
* @see #setTimeToLive(int)
@@ -203,7 +203,7 @@
/**
* Join the multicast group.
* @param inetaddr multicast address to join.
- * @exception IOException if an I/O exception occurs
+ * @throws IOException if an I/O exception occurs
* while joining the multicast group.
*/
protected abstract void join(InetAddress inetaddr) throws IOException;
@@ -211,7 +211,7 @@
/**
* Leave the multicast group.
* @param inetaddr multicast address to leave.
- * @exception IOException if an I/O exception occurs
+ * @throws IOException if an I/O exception occurs
* while leaving the multicast group.
*/
protected abstract void leave(InetAddress inetaddr) throws IOException;
@@ -272,9 +272,9 @@
* UnsupportedOperationException}. Subclasses should override this method
* with an appropriate implementation.
*
- * @param The ttl is an unsigned 8-bit quantity, and so must be
* in the range {@code 0 <= ttl <= 0xFF }.
*
- * @param ttl the time-to-live
- * @exception IOException if an I/O exception occurs
- * while setting the default time-to-live value
+ * @param ttl the time-to-live
+ * @throws IOException if an I/O exception occurs
+ * while setting the default time-to-live value
* @deprecated use the setTimeToLive method instead, which uses
- * int instead of byte as the type for ttl.
+ * int instead of byte as the type for ttl.
* @see #getTTL()
*/
@Deprecated
@@ -254,7 +254,7 @@
* Get the default time-to-live for multicast packets sent out on
* the socket.
*
- * @exception IOException if an I/O exception occurs
+ * @throws IOException if an I/O exception occurs
* while getting the default time-to-live value
* @return the default time-to-live value
* @deprecated use the getTimeToLive method instead, which returns
@@ -271,7 +271,7 @@
/**
* Get the default time-to-live for multicast packets sent out on
* the socket.
- * @exception IOException if an I/O exception occurs while
+ * @throws IOException if an I/O exception occurs while
* getting the default time-to-live value
* @return the default time-to-live value
* @see #setTimeToLive(int)
@@ -293,10 +293,10 @@
*
* @param mcastaddr is the multicast address to join
*
- * @exception IOException if there is an error joining, or when the address
+ * @throws IOException if there is an error joining, or when the address
* is not a multicast address, or the platform does not support
* multicasting
- * @exception SecurityException if a security manager exists and its
+ * @throws SecurityException if a security manager exists and its
* {@code checkMulticast} method doesn't allow the join.
*
* @see SecurityManager#checkMulticast(InetAddress)
@@ -339,9 +339,9 @@
* as its argument.
*
* @param mcastaddr is the multicast address to leave
- * @exception IOException if there is an error leaving
+ * @throws IOException if there is an error leaving
* or when the address is not a multicast address.
- * @exception SecurityException if a security manager exists and its
+ * @throws SecurityException if a security manager exists and its
* {@code checkMulticast} method doesn't allow the operation.
*
* @see SecurityManager#checkMulticast(InetAddress)
@@ -378,10 +378,10 @@
* {@link MulticastSocket#setInterface(InetAddress)} or
* {@link MulticastSocket#setNetworkInterface(NetworkInterface)}
*
- * @exception IOException if there is an error joining, or when the address
+ * @throws IOException if there is an error joining, or when the address
* is not a multicast address, or the platform does not support
* multicasting
- * @exception SecurityException if a security manager exists and its
+ * @throws SecurityException if a security manager exists and its
* {@code checkMulticast} method doesn't allow the join.
* @throws IllegalArgumentException if mcastaddr is null or is a
* SocketAddress subclass not supported by this socket
@@ -426,9 +426,9 @@
* to the interface set by
* {@link MulticastSocket#setInterface(InetAddress)} or
* {@link MulticastSocket#setNetworkInterface(NetworkInterface)}
- * @exception IOException if there is an error leaving
+ * @throws IOException if there is an error leaving
* or when the address is not a multicast address.
- * @exception SecurityException if a security manager exists and its
+ * @throws SecurityException if a security manager exists and its
* {@code checkMulticast} method doesn't allow the operation.
* @throws IllegalArgumentException if mcastaddr is null or is a
* SocketAddress subclass not supported by this socket
@@ -465,7 +465,7 @@
* whose behavior would be affected by the value of the
* network interface. Useful for multihomed hosts.
* @param inf the InetAddress
- * @exception SocketException if there is an error in
+ * @throws SocketException if there is an error in
* the underlying protocol, such as a TCP error.
* @see #getInterface()
*/
@@ -489,7 +489,7 @@
* the address of the network interface used for
* multicast packets.
*
- * @exception SocketException if there is an error in
+ * @throws SocketException if there is an error in
* the underlying protocol, such as a TCP error.
*
* @see #setInterface(java.net.InetAddress)
@@ -549,7 +549,7 @@
* sent on this socket.
*
* @param netIf the interface
- * @exception SocketException if there is an error in
+ * @throws SocketException if there is an error in
* the underlying protocol, such as a TCP error.
* @see #getNetworkInterface()
* @since 1.4
@@ -567,7 +567,7 @@
/**
* Get the multicast network interface set.
*
- * @exception SocketException if there is an error in
+ * @throws SocketException if there is an error in
* the underlying protocol, such as a TCP error.
* @return the multicast {@code NetworkInterface} currently set
* @see #setNetworkInterface(NetworkInterface)
@@ -643,9 +643,9 @@
* @param ttl optional time to live for multicast packet.
* default ttl is 1.
*
- * @exception IOException is raised if an error occurs i.e
+ * @throws IOException is raised if an error occurs i.e
* error while setting ttl.
- * @exception SecurityException if a security manager exists and its
+ * @throws SecurityException if a security manager exists and its
* {@code checkMulticast} or {@code checkConnect}
* method doesn't allow the send.
*
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/NetworkInterface.java
--- a/src/java.base/share/classes/java/net/NetworkInterface.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/NetworkInterface.java Fri Sep 20 11:07:52 2019 +0100
@@ -341,7 +341,7 @@
* {@link #getInetAddresses()} to obtain all IP addresses for this node
*
* @return an Enumeration of NetworkInterfaces found on this machine
- * @exception SocketException if an I/O error occurs,
+ * @throws SocketException if an I/O error occurs,
* or if the platform does not have at least one configured
* network interface.
* @see #networkInterfaces()
@@ -371,7 +371,7 @@
* }
*
* @return a Stream of NetworkInterfaces found on this machine
- * @exception SocketException if an I/O error occurs,
+ * @throws SocketException if an I/O error occurs,
* or if the platform does not have at least one configured
* network interface.
* @since 9
@@ -450,7 +450,7 @@
* Returns whether a network interface is up and running.
*
* @return {@code true} if the interface is up and running.
- * @exception SocketException if an I/O error occurs.
+ * @throws SocketException if an I/O error occurs.
* @since 1.6
*/
@@ -462,7 +462,7 @@
* Returns whether a network interface is a loopback interface.
*
* @return {@code true} if the interface is a loopback interface.
- * @exception SocketException if an I/O error occurs.
+ * @throws SocketException if an I/O error occurs.
* @since 1.6
*/
@@ -477,7 +477,7 @@
*
* @return {@code true} if the interface is a point to point
* interface.
- * @exception SocketException if an I/O error occurs.
+ * @throws SocketException if an I/O error occurs.
* @since 1.6
*/
@@ -489,7 +489,7 @@
* Returns whether a network interface supports multicasting or not.
*
* @return {@code true} if the interface supports Multicasting.
- * @exception SocketException if an I/O error occurs.
+ * @throws SocketException if an I/O error occurs.
* @since 1.6
*/
@@ -508,7 +508,7 @@
* manager is set and the caller does not have the permission
* NetPermission("getNetworkInformation")
*
- * @exception SocketException if an I/O error occurs.
+ * @throws SocketException if an I/O error occurs.
* @since 1.6
*/
public byte[] getHardwareAddress() throws SocketException {
@@ -535,7 +535,7 @@
* Returns the Maximum Transmission Unit (MTU) of this interface.
*
* @return the value of the MTU for that interface.
- * @exception SocketException if an I/O error occurs.
+ * @throws SocketException if an I/O error occurs.
* @since 1.6
*/
public int getMTU() throws SocketException {
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/ProxySelector.java
--- a/src/java.base/share/classes/java/net/ProxySelector.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/ProxySelector.java Fri Sep 20 11:07:52 2019 +0100
@@ -85,10 +85,10 @@
*
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link NetPermission}{@code ("getProxySelector")}
- * @see #setDefault(ProxySelector)
- * @return the system-wide {@code ProxySelector}
- * @since 1.5
+ * {@link NetPermission}{@code ("getProxySelector")}
+ * @see #setDefault(ProxySelector)
+ * @return the system-wide {@code ProxySelector}
+ * @since 1.5
*/
public static ProxySelector getDefault() {
SecurityManager sm = System.getSecurityManager();
@@ -108,7 +108,7 @@
*
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link NetPermission}{@code ("setProxySelector")}
+ * {@link NetPermission}{@code ("setProxySelector")}
*
* @see #getDefault()
* @since 1.5
@@ -163,7 +163,7 @@
*
* @param ioe
* The I/O exception thrown when the connect failed.
- * @throws IllegalArgumentException if either argument is null
+ * @throws IllegalArgumentException if either argument is null
*/
public abstract void connectFailed(URI uri, SocketAddress sa, IOException ioe);
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/ServerSocket.java
--- a/src/java.base/share/classes/java/net/ServerSocket.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/ServerSocket.java Fri Sep 20 11:07:52 2019 +0100
@@ -83,7 +83,7 @@
/**
* Creates an unbound server socket.
*
- * @exception IOException IO error when opening the socket.
+ * @throws IOException IO error when opening the socket.
* @revised 1.4
*/
public ServerSocket() throws IOException {
@@ -115,11 +115,11 @@
* @param port the port number, or {@code 0} to use a port
* number that is automatically allocated.
*
- * @exception IOException if an I/O error occurs when opening the socket.
- * @exception SecurityException
+ * @throws IOException if an I/O error occurs when opening the socket.
+ * @throws SecurityException
* if a security manager exists and its {@code checkListen}
* method doesn't allow the operation.
- * @exception IllegalArgumentException if the port parameter is outside
+ * @throws IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
*
@@ -168,11 +168,11 @@
* @param backlog requested maximum length of the queue of incoming
* connections.
*
- * @exception IOException if an I/O error occurs when opening the socket.
- * @exception SecurityException
+ * @throws IOException if an I/O error occurs when opening the socket.
+ * @throws SecurityException
* if a security manager exists and its {@code checkListen}
* method doesn't allow the operation.
- * @exception IllegalArgumentException if the port parameter is outside
+ * @throws IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
*
@@ -221,7 +221,7 @@
* its {@code checkListen} method doesn't allow the operation.
*
* @throws IOException if an I/O error occurs when opening the socket.
- * @exception IllegalArgumentException if the port parameter is outside
+ * @throws IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
*
@@ -474,13 +474,13 @@
* of the {@linkplain Socket#setSocketImplFactory(SocketImplFactory)
* client socket implementation factory}, if one has been set.
*
- * @exception IOException if an I/O error occurs when waiting for a
+ * @throws IOException if an I/O error occurs when waiting for a
* connection.
- * @exception SecurityException if a security manager exists and its
+ * @throws SecurityException if a security manager exists and its
* {@code checkAccept} method doesn't allow the operation.
- * @exception SocketTimeoutException if a timeout was previously set with setSoTimeout and
+ * @throws SocketTimeoutException if a timeout was previously set with setSoTimeout and
* the timeout has been reached.
- * @exception java.nio.channels.IllegalBlockingModeException
+ * @throws java.nio.channels.IllegalBlockingModeException
* if this socket has an associated channel, the channel is in
* non-blocking mode, and there is no connection ready to be
* accepted
@@ -674,7 +674,7 @@
* If this socket has an associated channel then the channel is closed
* as well.
*
- * @exception IOException if an I/O error occurs when closing the socket.
+ * @throws IOException if an I/O error occurs when closing the socket.
* @revised 1.4
* @spec JSR-51
*/
@@ -763,7 +763,7 @@
* Retrieve setting for {@link SocketOptions#SO_TIMEOUT SO_TIMEOUT}.
* 0 returns implies that the option is disabled (i.e., timeout of infinity).
* @return the {@link SocketOptions#SO_TIMEOUT SO_TIMEOUT} value
- * @exception IOException if an I/O error occurs
+ * @throws IOException if an I/O error occurs
* @since 1.1
* @see #setSoTimeout(int)
*/
@@ -806,7 +806,7 @@
* is not defined.
*
* @param on whether to enable or disable the socket option
- * @exception SocketException if an error occurs enabling or
+ * @throws SocketException if an error occurs enabling or
* disabling the {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR}
* socket option, or the socket is closed.
* @since 1.4
@@ -826,7 +826,7 @@
*
* @return a {@code boolean} indicating whether or not
* {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @since 1.4
* @see #setReuseAddress(boolean)
@@ -885,10 +885,10 @@
* This could result in a SecurityException.
*
* @param fac the desired factory.
- * @exception IOException if an I/O error occurs when setting the
+ * @throws IOException if an I/O error occurs when setting the
* socket factory.
- * @exception SocketException if the factory has already been defined.
- * @exception SecurityException if a security manager exists and its
+ * @throws SocketException if the factory has already been defined.
+ * @throws SecurityException if a security manager exists and its
* {@code checkSetFactory} method doesn't allow the operation.
* @see java.net.SocketImplFactory#createSocketImpl()
* @see SecurityManager#checkSetFactory
@@ -928,13 +928,13 @@
* requested value but the TCP receive window in sockets accepted from
* this ServerSocket will be no larger than 64K bytes.
*
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
*
* @param size the size to which to set the receive buffer
* size. This value must be greater than 0.
*
- * @exception IllegalArgumentException if the
+ * @throws IllegalArgumentException if the
* value is 0 or is negative.
*
* @since 1.4
@@ -958,7 +958,7 @@
* calling {@link Socket#getReceiveBufferSize()}.
* @return the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF}
* option for this {@code Socket}.
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @see #setReceiveBufferSize(int)
* @since 1.4
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/Socket.java
--- a/src/java.base/share/classes/java/net/Socket.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/Socket.java Fri Sep 20 11:07:52 2019 +0100
@@ -180,7 +180,7 @@
* @param impl an instance of a SocketImpl
* the subclass wishes to use on the Socket.
*
- * @exception SocketException if there is an error in the underlying protocol,
+ * @throws SocketException if there is an error in the underlying protocol,
* such as a TCP error.
* @since 1.1
*/
@@ -211,13 +211,13 @@
* @param host the host name, or {@code null} for the loopback address.
* @param port the port number.
*
- * @exception UnknownHostException if the IP address of
+ * @throws UnknownHostException if the IP address of
* the host could not be determined.
*
- * @exception IOException if an I/O error occurs when creating the socket.
- * @exception SecurityException if a security manager exists and its
+ * @throws IOException if an I/O error occurs when creating the socket.
+ * @throws SecurityException if a security manager exists and its
* {@code checkConnect} method doesn't allow the operation.
- * @exception IllegalArgumentException if the port parameter is outside
+ * @throws IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
* @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
@@ -249,13 +249,13 @@
*
* @param address the IP address.
* @param port the port number.
- * @exception IOException if an I/O error occurs when creating the socket.
- * @exception SecurityException if a security manager exists and its
+ * @throws IOException if an I/O error occurs when creating the socket.
+ * @throws SecurityException if a security manager exists and its
* {@code checkConnect} method doesn't allow the operation.
- * @exception IllegalArgumentException if the port parameter is outside
+ * @throws IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
- * @exception NullPointerException if {@code address} is null.
+ * @throws NullPointerException if {@code address} is null.
* @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
* @see java.net.SocketImpl
* @see java.net.SocketImplFactory#createSocketImpl()
@@ -291,12 +291,12 @@
* {@code null} for the {@code anyLocal} address.
* @param localPort the local port the socket is bound to, or
* {@code zero} for a system selected free port.
- * @exception IOException if an I/O error occurs when creating the socket.
- * @exception SecurityException if a security manager exists and its
+ * @throws IOException if an I/O error occurs when creating the socket.
+ * @throws SecurityException if a security manager exists and its
* {@code checkConnect} method doesn't allow the connection
* to the destination, or if its {@code checkListen} method
* doesn't allow the bind to the local port.
- * @exception IllegalArgumentException if the port parameter or localPort
+ * @throws IllegalArgumentException if the port parameter or localPort
* parameter is outside the specified range of valid port values,
* which is between 0 and 65535, inclusive.
* @see SecurityManager#checkConnect
@@ -332,15 +332,15 @@
* {@code null} for the {@code anyLocal} address.
* @param localPort the local port the socket is bound to or
* {@code zero} for a system selected free port.
- * @exception IOException if an I/O error occurs when creating the socket.
- * @exception SecurityException if a security manager exists and its
+ * @throws IOException if an I/O error occurs when creating the socket.
+ * @throws SecurityException if a security manager exists and its
* {@code checkConnect} method doesn't allow the connection
* to the destination, or if its {@code checkListen} method
* doesn't allow the bind to the local port.
- * @exception IllegalArgumentException if the port parameter or localPort
+ * @throws IllegalArgumentException if the port parameter or localPort
* parameter is outside the specified range of valid port values,
* which is between 0 and 65535, inclusive.
- * @exception NullPointerException if {@code address} is null.
+ * @throws NullPointerException if {@code address} is null.
* @see SecurityManager#checkConnect
* @since 1.1
*/
@@ -380,10 +380,10 @@
* @param port the port number.
* @param stream a {@code boolean} indicating whether this is
* a stream socket or a datagram socket.
- * @exception IOException if an I/O error occurs when creating the socket.
- * @exception SecurityException if a security manager exists and its
+ * @throws IOException if an I/O error occurs when creating the socket.
+ * @throws SecurityException if a security manager exists and its
* {@code checkConnect} method doesn't allow the operation.
- * @exception IllegalArgumentException if the port parameter is outside
+ * @throws IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
* @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
@@ -423,13 +423,13 @@
* @param port the port number.
* @param stream if {@code true}, create a stream socket;
* otherwise, create a datagram socket.
- * @exception IOException if an I/O error occurs when creating the socket.
- * @exception SecurityException if a security manager exists and its
+ * @throws IOException if an I/O error occurs when creating the socket.
+ * @throws SecurityException if a security manager exists and its
* {@code checkConnect} method doesn't allow the operation.
- * @exception IllegalArgumentException if the port parameter is outside
+ * @throws IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
- * @exception NullPointerException if {@code host} is null.
+ * @throws NullPointerException if {@code host} is null.
* @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
* @see java.net.SocketImpl
* @see java.net.SocketImplFactory#createSocketImpl()
@@ -867,7 +867,7 @@
* will close the associated socket.
*
* @return an input stream for reading bytes from this socket.
- * @exception IOException if an I/O error occurs when creating the
+ * @throws IOException if an I/O error occurs when creating the
* input stream, the socket is closed, the socket is
* not connected, or the socket input has been shutdown
* using {@link #shutdownInput()}
@@ -942,7 +942,7 @@
* will close the associated socket.
*
* @return an output stream for writing bytes to this socket.
- * @exception IOException if an I/O error occurs when creating the
+ * @throws IOException if an I/O error occurs when creating the
* output stream or if the socket is not connected.
* @revised 1.4
* @spec JSR-51
@@ -1002,7 +1002,7 @@
* @param on {@code true} to enable TCP_NODELAY,
* {@code false} to disable.
*
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
*
* @since 1.1
@@ -1020,7 +1020,7 @@
*
* @return a {@code boolean} indicating whether or not
* {@link SocketOptions#TCP_NODELAY TCP_NODELAY} is enabled.
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @since 1.1
* @see #setTcpNoDelay(boolean)
@@ -1040,9 +1040,9 @@
*
* @param on whether or not to linger on.
* @param linger how long to linger for, if on is true.
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
- * @exception IllegalArgumentException if the linger value is negative.
+ * @throws IllegalArgumentException if the linger value is negative.
* @since 1.1
* @see #getSoLinger()
*/
@@ -1069,7 +1069,7 @@
* The setting only affects socket close.
*
* @return the setting for {@link SocketOptions#SO_LINGER SO_LINGER}.
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @since 1.1
* @see #setSoLinger(boolean, int)
@@ -1091,7 +1091,7 @@
* sent after any preceding writes to the socket OutputStream
* and before any future writes to the OutputStream.
* @param data The byte of data to send
- * @exception IOException if there is an error
+ * @throws IOException if there is an error
* sending the data.
* @since 1.4
*/
@@ -1120,7 +1120,7 @@
* {@link SocketOptions#SO_OOBINLINE SO_OOBINLINE},
* {@code false} to disable.
*
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
*
* @since 1.4
@@ -1139,7 +1139,7 @@
* @return a {@code boolean} indicating whether or not
* {@link SocketOptions#SO_OOBINLINE SO_OOBINLINE} is enabled.
*
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @since 1.4
* @see #setOOBInline(boolean)
@@ -1182,7 +1182,7 @@
* 0 returns implies that the option is disabled (i.e., timeout of infinity).
*
* @return the setting for {@link SocketOptions#SO_TIMEOUT SO_TIMEOUT}
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
*
* @since 1.1
@@ -1211,13 +1211,13 @@
* applications that want to verify what size the buffers were set to
* should call {@link #getSendBufferSize()}.
*
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
*
* @param size the size to which to set the send buffer
* size. This value must be greater than 0.
*
- * @exception IllegalArgumentException if the
+ * @throws IllegalArgumentException if the
* value is 0 or is negative.
*
* @see #getSendBufferSize()
@@ -1240,7 +1240,7 @@
* @return the value of the {@link SocketOptions#SO_SNDBUF SO_SNDBUF}
* option for this {@code Socket}.
*
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
*
* @see #setSendBufferSize(int)
@@ -1287,10 +1287,10 @@
* @param size the size to which to set the receive buffer
* size. This value must be greater than 0.
*
- * @exception IllegalArgumentException if the value is 0 or is
+ * @throws IllegalArgumentException if the value is 0 or is
* negative.
*
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
*
* @see #getReceiveBufferSize()
@@ -1314,7 +1314,7 @@
*
* @return the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF}
* option for this {@code Socket}.
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @see #setReceiveBufferSize(int)
* @since 1.2
@@ -1335,7 +1335,7 @@
* Enable/disable {@link SocketOptions#SO_KEEPALIVE SO_KEEPALIVE}.
*
* @param on whether or not to have socket keep alive turned on.
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @since 1.3
* @see #getKeepAlive()
@@ -1351,7 +1351,7 @@
*
* @return a {@code boolean} indicating whether or not
* {@link SocketOptions#SO_KEEPALIVE SO_KEEPALIVE} is enabled.
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @since 1.3
* @see #setKeepAlive(boolean)
@@ -1470,7 +1470,7 @@
* is not defined.
*
* @param on whether to enable or disable the socket option
- * @exception SocketException if an error occurs enabling or
+ * @throws SocketException if an error occurs enabling or
* disabling the {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR}
* socket option, or the socket is closed.
* @since 1.4
@@ -1490,7 +1490,7 @@
*
* @return a {@code boolean} indicating whether or not
* {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
- * @exception SocketException if there is an error
+ * @throws SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @since 1.4
* @see #setReuseAddress(boolean)
@@ -1518,7 +1518,7 @@
* If this socket has an associated channel then the channel is closed
* as well.
*
- * @exception IOException if an I/O error occurs when closing this socket.
+ * @throws IOException if an I/O error occurs when closing this socket.
* @revised 1.4
* @spec JSR-51
* @see #isClosed
@@ -1542,7 +1542,7 @@
* socket, the stream's {@code available} method will return 0, and its
* {@code read} methods will return {@code -1} (end of stream).
*
- * @exception IOException if an I/O error occurs when shutting down this
+ * @throws IOException if an I/O error occurs when shutting down this
* socket.
*
* @since 1.3
@@ -1572,7 +1572,7 @@
* shutdownOutput() on the socket, the stream will throw
* an IOException.
*
- * @exception IOException if an I/O error occurs when shutting down this
+ * @throws IOException if an I/O error occurs when shutting down this
* socket.
*
* @since 1.3
@@ -1700,10 +1700,10 @@
* This could result in a SecurityException.
*
* @param fac the desired factory.
- * @exception IOException if an I/O error occurs when setting the
+ * @throws IOException if an I/O error occurs when setting the
* socket factory.
- * @exception SocketException if the factory is already defined.
- * @exception SecurityException if a security manager exists and its
+ * @throws SocketException if the factory is already defined.
+ * @throws SecurityException if a security manager exists and its
* {@code checkSetFactory} method doesn't allow the operation.
* @see java.net.SocketImplFactory#createSocketImpl()
* @see SecurityManager#checkSetFactory
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/SocketImpl.java
--- a/src/java.base/share/classes/java/net/SocketImpl.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/SocketImpl.java Fri Sep 20 11:07:52 2019 +0100
@@ -114,7 +114,7 @@
*
* @param stream if {@code true}, create a stream socket;
* otherwise, create a datagram socket.
- * @exception IOException if an I/O error occurs while creating the
+ * @throws IOException if an I/O error occurs while creating the
* socket.
*/
protected abstract void create(boolean stream) throws IOException;
@@ -124,7 +124,7 @@
*
* @param host the name of the remote host.
* @param port the port number.
- * @exception IOException if an I/O error occurs when connecting to the
+ * @throws IOException if an I/O error occurs when connecting to the
* remote host.
*/
protected abstract void connect(String host, int port) throws IOException;
@@ -134,7 +134,7 @@
*
* @param address the IP address of the remote host.
* @param port the port number.
- * @exception IOException if an I/O error occurs when attempting a
+ * @throws IOException if an I/O error occurs when attempting a
* connection.
*/
protected abstract void connect(InetAddress address, int port) throws IOException;
@@ -146,7 +146,7 @@
*
* @param address the Socket address of the remote host.
* @param timeout the timeout value, in milliseconds, or zero for no timeout.
- * @exception IOException if an I/O error occurs when attempting a
+ * @throws IOException if an I/O error occurs when attempting a
* connection.
* @since 1.4
*/
@@ -157,7 +157,7 @@
*
* @param host an IP address that belongs to a local interface.
* @param port the port number.
- * @exception IOException if an I/O error occurs when binding this socket.
+ * @throws IOException if an I/O error occurs when binding this socket.
*/
protected abstract void bind(InetAddress host, int port) throws IOException;
@@ -168,7 +168,7 @@
* connection is refused.
*
* @param backlog the maximum length of the queue.
- * @exception IOException if an I/O error occurs when creating the queue.
+ * @throws IOException if an I/O error occurs when creating the queue.
*/
protected abstract void listen(int backlog) throws IOException;
@@ -176,7 +176,7 @@
* Accepts a connection.
*
* @param s the accepted connection.
- * @exception IOException if an I/O error occurs when accepting the
+ * @throws IOException if an I/O error occurs when accepting the
* connection.
*/
protected abstract void accept(SocketImpl s) throws IOException;
@@ -185,7 +185,7 @@
* Returns an input stream for this socket.
*
* @return a stream for reading from this socket.
- * @exception IOException if an I/O error occurs when creating the
+ * @throws IOException if an I/O error occurs when creating the
* input stream.
*/
protected abstract InputStream getInputStream() throws IOException;
@@ -194,7 +194,7 @@
* Returns an output stream for this socket.
*
* @return an output stream for writing to this socket.
- * @exception IOException if an I/O error occurs when creating the
+ * @throws IOException if an I/O error occurs when creating the
* output stream.
*/
protected abstract OutputStream getOutputStream() throws IOException;
@@ -205,7 +205,7 @@
*
* @return the number of bytes that can be read from this socket
* without blocking.
- * @exception IOException if an I/O error occurs when determining the
+ * @throws IOException if an I/O error occurs when determining the
* number of bytes available.
*/
protected abstract int available() throws IOException;
@@ -213,7 +213,7 @@
/**
* Closes this socket.
*
- * @exception IOException if an I/O error occurs when closing this socket.
+ * @throws IOException if an I/O error occurs when closing this socket.
*/
protected abstract void close() throws IOException;
@@ -235,7 +235,7 @@
* socket, the stream's {@code available} method will return 0, and its
* {@code read} methods will return {@code -1} (end of stream).
*
- * @exception IOException if an I/O error occurs when shutting down this
+ * @throws IOException if an I/O error occurs when shutting down this
* socket.
* @see java.net.Socket#shutdownOutput()
* @see java.net.Socket#close()
@@ -255,7 +255,7 @@
* shutdownOutput() on the socket, the stream will throw
* an IOException.
*
- * @exception IOException if an I/O error occurs when shutting down this
+ * @throws IOException if an I/O error occurs when shutting down this
* socket.
* @see java.net.Socket#shutdownInput()
* @see java.net.Socket#close()
@@ -313,7 +313,7 @@
* Send one byte of urgent data on the socket.
* The byte to be sent is the low eight bits of the parameter
* @param data The byte of data to send
- * @exception IOException if there is an error
+ * @throws IOException if there is an error
* sending the data.
* @since 1.4
*/
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/SocketInputStream.java
--- a/src/java.base/share/classes/java/net/SocketInputStream.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/SocketInputStream.java Fri Sep 20 11:07:52 2019 +0100
@@ -86,7 +86,7 @@
* @param timeout the read timeout in ms
* @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.
*/
private native int socketRead0(FileDescriptor fd,
byte b[], int off, int len,
@@ -104,7 +104,7 @@
* @param timeout the read timeout in ms
* @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.
*/
private int socketRead(FileDescriptor fd,
byte b[], int off, int len,
@@ -118,7 +118,7 @@
* @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 {
return read(b, 0, b.length);
@@ -132,7 +132,7 @@
* @param length 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 length) throws IOException {
return read(b, off, length, impl.getTimeout());
@@ -206,7 +206,7 @@
* Skips n bytes of input.
* @param numbytes the number of bytes to skip
* @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 numbytes) throws IOException {
if (numbytes <= 0) {
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/SocketOptions.java
--- a/src/java.base/share/classes/java/net/SocketOptions.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/SocketOptions.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
@@ -81,11 +81,11 @@
* Throws SocketException if the option is unrecognized,
* the socket is closed, or some low-level error occurred
* The ISO 3166-1 codes can be found on-line.
*
* @return A three-letter abbreviation of this locale's country.
- * @exception MissingResourceException Throws MissingResourceException if the
+ * @throws MissingResourceException Throws MissingResourceException if the
* three-letter country abbreviation is not available for this locale.
*/
public String getISO3Country() throws MissingResourceException {
@@ -1834,7 +1834,7 @@
*
* @param inLocale The locale for which to retrieve the display language.
* @return The name of the display language appropriate to the given locale.
- * @exception NullPointerException if 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:
*
- * @param optID identifies the option
- * @param value the parameter of the socket option
+ * @param optID identifies the option
+ * @param value the parameter of the socket option
* @throws SocketException if the option is unrecognized,
- * the socket is closed, or some low-level error occurred
- * @see #getOption(int)
+ * the socket is closed, or some low-level error occurred
+ * @see #getOption(int)
*/
public void
setOption(int optID, Object value) throws SocketException;
@@ -116,7 +116,7 @@
* }
*
*
- * @param optID an {@code int} identifying the option to fetch
+ * @param optID an {@code int} identifying the option to fetch
* @return the value of the option
* @throws SocketException if the socket is closed
* @throws SocketException if optID is unknown along the
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/SocketOutputStream.java
--- a/src/java.base/share/classes/java/net/SocketOutputStream.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/SocketOutputStream.java Fri Sep 20 11:07:52 2019 +0100
@@ -79,7 +79,7 @@
* @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.
+ * @throws IOException If an I/O error has occurred.
*/
private native void socketWrite0(FileDescriptor fd, byte[] b, int off,
int len) throws IOException;
@@ -90,7 +90,7 @@
* @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.
+ * @throws IOException If an I/O error has occurred.
*/
private void socketWrite(byte b[], int off, int len) throws IOException {
@@ -120,7 +120,7 @@
/**
* Writes a byte to the socket.
* @param b the data to be written
- * @exception IOException If an I/O error has occurred.
+ * @throws IOException If an I/O error has occurred.
*/
public void write(int b) throws IOException {
temp[0] = (byte)b;
@@ -130,7 +130,7 @@
/**
* Writes the contents of the buffer b to the socket.
* @param b the data to be written
- * @exception SocketException If an I/O error has occurred.
+ * @throws SocketException If an I/O error has occurred.
*/
public void write(byte b[]) throws IOException {
socketWrite(b, 0, b.length);
@@ -142,7 +142,7 @@
* @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 SocketException If an I/O error has occurred.
+ * @throws SocketException If an I/O error has occurred.
*/
public void write(byte b[], int off, int len) throws IOException {
socketWrite(b, off, len);
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/SocketPermission.java
--- a/src/java.base/share/classes/java/net/SocketPermission.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/SocketPermission.java Fri Sep 20 11:07:52 2019 +0100
@@ -1361,10 +1361,10 @@
*
* @param permission the Permission object to add.
*
- * @exception IllegalArgumentException - if the permission is not a
+ * @throws IllegalArgumentException - if the permission is not a
* SocketPermission
*
- * @exception SecurityException - if this SocketPermissionCollection object
+ * @throws SecurityException - if this SocketPermissionCollection object
* has been marked readonly
*/
@Override
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/URL.java
--- a/src/java.base/share/classes/java/net/URL.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/URL.java Fri Sep 20 11:07:52 2019 +0100
@@ -349,7 +349,7 @@
* @param host the name of the host.
* @param port the port number on the host.
* @param file the file on the host
- * @exception MalformedURLException if an unknown protocol or the port
+ * @throws MalformedURLException if an unknown protocol or the port
* is a negative number other than -1
* @see java.lang.System#getProperty(java.lang.String)
* @see java.net.URL#setURLStreamHandlerFactory(
@@ -378,7 +378,7 @@
* @param protocol the name of the protocol to use.
* @param host the name of the host.
* @param file the file on the host.
- * @exception MalformedURLException if an unknown protocol is specified.
+ * @throws MalformedURLException if an unknown protocol is specified.
* @see java.net.URL#URL(java.lang.String, java.lang.String,
* int, java.lang.String)
*/
@@ -412,9 +412,9 @@
* @param port the port number on the host.
* @param file the file on the host
* @param handler the stream handler for the URL.
- * @exception MalformedURLException if an unknown protocol or the port
+ * @throws MalformedURLException if an unknown protocol or the port
is a negative number other than -1
- * @exception SecurityException
+ * @throws SecurityException
* if a security manager exists and its
* {@code checkPermission} method doesn't allow
* specifying a stream handler explicitly.
@@ -494,7 +494,7 @@
* constructor with a {@code null} first argument.
*
* @param spec the {@code String} to parse as a URL.
- * @exception MalformedURLException if no protocol is specified, or an
+ * @throws MalformedURLException if no protocol is specified, or an
* unknown protocol is found, or {@code spec} is {@code null},
* or the parsed URL fails to comply with the specific syntax
* of the associated protocol.
@@ -543,7 +543,7 @@
*
* @param context the context in which to parse the specification.
* @param spec the {@code String} to parse as a URL.
- * @exception MalformedURLException if no protocol is specified, or an
+ * @throws MalformedURLException if no protocol is specified, or an
* unknown protocol is found, or {@code spec} is {@code null},
* or the parsed URL fails to comply with the specific syntax
* of the associated protocol.
@@ -565,11 +565,11 @@
* @param context the context in which to parse the specification.
* @param spec the {@code String} to parse as a URL.
* @param handler the stream handler for the URL.
- * @exception MalformedURLException if no protocol is specified, or an
+ * @throws MalformedURLException if no protocol is specified, or an
* unknown protocol is found, or {@code spec} is {@code null},
* or the parsed URL fails to comply with the specific syntax
* of the associated protocol.
- * @exception SecurityException
+ * @throws SecurityException
* if a security manager exists and its
* {@code checkPermission} method doesn't allow
* specifying a stream handler.
@@ -1042,7 +1042,7 @@
* to a URI. However, some URLs that are not strictly in compliance
* can not be converted to a URI.
*
- * @exception URISyntaxException if this URL is not formatted strictly according to
+ * @throws URISyntaxException if this URL is not formatted strictly according to
* RFC2396 and cannot be converted to a URI.
*
* @return a URI instance equivalent to this URL.
@@ -1082,7 +1082,7 @@
*
* @return a {@link java.net.URLConnection URLConnection} linking
* to the URL.
- * @exception IOException if an I/O exception occurs.
+ * @throws IOException if an I/O exception occurs.
* @see java.net.URL#URL(java.lang.String, java.lang.String,
* int, java.lang.String)
*/
@@ -1103,13 +1103,13 @@
* will be made. If direct connection is desired,
* Proxy.NO_PROXY should be specified.
* @return a {@code URLConnection} to the URL.
- * @exception IOException if an I/O exception occurs.
- * @exception SecurityException if a security manager is present
+ * @throws IOException if an I/O exception occurs.
+ * @throws SecurityException if a security manager is present
* and the caller doesn't have permission to connect
* to the proxy.
- * @exception IllegalArgumentException will be thrown if proxy is null,
+ * @throws IllegalArgumentException will be thrown if proxy is null,
* or proxy has the wrong type
- * @exception UnsupportedOperationException if the subclass that
+ * @throws UnsupportedOperationException if the subclass that
* implements the protocol handler doesn't support
* this method.
* @see java.net.URL#URL(java.lang.String, java.lang.String,
@@ -1148,7 +1148,7 @@
*
*
* @return an input stream for reading from the URL connection.
- * @exception IOException if an I/O exception occurs.
+ * @throws IOException if an I/O exception occurs.
* @see java.net.URL#openConnection()
* @see java.net.URLConnection#getInputStream()
*/
@@ -1163,7 +1163,7 @@
*
*
* @return the contents of this URL.
- * @exception IOException if an I/O exception occurs.
+ * @throws IOException if an I/O exception occurs.
* @see java.net.URLConnection#getContent()
*/
public final Object getContent() throws java.io.IOException {
@@ -1180,7 +1180,7 @@
* @return the content object of this URL that is the first match of
* the types specified in the classes array.
* null if none of the requested types are supported.
- * @exception IOException if an I/O exception occurs.
+ * @throws IOException if an I/O exception occurs.
* @see java.net.URLConnection#getContent(Class[])
* @since 1.3
*/
@@ -1208,8 +1208,8 @@
* This could result in a SecurityException.
*
* @param fac the desired factory.
- * @exception Error if the application has already set a factory.
- * @exception SecurityException if a security manager exists and its
+ * @throws Error if the application has already set a factory.
+ * @throws SecurityException if a security manager exists and its
* {@code checkSetFactory} method doesn't allow
* the operation.
* @see java.net.URL#URL(java.lang.String, java.lang.String,
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/URLClassLoader.java
--- a/src/java.base/share/classes/java/net/URLClassLoader.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/URLClassLoader.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -99,12 +99,12 @@
* calls the security manager's {@code checkCreateClassLoader} method
* to ensure creation of a class loader is allowed.
*
- * @param urls the URLs from which to load classes and resources
- * @param parent the parent class loader for delegation
- * @exception SecurityException if a security manager exists and its
+ * @param urls the URLs from which to load classes and resources
+ * @param parent the parent class loader for delegation
+ * @throws SecurityException if a security manager exists and its
* {@code checkCreateClassLoader} method doesn't allow
* creation of a class loader.
- * @exception NullPointerException if {@code urls} or any of its
+ * @throws NullPointerException if {@code urls} or any of its
* elements is {@code null}.
* @see SecurityManager#checkCreateClassLoader
*/
@@ -134,12 +134,12 @@
* calls the security manager's {@code checkCreateClassLoader} method
* to ensure creation of a class loader is allowed.
*
- * @param urls the URLs from which to load classes and resources
+ * @param urls the URLs from which to load classes and resources
*
- * @exception SecurityException if a security manager exists and its
+ * @throws SecurityException if a security manager exists and its
* {@code checkCreateClassLoader} method doesn't allow
* creation of a class loader.
- * @exception NullPointerException if {@code urls} or any of its
+ * @throws NullPointerException if {@code urls} or any of its
* elements is {@code null}.
* @see SecurityManager#checkCreateClassLoader
*/
@@ -166,15 +166,15 @@
* calls the security manager's {@code checkCreateClassLoader} method
* to ensure creation of a class loader is allowed.
*
- * @param urls the URLs from which to load classes and resources
- * @param parent the parent class loader for delegation
- * @param factory the URLStreamHandlerFactory to use when creating URLs
+ * @param urls the URLs from which to load classes and resources
+ * @param parent the parent class loader for delegation
+ * @param factory the URLStreamHandlerFactory to use when creating URLs
*
- * @exception SecurityException if a security manager exists and its
- * {@code checkCreateClassLoader} method doesn't allow
- * creation of a class loader.
- * @exception NullPointerException if {@code urls} or any of its
- * elements is {@code null}.
+ * @throws SecurityException if a security manager exists and its
+ * {@code checkCreateClassLoader} method doesn't allow
+ * creation of a class loader.
+ * @throws NullPointerException if {@code urls} or any of its
+ * elements is {@code null}.
* @see SecurityManager#checkCreateClassLoader
*/
public URLClassLoader(URL[] urls, ClassLoader parent,
@@ -326,13 +326,13 @@
* and errors are not caught. Calling close on an already closed
* loader has no effect.
*
- * @exception IOException if closing any file opened by this class loader
+ * @throws IOException if closing any file opened by this class loader
* resulted in an IOException. Any such exceptions are caught internally.
* If only one is caught, then it is re-thrown. If more than one exception
* is caught, then the second and following exceptions are added
* as suppressed exceptions of the first one caught, which is then re-thrown.
*
- * @exception SecurityException if a security manager is set, and it denies
+ * @throws SecurityException if a security manager is set, and it denies
* {@link RuntimePermission}{@code ("closeClassLoader")}
*
* @since 1.7
@@ -401,11 +401,11 @@
* path. Any URLs referring to JAR files are loaded and opened as needed
* until the class is found.
*
- * @param name the name of the class
- * @return the resulting class
- * @exception ClassNotFoundException if the class could not be found,
+ * @param name the name of the class
+ * @return the resulting class
+ * @throws ClassNotFoundException if the class could not be found,
* or if the loader is closed.
- * @exception NullPointerException if {@code name} is {@code null}.
+ * @throws NullPointerException if {@code name} is {@code null}.
*/
protected Class> findClass(final String name)
throws ClassNotFoundException
@@ -628,7 +628,7 @@
* on the URL search path having the specified name.
*
* @param name the resource name
- * @exception IOException if an I/O exception occurs
+ * @throws IOException if an I/O exception occurs
* @return An {@code Enumeration} of {@code URL}s.
* If the loader is closed, the Enumeration contains no elements.
*/
@@ -696,7 +696,7 @@
* If the protocol is not "file", then permission
* to connect to and accept connections from the URL's host is granted.
* @param codesource the codesource
- * @exception NullPointerException if {@code codesource} is {@code null}.
+ * @throws NullPointerException if {@code codesource} is {@code null}.
* @return the permissions granted to the codesource
*/
protected PermissionCollection getPermissions(CodeSource codesource)
@@ -776,7 +776,7 @@
*
* @param urls the URLs to search for classes and resources
* @param parent the parent class loader for delegation
- * @exception NullPointerException if {@code urls} or any of its
+ * @throws NullPointerException if {@code urls} or any of its
* elements is {@code null}.
* @return the resulting class loader
*/
@@ -803,7 +803,7 @@
* loading the class.
*
* @param urls the URLs to search for classes and resources
- * @exception NullPointerException if {@code urls} or any of its
+ * @throws NullPointerException if {@code urls} or any of its
* elements is {@code null}.
* @return the resulting class loader
*/
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/URLConnection.java
--- a/src/java.base/share/classes/java/net/URLConnection.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/URLConnection.java Fri Sep 20 11:07:52 2019 +0100
@@ -327,7 +327,7 @@
* This could result in a SecurityException.
*
* @param map the FileNameMap to be set
- * @exception SecurityException if a security manager exists and its
+ * @throws SecurityException if a security manager exists and its
* {@code checkSetFactory} method doesn't allow the operation.
* @see SecurityManager#checkSetFactory
* @see #getFileNameMap()
@@ -357,7 +357,7 @@
*
* @throws SocketTimeoutException if the timeout expires before
* the connection can be established
- * @exception IOException if an I/O error occurs while opening the
+ * @throws IOException if an I/O error occurs while opening the
* connection.
* @see java.net.URLConnection#connected
* @see #getConnectTimeout()
@@ -734,9 +734,9 @@
* @return the object fetched. The {@code instanceof} operator
* should be used to determine the specific kind of object
* returned.
- * @exception IOException if an I/O error occurs while
+ * @throws IOException if an I/O error occurs while
* getting the content.
- * @exception UnknownServiceException if the protocol does not support
+ * @throws UnknownServiceException if the protocol does not support
* the content type.
* @see java.net.ContentHandlerFactory#createContentHandler(java.lang.String)
* @see java.net.URLConnection#getContentType()
@@ -760,9 +760,9 @@
* the requested types are supported.
* The {@code instanceof} operator should be used to
* determine the specific kind of object returned.
- * @exception IOException if an I/O error occurs while
+ * @throws IOException if an I/O error occurs while
* getting the content.
- * @exception UnknownServiceException if the protocol does not support
+ * @throws UnknownServiceException if the protocol does not support
* the content type.
* @see java.net.URLConnection#getContent()
* @see java.net.ContentHandlerFactory#createContentHandler(java.lang.String)
@@ -813,7 +813,7 @@
* necessary to make the connection represented by this
* URLConnection.
*
- * @exception IOException if the computation of the permission
+ * @throws IOException if the computation of the permission
* requires network or file I/O and an exception occurs while
* computing it.
*/
@@ -829,9 +829,9 @@
* is available for read.
*
* @return an input stream that reads from this open connection.
- * @exception IOException if an I/O error occurs while
+ * @throws IOException if an I/O error occurs while
* creating the input stream.
- * @exception UnknownServiceException if the protocol does not support
+ * @throws UnknownServiceException if the protocol does not support
* input.
* @see #setReadTimeout(int)
* @see #getReadTimeout()
@@ -844,9 +844,9 @@
* Returns an output stream that writes to this connection.
*
* @return an output stream that writes to this connection.
- * @exception IOException if an I/O error occurs while
+ * @throws IOException if an I/O error occurs while
* creating the output stream.
- * @exception UnknownServiceException if the protocol does not support
+ * @throws UnknownServiceException if the protocol does not support
* output.
*/
public OutputStream getOutputStream() throws IOException {
@@ -1250,8 +1250,8 @@
* This could result in a SecurityException.
*
* @param fac the desired factory.
- * @exception Error if the factory has already been defined.
- * @exception SecurityException if a security manager exists and its
+ * @throws Error if the factory has already been defined.
+ * @throws SecurityException if a security manager exists and its
* {@code checkSetFactory} method doesn't allow the operation.
* @see java.net.ContentHandlerFactory
* @see java.net.URLConnection#getContent()
@@ -1479,7 +1479,7 @@
* @param is an input stream that supports marks.
* @return a guess at the content type, or {@code null} if none
* can be determined.
- * @exception IOException if an I/O error occurs while reading the
+ * @throws IOException if an I/O error occurs while reading the
* input stream.
* @see java.io.InputStream#mark(int)
* @see java.io.InputStream#markSupported()
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/URLPermission.java
--- a/src/java.base/share/classes/java/net/URLPermission.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/URLPermission.java Fri Sep 20 11:07:52 2019 +0100
@@ -175,7 +175,7 @@
*
* @param actions the actions string
*
- * @exception IllegalArgumentException if url is invalid or if actions contains white-space.
+ * @throws IllegalArgumentException if url is invalid or if actions contains white-space.
*/
public URLPermission(String url, String actions) {
super(normalize(url));
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/net/URLStreamHandler.java
--- a/src/java.base/share/classes/java/net/URLStreamHandler.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/net/URLStreamHandler.java Fri Sep 20 11:07:52 2019 +0100
@@ -66,7 +66,7 @@
*
* @param u the URL that this connects to.
* @return a {@code URLConnection} object for the {@code URL}.
- * @exception IOException if an I/O error occurs while opening the
+ * @throws IOException if an I/O error occurs while opening the
* connection.
*/
protected abstract URLConnection openConnection(URL u) throws IOException;
@@ -91,11 +91,11 @@
* If direct connection is desired, Proxy.NO_PROXY
* should be specified.
* @return a {@code URLConnection} object for the {@code URL}.
- * @exception IOException if an I/O error occurs while opening the
+ * @throws IOException if an I/O error occurs while opening the
* connection.
- * @exception IllegalArgumentException if either u or p is null,
+ * @throws IllegalArgumentException if either u or p is null,
* or p has the wrong type.
- * @exception UnsupportedOperationException if the subclass that
+ * @throws UnsupportedOperationException if the subclass that
* implements the protocol doesn't support this method.
* @since 1.5
*/
@@ -510,7 +510,7 @@
* @param path the path component of the URL.
* @param query the query part for the URL.
* @param ref the reference.
- * @exception SecurityException if the protocol handler of the URL is
+ * @throws SecurityException if the protocol handler of the URL is
* different from this one
* @since 1.3
*/
@@ -539,7 +539,7 @@
* @param port the port on the remote machine.
* @param file the file.
* @param ref the reference.
- * @exception SecurityException if the protocol handler of the URL is
+ * @throws SecurityException if the protocol handler of the URL is
* different from this one
* @deprecated Use setURL(URL, String, String, int, String, String, String,
* String);
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/nio/Buffer.java
--- a/src/java.base/share/classes/java/nio/Buffer.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/nio/Buffer.java Fri Sep 20 11:07:52 2019 +0100
@@ -249,8 +249,8 @@
* @param capacity
* The new buffer's capacity, in $type$s
*
- * @throws IllegalArgumentException
- * If the {@code capacity} is a negative integer
+ * @throws IllegalArgumentException
+ * If the {@code capacity} is a negative integer
*/
static IllegalArgumentException createCapacityException(int capacity) {
assert capacity < 0 : "capacity expected to be negative";
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/nio/MappedByteBuffer.java
--- a/src/java.base/share/classes/java/nio/MappedByteBuffer.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/nio/MappedByteBuffer.java Fri Sep 20 11:07:52 2019 +0100
@@ -322,14 +322,14 @@
* mapping modes. This method may or may not have an effect for
* implementation-specific mapping modes. text
is null.
+ * @throws NullPointerException if text
is null.
*/
public AttributedString(String text) {
if (text == null) {
@@ -130,9 +130,9 @@
* Constructs an AttributedString instance with the given text and attributes.
* @param text The text for this attributed string.
* @param attributes The attributes that apply to the entire string.
- * @exception NullPointerException if text
or
+ * @throws NullPointerException if text
or
* attributes
is null.
- * @exception IllegalArgumentException if the text has length 0
+ * @throws IllegalArgumentException if the text has length 0
* and the attributes parameter is not an empty Map (attributes
* cannot be applied to a 0-length range).
*/
@@ -171,7 +171,7 @@
* Constructs an AttributedString instance with the given attributed
* text represented by AttributedCharacterIterator.
* @param text The text for this attributed string.
- * @exception NullPointerException if text
is null.
+ * @throws NullPointerException if text
is null.
*/
public AttributedString(AttributedCharacterIterator text) {
// If performance is critical, this constructor should be
@@ -192,8 +192,8 @@
* @param beginIndex Index of the first character of the range.
* @param endIndex Index of the character following the last character
* of the range.
- * @exception NullPointerException if text
is null.
- * @exception IllegalArgumentException if the subrange given by
+ * @throws NullPointerException if text
is null.
+ * @throws IllegalArgumentException if the subrange given by
* beginIndex and endIndex is out of the text range.
* @see java.text.Annotation
*/
@@ -220,8 +220,8 @@
* @param attributes Specifies attributes to be extracted
* from the text. If null is specified, all available attributes will
* be used.
- * @exception NullPointerException if text
is null.
- * @exception IllegalArgumentException if the subrange given by
+ * @throws NullPointerException if text
is null.
+ * @throws IllegalArgumentException if the subrange given by
* beginIndex and endIndex is out of the text range.
* @see java.text.Annotation
*/
@@ -307,8 +307,8 @@
* Adds an attribute to the entire string.
* @param attribute the attribute key
* @param value the value of the attribute; may be null
- * @exception NullPointerException if attribute
is null.
- * @exception IllegalArgumentException if the AttributedString has length 0
+ * @throws NullPointerException if attribute
is null.
+ * @throws IllegalArgumentException if the AttributedString has length 0
* (attributes cannot be applied to a 0-length range).
*/
public void addAttribute(Attribute attribute, Object value) {
@@ -331,8 +331,8 @@
* @param value The value of the attribute. May be null.
* @param beginIndex Index of the first character of the range.
* @param endIndex Index of the character following the last character of the range.
- * @exception NullPointerException if attribute
is null.
- * @exception IllegalArgumentException if beginIndex is less than 0, endIndex is
+ * @throws NullPointerException if attribute
is null.
+ * @throws IllegalArgumentException if beginIndex is less than 0, endIndex is
* greater than the length of the string, or beginIndex and endIndex together don't
* define a non-empty subrange of the string.
*/
@@ -356,8 +356,8 @@
* @param beginIndex Index of the first character of the range.
* @param endIndex Index of the character following the last
* character of the range.
- * @exception NullPointerException if attributes
is null.
- * @exception IllegalArgumentException if beginIndex is less than
+ * @throws NullPointerException if attributes
is null.
+ * @throws IllegalArgumentException if beginIndex is less than
* 0, endIndex is greater than the length of the string, or
* beginIndex and endIndex together don't define a non-empty
* subrange of the string and the attributes parameter is not an
@@ -580,7 +580,7 @@
* @param beginIndex the index of the first character
* @param endIndex the index of the character following the last character
* @return an iterator providing access to the text and its attributes
- * @exception IllegalArgumentException if beginIndex is less than 0,
+ * @throws IllegalArgumentException if beginIndex is less than 0,
* endIndex is greater than the length of the string, or beginIndex is
* greater than endIndex.
*/
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/BreakIterator.java
--- a/src/java.base/share/classes/java/text/BreakIterator.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/BreakIterator.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
@@ -327,7 +327,7 @@
* @return The first boundary after the specified offset or
* BreakIterator.DONE
if the last text boundary is passed in
* as the offset.
- * @exception IllegalArgumentException if the specified offset is less than
+ * @throws IllegalArgumentException if the specified offset is less than
* the first text boundary or greater than the last text boundary.
*/
public abstract int following(int offset);
@@ -343,7 +343,7 @@
* @return The last boundary before the specified offset or
* BreakIterator.DONE
if the first text boundary is passed in
* as the offset.
- * @exception IllegalArgumentException if the specified offset is less than
+ * @throws IllegalArgumentException if the specified offset is less than
* the first text boundary or greater than the last text boundary.
* @since 1.2
*/
@@ -363,7 +363,7 @@
* @param offset the character offset to check.
* @return true
if "offset" is a boundary position,
* false
otherwise.
- * @exception IllegalArgumentException if the specified offset is less than
+ * @throws IllegalArgumentException if the specified offset is less than
* the first text boundary or greater than the last text boundary.
* @since 1.2
*/
@@ -453,7 +453,7 @@
* for the given locale.
* @param locale the desired locale
* @return A break iterator for word breaks
- * @exception NullPointerException if locale
is null
+ * @throws NullPointerException if locale
is null
*/
public static BreakIterator getWordInstance(Locale locale)
{
@@ -477,7 +477,7 @@
* for the given locale.
* @param locale the desired locale
* @return A break iterator for line breaks
- * @exception NullPointerException if locale
is null
+ * @throws NullPointerException if locale
is null
*/
public static BreakIterator getLineInstance(Locale locale)
{
@@ -501,7 +501,7 @@
* for the given locale.
* @param locale the desired locale
* @return A break iterator for character breaks
- * @exception NullPointerException if locale
is null
+ * @throws NullPointerException if locale
is null
*/
public static BreakIterator getCharacterInstance(Locale locale)
{
@@ -525,7 +525,7 @@
* for the given locale.
* @param locale the desired locale
* @return A break iterator for sentence breaks
- * @exception NullPointerException if locale
is null
+ * @throws NullPointerException if locale
is null
*/
public static BreakIterator getSentenceInstance(Locale locale)
{
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/ChoiceFormat.java
--- a/src/java.base/share/classes/java/text/ChoiceFormat.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/ChoiceFormat.java Fri Sep 20 11:07:52 2019 +0100
@@ -174,7 +174,7 @@
/**
* Sets the pattern.
* @param newPattern See the class description.
- * @exception NullPointerException if {@code newPattern}
+ * @throws NullPointerException if {@code newPattern}
* is {@code null}
*/
public void applyPattern(String newPattern) {
@@ -313,7 +313,7 @@
* Constructs with limits and corresponding formats based on the pattern.
*
* @param newPattern the new pattern string
- * @exception NullPointerException if {@code newPattern} is
+ * @throws NullPointerException if {@code newPattern} is
* {@code null}
* @see #applyPattern
*/
@@ -326,7 +326,7 @@
*
* @param limits limits in ascending order
* @param formats corresponding format strings
- * @exception NullPointerException if {@code limits} or {@code formats}
+ * @throws NullPointerException if {@code limits} or {@code formats}
* is {@code null}
* @see #setChoices
*/
@@ -347,7 +347,7 @@
* When formatting with object Y,
* if the object is a NumberFormat, then ((NumberFormat) Y).format(X)
* is called. Otherwise Y.toString() is called.
- * @exception NullPointerException if {@code limits} or
+ * @throws NullPointerException if {@code limits} or
* {@code formats} is {@code null}
*/
public void setChoices(double[] limits, String formats[]) {
@@ -396,7 +396,7 @@
* @param number number to be formatted and substituted.
* @param toAppendTo where text is appended.
* @param status ignore no useful status is returned.
- * @exception NullPointerException if {@code toAppendTo}
+ * @throws NullPointerException if {@code toAppendTo}
* is {@code null}
*/
public StringBuffer format(double number, StringBuffer toAppendTo,
@@ -426,7 +426,7 @@
* status.index is unchanged and status.errorIndex is set to the
* first index of the character that caused the parse to fail.
* @return A Number representing the value of the number parsed.
- * @exception NullPointerException if {@code status} is {@code null}
+ * @throws NullPointerException if {@code status} is {@code null}
* or if {@code text} is {@code null} and the list of
* choice strings is not empty.
*/
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/CollationKey.java
--- a/src/java.base/share/classes/java/text/CollationKey.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/CollationKey.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -136,7 +136,7 @@
* CollationKey constructor.
*
* @param source the source string
- * @exception NullPointerException if {@code source} is null
+ * @throws NullPointerException if {@code source} is null
* @since 1.6
*/
protected CollationKey(String source) {
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/Collator.java
--- a/src/java.base/share/classes/java/text/Collator.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/Collator.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -296,7 +296,7 @@
* @return a negative integer, zero, or a positive integer as the
* first argument is less than, equal to, or greater than the
* second.
- * @exception ClassCastException the arguments cannot be cast to Strings.
+ * @throws ClassCastException the arguments cannot be cast to Strings.
* @see java.util.Comparator
* @since 1.2
*/
@@ -358,7 +358,7 @@
* @see java.text.Collator#SECONDARY
* @see java.text.Collator#TERTIARY
* @see java.text.Collator#IDENTICAL
- * @exception IllegalArgumentException If the new strength value is not one of
+ * @throws IllegalArgumentException If the new strength value is not one of
* PRIMARY, SECONDARY, TERTIARY or IDENTICAL.
*/
public synchronized void setStrength(int newStrength) {
@@ -402,7 +402,7 @@
* @see java.text.Collator#NO_DECOMPOSITION
* @see java.text.Collator#CANONICAL_DECOMPOSITION
* @see java.text.Collator#FULL_DECOMPOSITION
- * @exception IllegalArgumentException If the given value is not a valid decomposition
+ * @throws IllegalArgumentException If the given value is not a valid decomposition
* mode.
*/
public synchronized void setDecomposition(int decompositionMode) {
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/CompactNumberFormat.java
--- a/src/java.base/share/classes/java/text/CompactNumberFormat.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/CompactNumberFormat.java Fri Sep 20 11:07:52 2019 +0100
@@ -1342,7 +1342,7 @@
* @param pos a {@code ParsePosition} object with index and error
* index information as described above
* @return the parsed value, or {@code null} if the parse fails
- * @exception NullPointerException if {@code text} or
+ * @throws NullPointerException if {@code text} or
* {@code pos} is null
*
*/
@@ -2143,4 +2143,3 @@
}
}
-
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/DateFormat.java
--- a/src/java.base/share/classes/java/text/DateFormat.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/DateFormat.java Fri Sep 20 11:07:52 2019 +0100
@@ -323,7 +323,7 @@
* first occurrence of the timezone pattern character {@code 'z'}.
* @return the string buffer passed in as {@code toAppendTo},
* with formatted text appended.
- * @exception IllegalArgumentException if the {@code Format} cannot format
+ * @throws IllegalArgumentException if the {@code Format} cannot format
* the given {@code obj}.
* @see java.text.Format
*/
@@ -385,7 +385,7 @@
*
* @param source A String
whose beginning should be parsed.
* @return A Date
parsed from the string.
- * @exception ParseException if the beginning of the specified string
+ * @throws ParseException if the beginning of the specified string
* cannot be parsed.
*/
public Date parse(String source) throws ParseException
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/DateFormatSymbols.java
--- a/src/java.base/share/classes/java/text/DateFormatSymbols.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/DateFormatSymbols.java Fri Sep 20 11:07:52 2019 +0100
@@ -122,7 +122,7 @@
* @see #getInstance()
* @see java.util.Locale#getDefault(java.util.Locale.Category)
* @see java.util.Locale.Category#FORMAT
- * @exception java.util.MissingResourceException
+ * @throws java.util.MissingResourceException
* if the resources for the default locale cannot be
* found or cannot be loaded.
*/
@@ -142,7 +142,7 @@
*
* @param locale the desired locale
* @see #getInstance(Locale)
- * @exception java.util.MissingResourceException
+ * @throws java.util.MissingResourceException
* if the resources for the specified locale cannot be
* found or cannot be loaded.
*/
@@ -340,7 +340,7 @@
* implementations.
* @param locale the given locale.
* @return a DateFormatSymbols
instance.
- * @exception NullPointerException if locale
is null
+ * @throws NullPointerException if locale
is null
* @since 1.6
*/
public static final DateFormatSymbols getInstance(Locale locale) {
@@ -596,9 +596,9 @@
* All other entries are localized names.
*
* @param newZoneStrings the new time zone strings.
- * @exception IllegalArgumentException if the length of any row in
+ * @throws IllegalArgumentException if the length of any row in
* newZoneStrings
is less than 5
- * @exception NullPointerException if newZoneStrings
is null
+ * @throws NullPointerException if newZoneStrings
is null
* @see #getZoneStrings()
*/
public void setZoneStrings(String[][] newZoneStrings) {
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/DecimalFormat.java
--- a/src/java.base/share/classes/java/text/DecimalFormat.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/DecimalFormat.java Fri Sep 20 11:07:52 2019 +0100
@@ -425,8 +425,8 @@
* locale.
*
* @param pattern a non-localized pattern string.
- * @exception NullPointerException if {@code pattern} is null
- * @exception IllegalArgumentException if the given pattern is invalid.
+ * @throws NullPointerException if {@code pattern} is null
+ * @throws IllegalArgumentException if the given pattern is invalid.
* @see java.text.NumberFormat#getInstance
* @see java.text.NumberFormat#getNumberInstance
* @see java.text.NumberFormat#getCurrencyInstance
@@ -452,8 +452,8 @@
*
* @param pattern a non-localized pattern string
* @param symbols the set of symbols to be used
- * @exception NullPointerException if any of the given arguments is null
- * @exception IllegalArgumentException if the given pattern is invalid
+ * @throws NullPointerException if any of the given arguments is null
+ * @throws IllegalArgumentException if the given pattern is invalid
* @see java.text.NumberFormat#getInstance
* @see java.text.NumberFormat#getNumberInstance
* @see java.text.NumberFormat#getCurrencyInstance
@@ -486,11 +486,11 @@
* to 0 and 9, respectively for the output string
* {@code 1,234,567.89}.
* @return the value passed in as {@code toAppendTo}
- * @exception IllegalArgumentException if {@code number} is
+ * @throws IllegalArgumentException if {@code number} is
* null or not an instance of {@code Number}.
- * @exception NullPointerException if {@code toAppendTo} or
+ * @throws NullPointerException if {@code toAppendTo} or
* {@code pos} is null
- * @exception ArithmeticException if rounding is needed with rounding
+ * @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @see java.text.FieldPosition
*/
@@ -528,9 +528,9 @@
* and end index of {@code fieldPosition} will be set
* to 0 and 9, respectively for the output string
* {@code 1,234,567.89}.
- * @exception NullPointerException if {@code result} or
+ * @throws NullPointerException if {@code result} or
* {@code fieldPosition} is {@code null}
- * @exception ArithmeticException if rounding is needed with rounding
+ * @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @return The formatted number string
* @see java.text.FieldPosition
@@ -565,7 +565,7 @@
* @param number The double to format
* @param result where the text is to be appended
* @param delegate notified of locations of sub fields
- * @exception ArithmeticException if rounding is needed with rounding
+ * @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @return The formatted number string
*/
@@ -698,9 +698,9 @@
* and end index of {@code fieldPosition} will be set
* to 0 and 11, respectively for the output string
* {@code 123,456,789}.
- * @exception NullPointerException if {@code result} or
+ * @throws NullPointerException if {@code result} or
* {@code fieldPosition} is {@code null}
- * @exception ArithmeticException if rounding is needed with rounding
+ * @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @return The formatted number string
* @see java.text.FieldPosition
@@ -720,7 +720,7 @@
* @param result where the text is to be appended
* @param delegate notified of locations of sub fields
* @return The formatted number string
- * @exception ArithmeticException if rounding is needed with rounding
+ * @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @see java.text.FieldPosition
*/
@@ -795,7 +795,7 @@
* to 0 and 9, respectively for the output string
* {@code 1,234,567.89}.
* @return The formatted number string
- * @exception ArithmeticException if rounding is needed with rounding
+ * @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @see java.text.FieldPosition
*/
@@ -811,7 +811,7 @@
* @param number The BigDecimal to format
* @param result where the text is to be appended
* @param delegate notified of locations of sub fields
- * @exception ArithmeticException if rounding is needed with rounding
+ * @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @return The formatted number string
*/
@@ -854,7 +854,7 @@
* to 0 and 11, respectively for the output string
* {@code 123,456,789}.
* @return The formatted number string
- * @exception ArithmeticException if rounding is needed with rounding
+ * @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @see java.text.FieldPosition
*/
@@ -872,7 +872,7 @@
* @param result where the text is to be appended
* @param delegate notified of locations of sub fields
* @return The formatted number string
- * @exception ArithmeticException if rounding is needed with rounding
+ * @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @see java.text.FieldPosition
*/
@@ -923,10 +923,10 @@
* {@code NumberFormat.Field}, with the attribute value being the
* same as the attribute key.
*
- * @exception NullPointerException if obj is null.
- * @exception IllegalArgumentException when the Format cannot format the
+ * @throws NullPointerException if obj is null.
+ * @throws IllegalArgumentException when the Format cannot format the
* given object.
- * @exception ArithmeticException if rounding is needed with rounding
+ * @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @param obj The object to format
* @return AttributedCharacterIterator describing the formatted value.
@@ -2130,7 +2130,7 @@
* @param pos A {@code ParsePosition} object with index and error
* index information as described above.
* @return the parsed value, or {@code null} if the parse fails
- * @exception NullPointerException if {@code text} or
+ * @throws NullPointerException if {@code text} or
* {@code pos} is null.
*/
@Override
@@ -3254,8 +3254,8 @@
* these are presumed to be set in the positive pattern.
*
* @param pattern a new pattern
- * @exception NullPointerException if {@code pattern} is null
- * @exception IllegalArgumentException if the given pattern is invalid.
+ * @throws NullPointerException if {@code pattern} is null
+ * @throws IllegalArgumentException if the given pattern is invalid.
*/
public void applyPattern(String pattern) {
applyPattern(pattern, false);
@@ -3281,8 +3281,8 @@
* these are presumed to be set in the positive pattern.
*
* @param pattern a new pattern
- * @exception NullPointerException if {@code pattern} is null
- * @exception IllegalArgumentException if the given pattern is invalid.
+ * @throws NullPointerException if {@code pattern} is null
+ * @throws IllegalArgumentException if the given pattern is invalid.
*/
public void applyLocalizedPattern(String pattern) {
applyPattern(pattern, true);
@@ -3782,7 +3782,7 @@
* on this number format's symbols.
*
* @param currency the new currency to be used by this decimal format
- * @exception NullPointerException if {@code currency} is null
+ * @throws NullPointerException if {@code currency} is null
* @since 1.4
*/
@Override
@@ -3813,7 +3813,7 @@
*
* @param roundingMode The {@code RoundingMode} to be used
* @see #getRoundingMode()
- * @exception NullPointerException if {@code roundingMode} is null.
+ * @throws NullPointerException if {@code roundingMode} is null.
* @since 1.6
*/
@Override
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/DecimalFormatSymbols.java
--- a/src/java.base/share/classes/java/text/DecimalFormatSymbols.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/DecimalFormatSymbols.java Fri Sep 20 11:07:52 2019 +0100
@@ -109,7 +109,7 @@
* instead of the Latin numbering system.
*
* @param locale the desired locale
- * @exception NullPointerException if {@code locale} is null
+ * @throws NullPointerException if {@code locale} is null
*/
public DecimalFormatSymbols( Locale locale ) {
initialize( locale );
@@ -172,7 +172,7 @@
*
* @param locale the desired locale.
* @return a {@code DecimalFormatSymbols} instance.
- * @exception NullPointerException if {@code locale} is null
+ * @throws NullPointerException if {@code locale} is null
* @since 1.6
*/
public static final DecimalFormatSymbols getInstance(Locale locale) {
@@ -576,7 +576,7 @@
* symbol attribute to the currency's ISO 4217 currency code.
*
* @param currency the new currency to be used
- * @exception NullPointerException if {@code currency} is null
+ * @throws NullPointerException if {@code currency} is null
* @since 1.4
* @see #setCurrencySymbol
* @see #setInternationalCurrencySymbol
@@ -652,7 +652,7 @@
* Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.
*
* @param exp the exponent separator string
- * @exception NullPointerException if {@code exp} is null
+ * @throws NullPointerException if {@code exp} is null
* @see #getExponentSeparator()
* @since 1.6
*/
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/DigitList.java
--- a/src/java.base/share/classes/java/text/DigitList.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/DigitList.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2014, 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
@@ -445,7 +445,7 @@
* @param alreadyRounded whether or not rounding up has already happened.
* @param valueExactAsDecimal whether or not collected digits provide
* an exact decimal representation of the value.
- * @exception ArithmeticException if rounding is needed with rounding
+ * @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @return true if digit maximumDigits-1
should be
* incremented
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/Format.java
--- a/src/java.base/share/classes/java/text/Format.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/Format.java Fri Sep 20 11:07:52 2019 +0100
@@ -152,7 +152,7 @@
*
* @param obj The object to format
* @return Formatted string.
- * @exception IllegalArgumentException if the Format cannot format the given
+ * @throws IllegalArgumentException if the Format cannot format the given
* object
*/
public final String format (Object obj) {
@@ -172,9 +172,9 @@
* in the formatted text
* @return the string buffer passed in as toAppendTo
,
* with formatted text appended
- * @exception NullPointerException if toAppendTo
or
+ * @throws NullPointerException if toAppendTo
or
* pos
is null
- * @exception IllegalArgumentException if the Format cannot format the given
+ * @throws IllegalArgumentException if the Format cannot format the given
* object
*/
public abstract StringBuffer format(Object obj,
@@ -197,8 +197,8 @@
* that support fields should override this and create an
* AttributedCharacterIterator
with meaningful attributes.
*
- * @exception NullPointerException if obj is null.
- * @exception IllegalArgumentException when the Format cannot format the
+ * @throws NullPointerException if obj is null.
+ * @throws IllegalArgumentException when the Format cannot format the
* given object.
* @param obj The object to format
* @return AttributedCharacterIterator describing the formatted value.
@@ -237,7 +237,7 @@
*
* @param source A String
whose beginning should be parsed.
* @return An Object
parsed from the string.
- * @exception ParseException if the beginning of the specified string
+ * @throws ParseException if the beginning of the specified string
* cannot be parsed.
* @throws NullPointerException if {@code source} is null.
*/
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/MergeCollation.java
--- a/src/java.base/share/classes/java/text/MergeCollation.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/MergeCollation.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, 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
@@ -64,7 +64,7 @@
/**
* Creates from a pattern
- * @exception ParseException If the input pattern is incorrect.
+ * @throws ParseException If the input pattern is incorrect.
*/
public MergeCollation(String pattern) throws ParseException
{
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/MessageFormat.java
--- a/src/java.base/share/classes/java/text/MessageFormat.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/MessageFormat.java Fri Sep 20 11:07:52 2019 +0100
@@ -362,8 +362,8 @@
* class description.
*
* @param pattern the pattern for this message format
- * @exception IllegalArgumentException if the pattern is invalid
- * @exception NullPointerException if {@code pattern} is
+ * @throws IllegalArgumentException if the pattern is invalid
+ * @throws NullPointerException if {@code pattern} is
* {@code null}
*/
public MessageFormat(String pattern) {
@@ -381,8 +381,8 @@
*
* @param pattern the pattern for this message format
* @param locale the locale for this message format
- * @exception IllegalArgumentException if the pattern is invalid
- * @exception NullPointerException if {@code pattern} is
+ * @throws IllegalArgumentException if the pattern is invalid
+ * @throws NullPointerException if {@code pattern} is
* {@code null}
* @since 1.4
*/
@@ -430,8 +430,8 @@
* class description.
*
* @param pattern the pattern for this message format
- * @exception IllegalArgumentException if the pattern is invalid
- * @exception NullPointerException if {@code pattern} is
+ * @throws IllegalArgumentException if the pattern is invalid
+ * @throws NullPointerException if {@code pattern} is
* {@code null}
*/
@SuppressWarnings("fallthrough") // fallthrough in switch is expected, suppress it
@@ -614,7 +614,7 @@
* than newFormats.length
are replaced.
*
* @param newFormats the new formats to use
- * @exception NullPointerException if newFormats
is null
+ * @throws NullPointerException if newFormats
is null
* @since 1.4
*/
public void setFormatsByArgumentIndex(Format[] newFormats) {
@@ -646,7 +646,7 @@
* the parse
methods.
*
* @param newFormats the new formats to use
- * @exception NullPointerException if newFormats
is null
+ * @throws NullPointerException if newFormats
is null
*/
public void setFormats(Format[] newFormats) {
int runsToCopy = newFormats.length;
@@ -698,7 +698,7 @@
*
* @param formatElementIndex the index of a format element within the pattern
* @param newFormat the format to use for the specified format element
- * @exception ArrayIndexOutOfBoundsException if {@code formatElementIndex} is equal to or
+ * @throws ArrayIndexOutOfBoundsException if {@code formatElementIndex} is equal to or
* larger than the number of format elements in the pattern string
*/
public void setFormat(int formatElementIndex, Format newFormat) {
@@ -829,10 +829,10 @@
in the output string.
* @return the string buffer passed in as {@code result}, with formatted
* text appended
- * @exception IllegalArgumentException if an argument in the
+ * @throws IllegalArgumentException if an argument in the
* arguments
array is not of the type
* expected by the format element(s) that use it.
- * @exception NullPointerException if {@code result} is {@code null}
+ * @throws NullPointerException if {@code result} is {@code null}
*/
public final StringBuffer format(Object[] arguments, StringBuffer result,
FieldPosition pos)
@@ -850,11 +850,11 @@
* @param pattern the pattern string
* @param arguments object(s) to format
* @return the formatted string
- * @exception IllegalArgumentException if the pattern is invalid,
+ * @throws IllegalArgumentException if the pattern is invalid,
* or if an argument in the arguments
array
* is not of the type expected by the format element(s)
* that use it.
- * @exception NullPointerException if {@code pattern} is {@code null}
+ * @throws NullPointerException if {@code pattern} is {@code null}
*/
public static String format(String pattern, Object ... arguments) {
MessageFormat temp = new MessageFormat(pattern);
@@ -875,10 +875,10 @@
* @param result where text is appended.
* @param pos keeps track on the position of the first replaced argument
* in the output string.
- * @exception IllegalArgumentException if an argument in the
+ * @throws IllegalArgumentException if an argument in the
* arguments
array is not of the type
* expected by the format element(s) that use it.
- * @exception NullPointerException if {@code result} is {@code null}
+ * @throws NullPointerException if {@code result} is {@code null}
*/
public final StringBuffer format(Object arguments, StringBuffer result,
FieldPosition pos)
@@ -915,8 +915,8 @@
*
* @param arguments an array of objects to be formatted and substituted.
* @return AttributedCharacterIterator describing the formatted value.
- * @exception NullPointerException if arguments
is null.
- * @exception IllegalArgumentException if an argument in the
+ * @throws NullPointerException if arguments
is null.
+ * @throws IllegalArgumentException if an argument in the
* arguments
array is not of the type
* expected by the format element(s) that use it.
* @since 1.4
@@ -968,7 +968,7 @@
* @param source the string to parse
* @param pos the parse position
* @return an array of parsed objects
- * @exception NullPointerException if {@code pos} is {@code null}
+ * @throws NullPointerException if {@code pos} is {@code null}
* for a non-null {@code source} string.
*/
public Object[] parse(String source, ParsePosition pos) {
@@ -1057,7 +1057,7 @@
*
* @param source A String
whose beginning should be parsed.
* @return An Object
array parsed from the string.
- * @exception ParseException if the beginning of the specified string
+ * @throws ParseException if the beginning of the specified string
* cannot be parsed.
*/
public Object[] parse(String source) throws ParseException {
@@ -1253,7 +1253,7 @@
* {@code Field.ARGUMENT} as the field attribute, the location of
* the first replaced argument will be set in it.
*
- * @exception IllegalArgumentException if an argument in the
+ * @throws IllegalArgumentException if an argument in the
* arguments
array is not of the type
* expected by the format element(s) that use it.
*/
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/NumberFormat.java
--- a/src/java.base/share/classes/java/text/NumberFormat.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/NumberFormat.java Fri Sep 20 11:07:52 2019 +0100
@@ -259,11 +259,11 @@
* to 0 and 9, respectively for the output string
* {@code 1,234,567.89}.
* @return the value passed in as toAppendTo
- * @exception IllegalArgumentException if number
is
+ * @throws IllegalArgumentException if number
is
* null or not an instance of Number
.
- * @exception NullPointerException if toAppendTo
or
+ * @throws NullPointerException if toAppendTo
or
* pos
is null
- * @exception ArithmeticException if rounding is needed with rounding
+ * @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @see java.text.FieldPosition
*/
@@ -318,7 +318,7 @@
*
* @param number the double number to format
* @return the formatted String
- * @exception ArithmeticException if rounding is needed with rounding
+ * @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @see java.text.Format#format
*/
@@ -343,7 +343,7 @@
*
* @param number the long number to format
* @return the formatted String
- * @exception ArithmeticException if rounding is needed with rounding
+ * @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @see java.text.Format#format
*/
@@ -367,7 +367,7 @@
* to 0 and 9, respectively for the output string
* {@code 1,234,567.89}.
* @return the formatted StringBuffer
- * @exception ArithmeticException if rounding is needed with rounding
+ * @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @see java.text.Format#format
*/
@@ -390,7 +390,7 @@
* to 0 and 11, respectively for the output string
* {@code 123,456,789}.
* @return the formatted StringBuffer
- * @exception ArithmeticException if rounding is needed with rounding
+ * @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @see java.text.Format#format
*/
@@ -424,7 +424,7 @@
*
* @param source A String
whose beginning should be parsed.
* @return A Number
parsed from the string.
- * @exception ParseException if the beginning of the specified string
+ * @throws ParseException if the beginning of the specified string
* cannot be parsed.
*/
public Number parse(String source) throws ParseException {
@@ -891,7 +891,7 @@
* UnsupportedOperationException
.
*
* @return the currency used by this number format, or null
- * @exception UnsupportedOperationException if the number format class
+ * @throws UnsupportedOperationException if the number format class
* doesn't implement currency formatting
* @since 1.4
*/
@@ -908,9 +908,9 @@
* UnsupportedOperationException
.
*
* @param currency the new currency to be used by this number format
- * @exception UnsupportedOperationException if the number format class
+ * @throws UnsupportedOperationException if the number format class
* doesn't implement currency formatting
- * @exception NullPointerException if currency
is null
+ * @throws NullPointerException if currency
is null
* @since 1.4
*/
public void setCurrency(Currency currency) {
@@ -924,7 +924,7 @@
* Subclasses which handle different rounding modes should override
* this method.
*
- * @exception UnsupportedOperationException The default implementation
+ * @throws UnsupportedOperationException The default implementation
* always throws this exception
* @return The RoundingMode
used for this NumberFormat.
* @see #setRoundingMode(RoundingMode)
@@ -941,9 +941,9 @@
* Subclasses which handle different rounding modes should override
* this method.
*
- * @exception UnsupportedOperationException The default implementation
+ * @throws UnsupportedOperationException The default implementation
* always throws this exception
- * @exception NullPointerException if roundingMode
is null
+ * @throws NullPointerException if roundingMode
is null
* @param roundingMode The RoundingMode
to be used
* @see #getRoundingMode()
* @since 1.6
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/RBTableBuilder.java
--- a/src/java.base/share/classes/java/text/RBTableBuilder.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/RBTableBuilder.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -72,7 +72,7 @@
* stores them back in the RBCollationTables object. It is called
* ONLY by the RBCollationTables constructor.
* @see RuleBasedCollator#RuleBasedCollator
- * @exception ParseException If the rules format is incorrect.
+ * @throws ParseException If the rules format is incorrect.
*/
public void build(String pattern, int decmp) throws ParseException {
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/RuleBasedCollator.java
--- a/src/java.base/share/classes/java/text/RuleBasedCollator.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/RuleBasedCollator.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -273,7 +273,7 @@
* description for more details on the collation rule syntax.
* @see java.util.Locale
* @param rules the collation rules to build the collation table from.
- * @exception ParseException A format exception
+ * @throws ParseException A format exception
* will be thrown if the build process of the rules fails. For
* example, build rule "a < ? < d" will cause the constructor to
* throw the ParseException because the '?' is not quoted.
@@ -290,7 +290,7 @@
* @param rules the collation rules to build the collation table from.
* @param decomp the decomposition strength used to build the
* collation table and to perform comparisons.
- * @exception ParseException A format exception
+ * @throws ParseException A format exception
* will be thrown if the build process of the rules fails. For
* example, build rule "a < ? < d" will cause the constructor to
* throw the ParseException because the '?' is not quoted.
@@ -350,7 +350,7 @@
* than, greater than or equal to another string in a language.
* This can be overridden in a subclass.
*
- * @exception NullPointerException if source
or target
is null.
+ * @throws NullPointerException if source
or target
is null.
*/
public synchronized int compare(String source, String target)
{
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/SimpleDateFormat.java
--- a/src/java.base/share/classes/java/text/SimpleDateFormat.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/SimpleDateFormat.java Fri Sep 20 11:07:52 2019 +0100
@@ -592,8 +592,8 @@
* @see java.util.Locale#getDefault(java.util.Locale.Category)
* @see java.util.Locale.Category#FORMAT
* @param pattern the pattern describing the date and time format
- * @exception NullPointerException if the given pattern is null
- * @exception IllegalArgumentException if the given pattern is invalid
+ * @throws NullPointerException if the given pattern is null
+ * @throws IllegalArgumentException if the given pattern is invalid
*/
public SimpleDateFormat(String pattern)
{
@@ -609,8 +609,8 @@
*
* @param pattern the pattern describing the date and time format
* @param locale the locale whose date format symbols should be used
- * @exception NullPointerException if the given pattern or locale is null
- * @exception IllegalArgumentException if the given pattern is invalid
+ * @throws NullPointerException if the given pattern or locale is null
+ * @throws IllegalArgumentException if the given pattern is invalid
*/
public SimpleDateFormat(String pattern, Locale locale)
{
@@ -631,8 +631,8 @@
*
* @param pattern the pattern describing the date and time format
* @param formatSymbols the date format symbols to be used for formatting
- * @exception NullPointerException if the given pattern or formatSymbols is null
- * @exception IllegalArgumentException if the given pattern is invalid
+ * @throws NullPointerException if the given pattern or formatSymbols is null
+ * @throws IllegalArgumentException if the given pattern is invalid
*/
public SimpleDateFormat(String pattern, DateFormatSymbols formatSymbols)
{
@@ -739,8 +739,8 @@
* is "'o'", the TaggedData entry is
* ((TAG_QUOTE_ASCII_CHAR&nbs;<<&nbs;8)&nbs;|&nbs;'o')
.
*
- * @exception NullPointerException if the given pattern is null
- * @exception IllegalArgumentException if the given pattern is invalid
+ * @throws NullPointerException if the given pattern is null
+ * @throws IllegalArgumentException if the given pattern is invalid
*/
private char[] compile(String pattern) {
int length = pattern.length();
@@ -958,7 +958,7 @@
* {@code fieldPosition} will be set to 5 and 8, respectively, for the
* first occurrence of the timezone pattern character {@code 'z'}.
* @return the formatted date-time string.
- * @exception NullPointerException if any of the parameters is {@code null}.
+ * @throws NullPointerException if any of the parameters is {@code null}.
*/
@Override
public StringBuffer format(Date date, StringBuffer toAppendTo,
@@ -1012,8 +1012,8 @@
* DateFormat.Field
, with the corresponding attribute value
* being the same as the attribute key.
*
- * @exception NullPointerException if obj is null.
- * @exception IllegalArgumentException if the Format cannot format the
+ * @throws NullPointerException if obj is null.
+ * @throws IllegalArgumentException if the Format cannot format the
* given object, or if the Format's pattern string is invalid.
* @param obj The object to format
* @return AttributedCharacterIterator describing the formatted value.
@@ -1459,7 +1459,7 @@
* index information as described above.
* @return A Date
parsed from the string. In case of
* error, returns null.
- * @exception NullPointerException if text
or pos
is null.
+ * @throws NullPointerException if text
or pos
is null.
*/
@Override
public Date parse(String text, ParsePosition pos)
@@ -2276,7 +2276,7 @@
* Translates a pattern, mapping each character in the from string to the
* corresponding character in the to string.
*
- * @exception IllegalArgumentException if the given pattern is invalid
+ * @throws IllegalArgumentException if the given pattern is invalid
*/
private String translatePattern(String pattern, String from, String to) {
StringBuilder result = new StringBuilder();
@@ -2339,8 +2339,8 @@
* Applies the given pattern string to this date format.
*
* @param pattern the new date and time pattern for this date format
- * @exception NullPointerException if the given pattern is null
- * @exception IllegalArgumentException if the given pattern is invalid
+ * @throws NullPointerException if the given pattern is null
+ * @throws IllegalArgumentException if the given pattern is invalid
*/
public void applyPattern(String pattern)
{
@@ -2357,8 +2357,8 @@
*
* @param pattern a String to be mapped to the new date and time format
* pattern for this format
- * @exception NullPointerException if the given pattern is null
- * @exception IllegalArgumentException if the given pattern is invalid
+ * @throws NullPointerException if the given pattern is null
+ * @throws IllegalArgumentException if the given pattern is invalid
*/
public void applyLocalizedPattern(String pattern) {
String p = translatePattern(pattern,
@@ -2383,7 +2383,7 @@
* Sets the date and time format symbols of this date format.
*
* @param newFormatSymbols the new date and time format symbols
- * @exception NullPointerException if the given newFormatSymbols is null
+ * @throws NullPointerException if the given newFormatSymbols is null
* @see #getDateFormatSymbols
*/
public void setDateFormatSymbols(DateFormatSymbols newFormatSymbols)
@@ -2470,7 +2470,7 @@
* After reading an object from the input stream, the format
* pattern in the object is verified.
*
- * @exception InvalidObjectException if the pattern is invalid
+ * @throws InvalidObjectException if the pattern is invalid
*/
@java.io.Serial
private void readObject(ObjectInputStream stream)
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/spi/BreakIteratorProvider.java
--- a/src/java.base/share/classes/java/text/spi/BreakIteratorProvider.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/spi/BreakIteratorProvider.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -51,8 +51,8 @@
* for the given locale.
* @param locale the desired locale
* @return A break iterator for word breaks
- * @exception NullPointerException if locale
is null
- * @exception IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if locale
is null
+ * @throws IllegalArgumentException if locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@@ -66,8 +66,8 @@
* for the given locale.
* @param locale the desired locale
* @return A break iterator for line breaks
- * @exception NullPointerException if locale
is null
- * @exception IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if locale
is null
+ * @throws IllegalArgumentException if locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@@ -81,8 +81,8 @@
* for the given locale.
* @param locale the desired locale
* @return A break iterator for character breaks
- * @exception NullPointerException if locale
is null
- * @exception IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if locale
is null
+ * @throws IllegalArgumentException if locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@@ -96,8 +96,8 @@
* for the given locale.
* @param locale the desired locale
* @return A break iterator for sentence breaks
- * @exception NullPointerException if locale
is null
- * @exception IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if locale
is null
+ * @throws IllegalArgumentException if locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/spi/CollatorProvider.java
--- a/src/java.base/share/classes/java/text/spi/CollatorProvider.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/spi/CollatorProvider.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -49,9 +49,9 @@
* Returns a new Collator
instance for the specified locale.
* @param locale the desired locale.
* @return the Collator
for the desired locale.
- * @exception NullPointerException if
+ * @throws NullPointerException if
* locale
is null
- * @exception IllegalArgumentException if locale
isn't
+ * @throws IllegalArgumentException if locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/spi/DateFormatProvider.java
--- a/src/java.base/share/classes/java/text/spi/DateFormatProvider.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/spi/DateFormatProvider.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -54,12 +54,12 @@
* {@link java.text.DateFormat#LONG DateFormat.LONG}, or
* {@link java.text.DateFormat#FULL DateFormat.FULL}.
* @param locale the desired locale.
- * @exception IllegalArgumentException if style
is invalid,
+ * @throws IllegalArgumentException if style
is invalid,
* or if locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
- * @exception NullPointerException if locale
is null
+ * @throws NullPointerException if locale
is null
* @return a time formatter.
* @see java.text.DateFormat#getTimeInstance(int, java.util.Locale)
*/
@@ -74,12 +74,12 @@
* {@link java.text.DateFormat#LONG DateFormat.LONG}, or
* {@link java.text.DateFormat#FULL DateFormat.FULL}.
* @param locale the desired locale.
- * @exception IllegalArgumentException if style
is invalid,
+ * @throws IllegalArgumentException if style
is invalid,
* or if locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
- * @exception NullPointerException if locale
is null
+ * @throws NullPointerException if locale
is null
* @return a date formatter.
* @see java.text.DateFormat#getDateInstance(int, java.util.Locale)
*/
@@ -99,13 +99,13 @@
* {@link java.text.DateFormat#LONG DateFormat.LONG}, or
* {@link java.text.DateFormat#FULL DateFormat.FULL}.
* @param locale the desired locale.
- * @exception IllegalArgumentException if dateStyle
or
+ * @throws IllegalArgumentException if dateStyle
or
* timeStyle
is invalid,
* or if locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
- * @exception NullPointerException if locale
is null
+ * @throws NullPointerException if locale
is null
* @return a date/time formatter.
* @see java.text.DateFormat#getDateTimeInstance(int, int, java.util.Locale)
*/
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/spi/DateFormatSymbolsProvider.java
--- a/src/java.base/share/classes/java/text/spi/DateFormatSymbolsProvider.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/spi/DateFormatSymbolsProvider.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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,8 +50,8 @@
* specified locale.
*
* @param locale the desired locale
- * @exception NullPointerException if locale
is null
- * @exception IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if locale
is null
+ * @throws IllegalArgumentException if locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/spi/DecimalFormatSymbolsProvider.java
--- a/src/java.base/share/classes/java/text/spi/DecimalFormatSymbolsProvider.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/spi/DecimalFormatSymbolsProvider.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -60,8 +60,8 @@
* specified locale.
*
* @param locale the desired locale
- * @exception NullPointerException if locale
is null
- * @exception IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if locale
is null
+ * @throws IllegalArgumentException if locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/text/spi/NumberFormatProvider.java
--- a/src/java.base/share/classes/java/text/spi/NumberFormatProvider.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/spi/NumberFormatProvider.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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,8 +50,8 @@
* monetary values for the specified locale.
*
* @param locale the desired locale.
- * @exception NullPointerException if locale
is null
- * @exception IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if locale
is null
+ * @throws IllegalArgumentException if locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@@ -71,8 +71,8 @@
* java.text.NumberFormat#isParseIntegerOnly isParseIntegerOnly}).
*
* @param locale the desired locale
- * @exception NullPointerException if locale
is null
- * @exception IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if locale
is null
+ * @throws IllegalArgumentException if locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@@ -86,8 +86,8 @@
* the specified locale.
*
* @param locale the desired locale
- * @exception NullPointerException if locale
is null
- * @exception IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if locale
is null
+ * @throws IllegalArgumentException if locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@@ -101,8 +101,8 @@
* percentage values for the specified locale.
*
* @param locale the desired locale
- * @exception NullPointerException if locale
is null
- * @exception IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if locale
is null
+ * @throws IllegalArgumentException if locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/Calendar.java
--- a/src/java.base/share/classes/java/util/Calendar.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/Calendar.java Fri Sep 20 11:07:52 2019 +0100
@@ -2100,11 +2100,11 @@
* {@code field} in the given {@code style}, or
* {@code null} if no string representation is
* applicable.
- * @exception IllegalArgumentException
+ * @throws IllegalArgumentException
* if {@code field} or {@code style} is invalid,
* or if this {@code Calendar} is non-lenient and any
* of the calendar fields have invalid values
- * @exception NullPointerException
+ * @throws NullPointerException
* if {@code locale} is null
* @since 1.6
*/
@@ -2191,11 +2191,11 @@
* {@code style} and {@code locale} and their
* field values, or {@code null} if no display names
* are defined for {@code field}
- * @exception IllegalArgumentException
+ * @throws IllegalArgumentException
* if {@code field} or {@code style} is invalid,
* or if this {@code Calendar} is non-lenient and any
* of the calendar fields have invalid values
- * @exception NullPointerException
+ * @throws NullPointerException
* if {@code locale} is null
* @since 1.6
*/
@@ -2311,7 +2311,7 @@
*
* @return true
if the field has been set externally,
* false
otherwise.
- * @exception IndexOutOfBoundsException if the specified
+ * @throws IndexOutOfBoundsException if the specified
* field
is out of range
* (field < 0 || field >= FIELD_COUNT
).
* @see #selectFields()
@@ -2344,7 +2344,7 @@
* rather than by calling one of the setter methods.
*
* @param fieldMask the field to be marked as computed.
- * @exception IndexOutOfBoundsException if the specified
+ * @throws IndexOutOfBoundsException if the specified
* field
is out of range
* (field < 0 || field >= FIELD_COUNT
).
* @see #isExternallySet(int)
@@ -2381,7 +2381,7 @@
*
* @param fieldMask the field mask indicating which calendar fields are in
* sync with the time value.
- * @exception IndexOutOfBoundsException if the specified
+ * @throws IndexOutOfBoundsException if the specified
* field
is out of range
* (field < 0 || field >= FIELD_COUNT
).
* @see #isExternallySet(int)
@@ -2806,9 +2806,9 @@
* before the time represented by the argument; and a value greater than
* 0
if the time of this Calendar
is after the
* time represented by the argument.
- * @exception NullPointerException if the specified Calendar
is
+ * @throws NullPointerException if the specified Calendar
is
* null
.
- * @exception IllegalArgumentException if the time value of the
+ * @throws IllegalArgumentException if the time value of the
* specified Calendar
object can't be obtained due to
* any invalid calendar values.
* @since 1.5
@@ -3054,7 +3054,7 @@
* {@link UnsupportedOperationException}.
*
* @return the week year of this {@code Calendar}
- * @exception UnsupportedOperationException
+ * @throws UnsupportedOperationException
* if any week year numbering isn't supported
* in this {@code Calendar}.
* @see #isWeekDateSupported()
@@ -3086,11 +3086,11 @@
* @param dayOfWeek the day of week value: one of the constants
* for the {@link #DAY_OF_WEEK} field: {@link
* #SUNDAY}, ..., {@link #SATURDAY}.
- * @exception IllegalArgumentException
+ * @throws IllegalArgumentException
* if any of the given date specifiers is invalid
* or any of the calendar fields are inconsistent
* with the given date specifiers in non-lenient mode
- * @exception UnsupportedOperationException
+ * @throws UnsupportedOperationException
* if any week year numbering isn't supported in this
* {@code Calendar}.
* @see #isWeekDateSupported()
@@ -3110,7 +3110,7 @@
* {@code UnsupportedOperationException}.
*
* @return the number of weeks in the week year.
- * @exception UnsupportedOperationException
+ * @throws UnsupportedOperationException
* if any week year numbering isn't supported in this
* {@code Calendar}.
* @see #WEEK_OF_YEAR
@@ -3351,7 +3351,7 @@
*
* @param field the calendar field
* @return the calendar field name
- * @exception IndexOutOfBoundsException if field
is negative,
+ * @throws IndexOutOfBoundsException if field
is negative,
* equal to or greater than {@code FIELD_COUNT}.
*/
static String getFieldName(int field) {
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/Currency.java
--- a/src/java.base/share/classes/java/util/Currency.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/Currency.java Fri Sep 20 11:07:52 2019 +0100
@@ -289,8 +289,8 @@
*
* @param currencyCode the ISO 4217 code of the currency
* @return the Currency
instance for the given currency code
- * @exception NullPointerException if currencyCode
is null
- * @exception IllegalArgumentException if currencyCode
is not
+ * @throws NullPointerException if currencyCode
is null
+ * @throws IllegalArgumentException if currencyCode
is not
* a supported ISO 4217 code.
*/
public static Currency getInstance(String currencyCode) {
@@ -372,9 +372,9 @@
* instance is needed
* @return the Currency
instance for the country of the given
* locale, or {@code null}
- * @exception NullPointerException if locale
+ * @throws NullPointerException if locale
* is {@code null}
- * @exception IllegalArgumentException if the country of the given {@code locale}
+ * @throws IllegalArgumentException if the country of the given {@code locale}
* is not a supported ISO 3166 country code.
*/
public static Currency getInstance(Locale locale) {
@@ -537,7 +537,7 @@
* @param locale the locale for which a display name for this currency is
* needed
* @return the symbol of this currency for the specified locale
- * @exception NullPointerException if locale
is null
+ * @throws NullPointerException if locale
is null
*/
public String getSymbol(Locale locale) {
LocaleServiceProviderPool pool =
@@ -632,7 +632,7 @@
* @param locale the locale for which a display name for this currency is
* needed
* @return the display name of this currency for the specified locale
- * @exception NullPointerException if locale
is null
+ * @throws NullPointerException if locale
is null
* @since 1.7
*/
public String getDisplayName(Locale locale) {
@@ -1197,5 +1197,3 @@
}
}
-
-
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/Date.java
--- a/src/java.base/share/classes/java/util/Date.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/Date.java Fri Sep 20 11:07:52 2019 +0100
@@ -910,7 +910,7 @@
* represented by this {@code Date} object is strictly
* earlier than the instant represented by {@code when};
* {@code false} otherwise.
- * @exception NullPointerException if {@code when} is null.
+ * @throws NullPointerException if {@code when} is null.
*/
public boolean before(Date when) {
return getMillisOf(this) < getMillisOf(when);
@@ -924,7 +924,7 @@
* by this {@code Date} object is strictly later than the
* instant represented by {@code when};
* {@code false} otherwise.
- * @exception NullPointerException if {@code when} is null.
+ * @throws NullPointerException if {@code when} is null.
*/
public boolean after(Date when) {
return getMillisOf(this) > getMillisOf(when);
@@ -973,7 +973,7 @@
* is before the Date argument; and a value greater than
* {@code 0} if this Date is after the Date argument.
* @since 1.2
- * @exception NullPointerException if {@code anotherDate} is null.
+ * @throws NullPointerException if {@code anotherDate} is null.
*/
public int compareTo(Date anotherDate) {
long thisTime = getMillisOf(this);
@@ -1353,8 +1353,8 @@
* @param instant the instant to convert
* @return a {@code Date} representing the same point on the time-line as
* the provided instant
- * @exception NullPointerException if {@code instant} is null.
- * @exception IllegalArgumentException if the instant is too large to
+ * @throws NullPointerException if {@code instant} is null.
+ * @throws IllegalArgumentException if the instant is too large to
* represent as a {@code Date}
* @since 1.8
*/
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/Dictionary.java
--- a/src/java.base/share/classes/java/util/Dictionary.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/Dictionary.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2004, 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
@@ -106,7 +106,7 @@
* @param key a key in this dictionary.
* {@code null} if the key is not mapped to any value in
* this dictionary.
- * @exception NullPointerException if the {@code key} is {@code null}.
+ * @throws NullPointerException if the {@code key} is {@code null}.
* @see java.util.Dictionary#put(java.lang.Object, java.lang.Object)
*/
public abstract V get(Object key);
@@ -133,7 +133,7 @@
* @return the previous value to which the {@code key} was mapped
* in this dictionary, or {@code null} if the key did not
* have a previous mapping.
- * @exception NullPointerException if the {@code key} or
+ * @throws NullPointerException if the {@code key} or
* {@code value} is {@code null}.
* @see java.lang.Object#equals(java.lang.Object)
* @see java.util.Dictionary#get(java.lang.Object)
@@ -149,7 +149,7 @@
* @return the value to which the {@code key} had been mapped in this
* dictionary, or {@code null} if the key did not have a
* mapping.
- * @exception NullPointerException if {@code key} is {@code null}.
+ * @throws NullPointerException if {@code key} is {@code null}.
*/
public abstract V remove(Object key);
}
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/Enumeration.java
--- a/src/java.base/share/classes/java/util/Enumeration.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/Enumeration.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
@@ -76,7 +76,7 @@
* object has at least one more element to provide.
*
* @return the next element of this enumeration.
- * @exception NoSuchElementException if no more elements exist.
+ * @throws NoSuchElementException if no more elements exist.
*/
E nextElement();
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/GregorianCalendar.java
--- a/src/java.base/share/classes/java/util/GregorianCalendar.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/GregorianCalendar.java Fri Sep 20 11:07:52 2019 +0100
@@ -904,7 +904,7 @@
*
* @param field the calendar field.
* @param amount the amount of date or time to be added to the field.
- * @exception IllegalArgumentException if field
is
+ * @throws IllegalArgumentException if field
is
* ZONE_OFFSET
, DST_OFFSET
, or unknown,
* or if any calendar fields have out-of-range values in
* non-lenient mode.
@@ -1101,7 +1101,7 @@
*
* @param up indicates if the value of the specified calendar field is to be
* rolled up or rolled down. Use true
if rolling up, false
otherwise.
- * @exception IllegalArgumentException if field
is
+ * @throws IllegalArgumentException if field
is
* ZONE_OFFSET
, DST_OFFSET
, or unknown,
* or if any calendar fields have out-of-range values in
* non-lenient mode.
@@ -1148,7 +1148,7 @@
*
* @param field the calendar field.
* @param amount the signed amount to add to field
.
- * @exception IllegalArgumentException if field
is
+ * @throws IllegalArgumentException if field
is
* ZONE_OFFSET
, DST_OFFSET
, or unknown,
* or if any calendar fields have out-of-range values in
* non-lenient mode.
@@ -2183,7 +2183,7 @@
* for the {@link #DAY_OF_WEEK DAY_OF_WEEK} field:
* {@link Calendar#SUNDAY SUNDAY}, ...,
* {@link Calendar#SATURDAY SATURDAY}.
- * @exception IllegalArgumentException
+ * @throws IllegalArgumentException
* if any of the given date specifiers is invalid,
* or if any of the calendar fields are inconsistent
* with the given date specifiers in non-lenient mode
@@ -2626,7 +2626,7 @@
* Converts calendar field values to the time value (millisecond
* offset from the Epoch).
*
- * @exception IllegalArgumentException if any calendar fields are invalid.
+ * @throws IllegalArgumentException if any calendar fields are invalid.
*/
@Override
protected void computeTime() {
@@ -3279,8 +3279,8 @@
* @param zdt the zoned date-time object to convert
* @return the gregorian calendar representing the same point on the
* time-line as the zoned date-time provided
- * @exception NullPointerException if {@code zdt} is null
- * @exception IllegalArgumentException if the zoned date-time is too
+ * @throws NullPointerException if {@code zdt} is null
+ * @throws IllegalArgumentException if the zoned date-time is too
* large to represent as a {@code GregorianCalendar}
* @since 1.8
*/
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/Hashtable.java
--- a/src/java.base/share/classes/java/util/Hashtable.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/Hashtable.java Fri Sep 20 11:07:52 2019 +0100
@@ -180,7 +180,7 @@
*
* @param initialCapacity the initial capacity of the hashtable.
* @param loadFactor the load factor of the hashtable.
- * @exception IllegalArgumentException if the initial capacity is less
+ * @throws IllegalArgumentException if the initial capacity is less
* than zero, or if the load factor is nonpositive.
*/
public Hashtable(int initialCapacity, float loadFactor) {
@@ -202,7 +202,7 @@
* and default load factor (0.75).
*
* @param initialCapacity the initial capacity of the hashtable.
- * @exception IllegalArgumentException if the initial capacity is less
+ * @throws IllegalArgumentException if the initial capacity is less
* than zero.
*/
public Hashtable(int initialCapacity) {
@@ -304,7 +304,7 @@
* {@code value} argument in this hashtable as
* determined by the {@code equals} method;
* {@code false} otherwise.
- * @exception NullPointerException if the value is {@code null}
+ * @throws NullPointerException if the value is {@code null}
*/
public synchronized boolean contains(Object value) {
if (value == null) {
@@ -465,7 +465,7 @@
* @param value the value
* @return the previous value of the specified key in this hashtable,
* or {@code null} if it did not have one
- * @exception NullPointerException if the key or value is
+ * @throws NullPointerException if the key or value is
* {@code null}
* @see Object#equals(Object)
* @see #get(Object)
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/JapaneseImperialCalendar.java
--- a/src/java.base/share/classes/java/util/JapaneseImperialCalendar.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/JapaneseImperialCalendar.java Fri Sep 20 11:07:52 2019 +0100
@@ -418,7 +418,7 @@
*
* @param field the calendar field.
* @param amount the amount of date or time to be added to the field.
- * @exception IllegalArgumentException if {@code field} is
+ * @throws IllegalArgumentException if {@code field} is
* {@code ZONE_OFFSET}, {@code DST_OFFSET}, or unknown,
* or if any calendar fields have out-of-range values in
* non-lenient mode.
@@ -569,7 +569,7 @@
*
* @param field the calendar field.
* @param amount the signed amount to add to {@code field}.
- * @exception IllegalArgumentException if {@code field} is
+ * @throws IllegalArgumentException if {@code field} is
* {@code ZONE_OFFSET}, {@code DST_OFFSET}, or unknown,
* or if any calendar fields have out-of-range values in
* non-lenient mode.
@@ -1867,7 +1867,7 @@
* Converts calendar field values to the time value (millisecond
* offset from the Epoch).
*
- * @exception IllegalArgumentException if any calendar fields are invalid.
+ * @throws IllegalArgumentException if any calendar fields are invalid.
*/
protected void computeTime() {
// In non-lenient mode, perform brief checking of calendar
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/Locale.java
--- a/src/java.base/share/classes/java/util/Locale.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/Locale.java Fri Sep 20 11:07:52 2019 +0100
@@ -740,7 +740,7 @@
* See the Locale
class description about valid country values.
* @param variant Any arbitrary value used to indicate a variation of a Locale
.
* See the Locale
class description for the details.
- * @exception NullPointerException thrown if any argument is null.
+ * @throws NullPointerException thrown if any argument is null.
*/
public Locale(String language, String country, String variant) {
if (language == null || country == null || variant == null) {
@@ -770,7 +770,7 @@
* valid language values.
* @param country An ISO 3166 alpha-2 country code or a UN M.49 numeric-3 area code.
* See the Locale
class description about valid country values.
- * @exception NullPointerException thrown if either argument is null.
+ * @throws NullPointerException thrown if either argument is null.
*/
public Locale(String language, String country) {
this(language, country, "");
@@ -793,7 +793,7 @@
* @param language An ISO 639 alpha-2 or alpha-3 language code, or a language subtag
* up to 8 characters in length. See the Locale
class description about
* valid language values.
- * @exception NullPointerException thrown if argument is null.
+ * @throws NullPointerException thrown if argument is null.
* @since 1.4
*/
public Locale(String language) {
@@ -812,7 +812,7 @@
* @param country uppercase two-letter ISO-3166 code and numeric-3 UN M.49 area code.
* @param variant vendor and browser specific code. See class description.
* @return the Locale
instance requested
- * @exception NullPointerException if any argument is null.
+ * @throws NullPointerException if any argument is null.
*/
static Locale getInstance(String language, String country, String variant) {
return getInstance(language, "", country, variant, null);
@@ -1737,7 +1737,7 @@
* not specify a language the empty string is returned.
*
* @return A three-letter abbreviation of this locale's language.
- * @exception MissingResourceException Throws MissingResourceException if
+ * @throws MissingResourceException Throws MissingResourceException if
* three-letter language abbreviation is not available for this locale.
*/
public String getISO3Language() throws MissingResourceException {
@@ -1764,7 +1764,7 @@
* inLocale
is null
+ * @throws NullPointerException if inLocale
is null
*/
public String getDisplayLanguage(Locale inLocale) {
return getDisplayString(baseLocale.getLanguage(), null, inLocale, DISPLAY_LANGUAGE);
@@ -1907,7 +1907,7 @@
*
* @param inLocale The locale for which to retrieve the display country.
* @return The name of the country appropriate to the given locale.
- * @exception NullPointerException if inLocale
is null
+ * @throws NullPointerException if inLocale
is null
*/
public String getDisplayCountry(Locale inLocale) {
return getDisplayString(baseLocale.getRegion(), null, inLocale, DISPLAY_COUNTRY);
@@ -1949,7 +1949,7 @@
*
* @param inLocale The locale for which to retrieve the display variant code.
* @return The name of the display variant code appropriate to the given locale.
- * @exception NullPointerException if inLocale
is null
+ * @throws NullPointerException if inLocale
is null
*/
public String getDisplayVariant(Locale inLocale) {
if (baseLocale.getVariant().isEmpty())
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/Properties.java
--- a/src/java.base/share/classes/java/util/Properties.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/Properties.java Fri Sep 20 11:07:52 2019 +0100
@@ -394,7 +394,7 @@
* The specified stream remains open after this method returns.
*
* @param inStream the input stream.
- * @exception IOException if an error occurred when reading from the
+ * @throws IOException if an error occurred when reading from the
* input stream.
* @throws IllegalArgumentException if the input stream contains a
* malformed Unicode escape sequence.
@@ -801,7 +801,7 @@
*
* @param out an output stream.
* @param comments a description of the property list.
- * @exception ClassCastException if this {@code Properties} object
+ * @throws ClassCastException if this {@code Properties} object
* contains any keys or values that are not
* {@code Strings}.
*/
@@ -853,11 +853,11 @@
*
* @param writer an output character stream writer.
* @param comments a description of the property list.
- * @exception IOException if writing this property list to the specified
+ * @throws IOException if writing this property list to the specified
* output stream throws an {@code IOException}.
- * @exception ClassCastException if this {@code Properties} object
+ * @throws ClassCastException if this {@code Properties} object
* contains any keys or values that are not {@code Strings}.
- * @exception NullPointerException if {@code writer} is null.
+ * @throws NullPointerException if {@code writer} is null.
* @since 1.6
*/
public void store(Writer writer, String comments)
@@ -900,11 +900,11 @@
*
* @param out an output stream.
* @param comments a description of the property list.
- * @exception IOException if writing this property list to the specified
+ * @throws IOException if writing this property list to the specified
* output stream throws an {@code IOException}.
- * @exception ClassCastException if this {@code Properties} object
+ * @throws ClassCastException if this {@code Properties} object
* contains any keys or values that are not {@code Strings}.
- * @exception NullPointerException if {@code out} is null.
+ * @throws NullPointerException if {@code out} is null.
* @since 1.2
*/
public void store(OutputStream out, String comments)
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/PropertyPermission.java
--- a/src/java.base/share/classes/java/util/PropertyPermission.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/PropertyPermission.java Fri Sep 20 11:07:52 2019 +0100
@@ -463,10 +463,10 @@
*
* @param permission the Permission object to add.
*
- * @exception IllegalArgumentException - if the permission is not a
+ * @throws IllegalArgumentException - if the permission is not a
* PropertyPermission
*
- * @exception SecurityException - if this PropertyPermissionCollection
+ * @throws SecurityException - if this PropertyPermissionCollection
* object has been marked readonly
*/
@Override
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/ResourceBundle.java
--- a/src/java.base/share/classes/java/util/ResourceBundle.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/ResourceBundle.java Fri Sep 20 11:07:52 2019 +0100
@@ -512,9 +512,9 @@
*
*
* @param key the key for the desired string
- * @exception NullPointerException if key
is null
- * @exception MissingResourceException if no object for the given key can be found
- * @exception ClassCastException if the object found for the given key is not a string
+ * @throws NullPointerException if key
is null
+ * @throws MissingResourceException if no object for the given key can be found
+ * @throws ClassCastException if the object found for the given key is not a string
* @return the string for the given key
*/
public final String getString(String key) {
@@ -529,9 +529,9 @@
*
*
* @param key the key for the desired string array
- * @exception NullPointerException if key
is null
- * @exception MissingResourceException if no object for the given key can be found
- * @exception ClassCastException if the object found for the given key is not a string array
+ * @throws NullPointerException if key
is null
+ * @throws MissingResourceException if no object for the given key can be found
+ * @throws ClassCastException if the object found for the given key is not a string array
* @return the string array for the given key
*/
public final String[] getStringArray(String key) {
@@ -547,8 +547,8 @@
* If still not successful, it throws a MissingResourceException.
*
* @param key the key for the desired object
- * @exception NullPointerException if key
is null
- * @exception MissingResourceException if no object for the given key can be found
+ * @throws NullPointerException if key
is null
+ * @throws MissingResourceException if no object for the given key can be found
* @return the object for the given key
*/
public final Object getObject(String key) {
@@ -841,9 +841,9 @@
*
*
* @param baseName the base name of the resource bundle, a fully qualified class name
- * @exception java.lang.NullPointerException
+ * @throws java.lang.NullPointerException
* if baseName
is null
- * @exception MissingResourceException
+ * @throws MissingResourceException
* if no resource bundle for the specified base name can be found
* @return a resource bundle for the given base name and the default locale
*
@@ -915,9 +915,9 @@
* the base name of the resource bundle, a fully qualified class name
* @param locale
* the locale for which a resource bundle is desired
- * @exception NullPointerException
+ * @throws NullPointerException
* if baseName
or locale
is null
- * @exception MissingResourceException
+ * @throws MissingResourceException
* if no resource bundle for the specified base name can be found
* @return a resource bundle for the given base name and locale
*
@@ -1264,9 +1264,9 @@
* @param locale the locale for which a resource bundle is desired
* @param loader the class loader from which to load the resource bundle
* @return a resource bundle for the given base name and locale
- * @exception java.lang.NullPointerException
+ * @throws java.lang.NullPointerException
* if baseName
, locale
, or loader
is null
- * @exception MissingResourceException
+ * @throws MissingResourceException
* if no resource bundle for the specified base name can be found
* @since 1.2
* @revised 9
@@ -2250,7 +2250,7 @@
* by the given class loader.
*
* @param loader the class loader
- * @exception NullPointerException if loader
is null
+ * @throws NullPointerException if loader
is null
* @since 1.6
* @see ResourceBundle.Control#getTimeToLive(String,Locale)
*/
@@ -2271,7 +2271,7 @@
* object for the given key.
*
* @param key the key for the desired object
- * @exception NullPointerException if key
is null
+ * @throws NullPointerException if key
is null
* @return the object for the given key, or null
*/
protected abstract Object handleGetObject(String key);
@@ -2293,7 +2293,7 @@
* @return true
if the given key
is
* contained in this ResourceBundle
or its
* parent bundles; false
otherwise.
- * @exception NullPointerException
+ * @throws NullPointerException
* if key
is null
* @since 1.6
*/
@@ -2598,9 +2598,9 @@
* ResourceBundle.Control.getFormats
method
* @return a ResourceBundle.Control
supporting the
* specified formats
- * @exception NullPointerException
+ * @throws NullPointerException
* if formats
is null
- * @exception IllegalArgumentException
+ * @throws IllegalArgumentException
* if formats
is unknown
*/
public static final Control getControl(ListResourceBundle.Control
supporting the
* specified formats
with no fallback
* Locale
support
- * @exception NullPointerException
+ * @throws NullPointerException
* if formats
is null
- * @exception IllegalArgumentException
+ * @throws IllegalArgumentException
* if formats
is unknown
*/
public static final Control getNoFallbackControl(ListList
of String
s containing
* formats for loading resource bundles.
- * @exception NullPointerException
+ * @throws NullPointerException
* if baseName
is null
* @see #FORMAT_DEFAULT
* @see #FORMAT_CLASS
@@ -2866,7 +2866,7 @@
* the locale for which a resource bundle is desired
* @return a List
of candidate
* Locale
s for the given locale
- * @exception NullPointerException
+ * @throws NullPointerException
* if baseName
or locale
is
* null
*/
@@ -3034,7 +3034,7 @@
* @return a Locale
for the fallback search,
* or null
if no further fallback search
* is desired.
- * @exception NullPointerException
+ * @throws NullPointerException
* if baseName
or locale
* is null
*/
@@ -3127,29 +3127,29 @@
* false
otherwise
* @return the resource bundle instance,
* or null
if none could be found.
- * @exception NullPointerException
+ * @throws NullPointerException
* if bundleName
, locale
,
* format
, or loader
is
* null
, or if null
is returned by
* {@link #toBundleName(String, Locale) toBundleName}
- * @exception IllegalArgumentException
+ * @throws IllegalArgumentException
* if format
is unknown, or if the resource
* found for the given parameters contains malformed data.
- * @exception ClassCastException
+ * @throws ClassCastException
* if the loaded class cannot be cast to ResourceBundle
- * @exception IllegalAccessException
+ * @throws IllegalAccessException
* if the class or its nullary constructor is not
* accessible.
- * @exception InstantiationException
+ * @throws InstantiationException
* if the instantiation of a class fails for some other
* reason.
- * @exception ExceptionInInitializerError
+ * @throws ExceptionInInitializerError
* if the initialization provoked by this method fails.
- * @exception SecurityException
+ * @throws SecurityException
* If a security manager is present and creation of new
* instances is denied. See {@link Class#newInstance()}
* for details.
- * @exception IOException
+ * @throws IOException
* if an error occurred when reading resources using
* any I/O operations
* @see java.util.spi.ResourceBundleProvider#getBundle(String, Locale)
@@ -3295,7 +3295,7 @@
* {@link #TTL_NO_EXPIRATION_CONTROL} to disable the
* expiration control, or {@link #TTL_DONT_CACHE} to disable
* caching.
- * @exception NullPointerException
+ * @throws NullPointerException
* if baseName
or locale
is
* null
*/
@@ -3350,7 +3350,7 @@
* in the cache
* @return true
if the expired bundle needs to be
* reloaded; false
otherwise.
- * @exception NullPointerException
+ * @throws NullPointerException
* if baseName
, locale
,
* format
, loader
, or
* bundle
is null
@@ -3437,7 +3437,7 @@
* the locale for which a resource bundle should be
* loaded
* @return the bundle name for the resource bundle
- * @exception NullPointerException
+ * @throws NullPointerException
* if baseName
or locale
* is null
* @see java.util.spi.AbstractResourceBundleProvider#toBundleName(String, Locale)
@@ -3495,7 +3495,7 @@
* @param suffix
* the file type suffix
* @return the converted resource name
- * @exception NullPointerException
+ * @throws NullPointerException
* if {@code bundleName} or {@code suffix}
* is {@code null}
*/
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/SimpleTimeZone.java
--- a/src/java.base/share/classes/java/util/SimpleTimeZone.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/SimpleTimeZone.java Fri Sep 20 11:07:52 2019 +0100
@@ -209,7 +209,7 @@
* @param endTime The daylight saving ending time in local wall clock time,
* (in milliseconds within the day) which is local daylight
* time in this case.
- * @exception IllegalArgumentException if the month, day, dayOfWeek, or time
+ * @throws IllegalArgumentException if the month, day, dayOfWeek, or time
* parameters are out of range for the start or end rule
*/
public SimpleTimeZone(int rawOffset, String ID,
@@ -266,7 +266,7 @@
* which is local daylight time in this case.
* @param dstSavings The amount of time in milliseconds saved during
* daylight saving time.
- * @exception IllegalArgumentException if the month, day, dayOfWeek, or time
+ * @throws IllegalArgumentException if the month, day, dayOfWeek, or time
* parameters are out of range for the start or end rule
* @since 1.2
*/
@@ -316,7 +316,7 @@
* @param dstSavings The amount of time in milliseconds saved during
* daylight saving time.
*
- * @exception IllegalArgumentException if the month, day, dayOfWeek, time more, or
+ * @throws IllegalArgumentException if the month, day, dayOfWeek, time more, or
* time parameters are out of range for the start or end rule, or if a time mode
* value is invalid.
*
@@ -380,7 +380,7 @@
* See the class description for the special cases of this parameter.
* @param startTime The daylight saving time starting time in local wall clock
* time, which is local standard time in this case.
- * @exception IllegalArgumentException if the startMonth
, startDay
,
+ * @throws IllegalArgumentException if the startMonth
, startDay
,
* startDayOfWeek
, or startTime
parameters are out of range
*/
public void setStartRule(int startMonth, int startDay, int startDayOfWeek, int startTime)
@@ -406,7 +406,7 @@
* @param startTime The daylight saving time starting time in local wall clock
* time, which is local standard time in this case.
* See the class description for the special cases of this parameter.
- * @exception IllegalArgumentException if the startMonth
,
+ * @throws IllegalArgumentException if the startMonth
,
* startDayOfMonth
, or startTime
parameters are out of range
* @since 1.2
*/
@@ -429,7 +429,7 @@
* after dayOfMonth
. If false, this rule
* selects the last dayOfWeek
on or before
* dayOfMonth
.
- * @exception IllegalArgumentException if the startMonth
, startDay
,
+ * @throws IllegalArgumentException if the startMonth
, startDay
,
* startDayOfWeek
, or startTime
parameters are out of range
* @since 1.2
*/
@@ -460,7 +460,7 @@
* @param endTime The daylight saving ending time in local wall clock time,
* (in milliseconds within the day) which is local daylight
* time in this case.
- * @exception IllegalArgumentException if the endMonth
, endDay
,
+ * @throws IllegalArgumentException if the endMonth
, endDay
,
* endDayOfWeek
, or endTime
parameters are out of range
*/
public void setEndRule(int endMonth, int endDay, int endDayOfWeek,
@@ -487,7 +487,7 @@
* @param endTime The daylight saving ending time in local wall clock time,
* (in milliseconds within the day) which is local daylight
* time in this case.
- * @exception IllegalArgumentException the endMonth
, endDay
,
+ * @throws IllegalArgumentException the endMonth
, endDay
,
* or endTime
parameters are out of range
* @since 1.2
*/
@@ -512,7 +512,7 @@
* or after endDay
. If false, this rule
* selects the last endDayOfWeek
on or before
* endDay
of the month.
- * @exception IllegalArgumentException the endMonth
, endDay
,
+ * @throws IllegalArgumentException the endMonth
, endDay
,
* endDayOfWeek
, or endTime
parameters are out of range
* @since 1.2
*/
@@ -597,7 +597,7 @@
* @param dayOfWeek The day-of-week of the given date.
* @param millis The milliseconds in day in standard local time.
* @return The milliseconds to add to UTC to get local time.
- * @exception IllegalArgumentException the era
,
+ * @throws IllegalArgumentException the era
,
* month
, day
, dayOfWeek
,
* or millis
parameters are out of range
*/
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/StringTokenizer.java
--- a/src/java.base/share/classes/java/util/StringTokenizer.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/StringTokenizer.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2004, 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
@@ -189,7 +189,7 @@
* @param delim the delimiters.
* @param returnDelims flag indicating whether to return the delimiters
* as tokens.
- * @exception NullPointerException if str is {@code null}
+ * @throws NullPointerException if str is {@code null}
*/
public StringTokenizer(String str, String delim, boolean returnDelims) {
currentPosition = 0;
@@ -215,7 +215,7 @@
*
* @param str a string to be parsed.
* @param delim the delimiters.
- * @exception NullPointerException if str is {@code null}
+ * @throws NullPointerException if str is {@code null}
*/
public StringTokenizer(String str, String delim) {
this(str, delim, false);
@@ -230,7 +230,7 @@
* not be treated as tokens.
*
* @param str a string to be parsed.
- * @exception NullPointerException if str is {@code null}
+ * @throws NullPointerException if str is {@code null}
*/
public StringTokenizer(String str) {
this(str, " \t\n\r\f", false);
@@ -328,7 +328,7 @@
* Returns the next token from this string tokenizer.
*
* @return the next token from this string tokenizer.
- * @exception NoSuchElementException if there are no more tokens in this
+ * @throws NoSuchElementException if there are no more tokens in this
* tokenizer's string.
*/
public String nextToken() {
@@ -363,9 +363,9 @@
*
* @param delim the new delimiters.
* @return the next token, after switching to the new delimiter set.
- * @exception NoSuchElementException if there are no more tokens in this
+ * @throws NoSuchElementException if there are no more tokens in this
* tokenizer's string.
- * @exception NullPointerException if delim is {@code null}
+ * @throws NullPointerException if delim is {@code null}
*/
public String nextToken(String delim) {
delimiters = delim;
@@ -398,7 +398,7 @@
* {@code Enumeration} interface.
*
* @return the next token in the string.
- * @exception NoSuchElementException if there are no more tokens in this
+ * @throws NoSuchElementException if there are no more tokens in this
* tokenizer's string.
* @see java.util.Enumeration
* @see java.util.StringTokenizer#nextToken()
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/TimeZone.java
--- a/src/java.base/share/classes/java/util/TimeZone.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/TimeZone.java Fri Sep 20 11:07:52 2019 +0100
@@ -329,7 +329,7 @@
*
* @param locale the locale in which to supply the display name.
* @return the human-readable name of this time zone in the given locale.
- * @exception NullPointerException if {@code locale} is {@code null}.
+ * @throws NullPointerException if {@code locale} is {@code null}.
* @since 1.2
* @see #getDisplayName(boolean, int, Locale)
*/
@@ -354,7 +354,7 @@
* {@code false} specifying a Standard Time name
* @param style either {@link #LONG} or {@link #SHORT}
* @return the human-readable name of this time zone in the default locale.
- * @exception IllegalArgumentException if {@code style} is invalid.
+ * @throws IllegalArgumentException if {@code style} is invalid.
* @since 1.2
* @see #getDisplayName(boolean, int, Locale)
* @see Locale#getDefault(Locale.Category)
@@ -389,8 +389,8 @@
* @param style either {@link #LONG} or {@link #SHORT}
* @param locale the locale in which to supply the display name.
* @return the human-readable name of this time zone in the given locale.
- * @exception IllegalArgumentException if {@code style} is invalid.
- * @exception NullPointerException if {@code locale} is {@code null}.
+ * @throws IllegalArgumentException if {@code style} is invalid.
+ * @throws NullPointerException if {@code locale} is {@code null}.
* @since 1.2
* @see java.text.DateFormatSymbols#getZoneStrings()
*/
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/jar/Attributes.java
--- a/src/java.base/share/classes/java/util/jar/Attributes.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/jar/Attributes.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -148,7 +148,7 @@
* @param name the attribute name
* @param value the attribute value
* @return the previous value of the attribute, or null if none
- * @exception ClassCastException if the name is not a Attributes.Name
+ * @throws ClassCastException if the name is not a Attributes.Name
* or the value is not a String
*/
public Object put(Object name, Object value) {
@@ -169,7 +169,7 @@
* @param name the attribute name as a string
* @param value the attribute value
* @return the previous value of the attribute, or null if none
- * @exception IllegalArgumentException if the attribute name is invalid
+ * @throws IllegalArgumentException if the attribute name is invalid
*/
public String putValue(String name, String value) {
return (String)put(Name.of(name), value);
@@ -213,7 +213,7 @@
* Attributes to this Map. Duplicate mappings will be replaced.
*
* @param attr the Attributes to be stored in this map
- * @exception ClassCastException if attr is not an Attributes
+ * @throws ClassCastException if attr is not an Attributes
*/
public void putAll(Map,?> attr) {
// ## javac bug?
@@ -470,9 +470,9 @@
* Constructs a new attribute name using the given string name.
*
* @param name the attribute string name
- * @exception IllegalArgumentException if the attribute name was
+ * @throws IllegalArgumentException if the attribute name was
* invalid
- * @exception NullPointerException if the attribute name was null
+ * @throws NullPointerException if the attribute name was null
*/
public Name(String name) {
this.hashCode = hash(name);
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/jar/JarEntry.java
--- a/src/java.base/share/classes/java/util/jar/JarEntry.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/jar/JarEntry.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -46,8 +46,8 @@
* entry name.
*
* @param name the JAR file entry name
- * @exception NullPointerException if the entry name is null
- * @exception IllegalArgumentException if the entry name is longer than
+ * @throws NullPointerException if the entry name is null
+ * @throws IllegalArgumentException if the entry name is longer than
* 0xFFFF bytes.
*/
public JarEntry(String name) {
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/jar/JarInputStream.java
--- a/src/java.base/share/classes/java/util/jar/JarInputStream.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/jar/JarInputStream.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -56,7 +56,7 @@
* manifest. If a manifest is present, also attempts to verify
* the signatures if the JarInputStream is signed.
* @param in the actual input stream
- * @exception IOException if an I/O error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public JarInputStream(InputStream in) throws IOException {
this(in, true);
@@ -70,7 +70,7 @@
* @param in the actual input stream
* @param verify whether or not to verify the JarInputStream if
* it is signed.
- * @exception IOException if an I/O error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public JarInputStream(InputStream in, boolean verify) throws IOException {
super(in);
@@ -131,9 +131,9 @@
* beginning of the entry data. If verification has been enabled,
* any invalid signature detected while positioning the stream for
* the next entry will result in an exception.
- * @exception ZipException if a ZIP file error has occurred
- * @exception IOException if an I/O error has occurred
- * @exception SecurityException if any of the jar file entries
+ * @throws ZipException if a ZIP file error has occurred
+ * @throws IOException if an I/O error has occurred
+ * @throws SecurityException if any of the jar file entries
* are incorrectly signed.
*/
public ZipEntry getNextEntry() throws IOException {
@@ -170,9 +170,9 @@
* any invalid signature detected while positioning the stream for
* the next entry will result in an exception.
* @return the next JAR file entry, or null if there are no more entries
- * @exception ZipException if a ZIP file error has occurred
- * @exception IOException if an I/O error has occurred
- * @exception SecurityException if any of the jar file entries
+ * @throws ZipException if a ZIP file error has occurred
+ * @throws IOException if an I/O error has occurred
+ * @throws SecurityException if any of the jar file entries
* are incorrectly signed.
*/
public JarEntry getNextJarEntry() throws IOException {
@@ -192,13 +192,13 @@
* @param len the maximum number of bytes to read
* @return the actual number of bytes read, or -1 if the end of the
* entry is reached
- * @exception NullPointerException If b
is null
.
- * @exception IndexOutOfBoundsException If off
is negative,
+ * @throws NullPointerException If b
is null
.
+ * @throws IndexOutOfBoundsException If off
is negative,
* len
is negative, or len
is greater than
* b.length - off
- * @exception ZipException if a ZIP file error has occurred
- * @exception IOException if an I/O error has occurred
- * @exception SecurityException if any of the jar file entries
+ * @throws ZipException if a ZIP file error has occurred
+ * @throws IOException if an I/O error has occurred
+ * @throws SecurityException if any of the jar file entries
* are incorrectly signed.
*/
public int read(byte[] b, int off, int len) throws IOException {
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/jar/JarOutputStream.java
--- a/src/java.base/share/classes/java/util/jar/JarOutputStream.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/jar/JarOutputStream.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -52,7 +52,7 @@
*
* @param out the actual output stream
* @param man the optional Manifest
- * @exception IOException if an I/O error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public JarOutputStream(OutputStream out, Manifest man) throws IOException {
super(out);
@@ -68,7 +68,7 @@
/**
* Creates a new JarOutputStream
with no manifest.
* @param out the actual output stream
- * @exception IOException if an I/O error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public JarOutputStream(OutputStream out) throws IOException {
super(out);
@@ -83,8 +83,8 @@
* time.
*
* @param ze the ZIP/JAR entry to be written
- * @exception ZipException if a ZIP error has occurred
- * @exception IOException if an I/O error has occurred
+ * @throws ZipException if a ZIP error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public void putNextEntry(ZipEntry ze) throws IOException {
if (firstEntry) {
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/jar/Manifest.java
--- a/src/java.base/share/classes/java/util/jar/Manifest.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/jar/Manifest.java Fri Sep 20 11:07:52 2019 +0100
@@ -195,7 +195,7 @@
* MainAttributes prior to invoking this method.
*
* @param out the output stream
- * @exception IOException if an I/O error has occurred
+ * @throws IOException if an I/O error has occurred
* @see #getMainAttributes
*/
public void write(OutputStream out) throws IOException {
@@ -276,7 +276,7 @@
* manifest entries.
*
* @param is the input stream
- * @exception IOException if an I/O error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public void read(InputStream is) throws IOException {
read(is, null);
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/jar/Pack200.java
--- a/src/java.base/share/classes/java/util/jar/Pack200.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/jar/Pack200.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2017, 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
@@ -554,7 +554,7 @@
* Closes its input but not its output. (Pack200 archives are appendable.)
* @param in a JarFile
* @param out an OutputStream
- * @exception IOException if an error is encountered.
+ * @throws IOException if an error is encountered.
*/
void pack(JarFile in, OutputStream out) throws IOException ;
@@ -570,7 +570,7 @@
* @see #DEFLATE_HINT
* @param in a JarInputStream
* @param out an OutputStream
- * @exception IOException if an error is encountered.
+ * @throws IOException if an error is encountered.
*/
void pack(JarInputStream in, OutputStream out) throws IOException ;
}
@@ -673,7 +673,7 @@
* Closes its input but not its output. (The output can accumulate more elements.)
* @param in an InputStream.
* @param out a JarOutputStream.
- * @exception IOException if an error is encountered.
+ * @throws IOException if an error is encountered.
*/
void unpack(InputStream in, JarOutputStream out) throws IOException;
@@ -684,7 +684,7 @@
* Does not close its output. (The output can accumulate more elements.)
* @param in a File.
* @param out a JarOutputStream.
- * @exception IOException if an error is encountered.
+ * @throws IOException if an error is encountered.
*/
void unpack(File in, JarOutputStream out) throws IOException;
}
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/regex/Matcher.java
--- a/src/java.base/share/classes/java/util/regex/Matcher.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/regex/Matcher.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -1803,4 +1803,4 @@
throw new IllegalArgumentException("No group with name <" + name + ">");
return parentPattern.namedGroups().get(name);
}
-}
\ No newline at end of file
+}
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/spi/CurrencyNameProvider.java
--- a/src/java.base/share/classes/java/util/spi/CurrencyNameProvider.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/spi/CurrencyNameProvider.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -63,9 +63,9 @@
* @param locale the desired locale
* @return the symbol of the given currency code for the specified locale, or null if
* the symbol is not available for the locale
- * @exception NullPointerException if currencyCode
or
+ * @throws NullPointerException if currencyCode
or
* locale
is null
- * @exception IllegalArgumentException if currencyCode
is not in
+ * @throws IllegalArgumentException if currencyCode
is not in
* the form of three upper-case letters, or locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
@@ -84,12 +84,12 @@
* @param locale the desired locale
* @return the name for the currency that is appropriate for display to the
* user, or null if the name is not available for the locale
- * @exception IllegalArgumentException if currencyCode
is not in
+ * @throws IllegalArgumentException if currencyCode
is not in
* the form of three upper-case letters, or locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
- * @exception NullPointerException if currencyCode
or
+ * @throws NullPointerException if currencyCode
or
* locale
is null
* @since 1.7
*/
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/spi/LocaleNameProvider.java
--- a/src/java.base/share/classes/java/util/spi/LocaleNameProvider.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/spi/LocaleNameProvider.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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,8 +59,8 @@
* @param locale the desired locale
* @return the name of the given language code for the specified locale, or null if it's not
* available.
- * @exception NullPointerException if languageCode
or locale
is null
- * @exception IllegalArgumentException if languageCode
is not in the form of
+ * @throws NullPointerException if languageCode
or locale
is null
+ * @throws IllegalArgumentException if languageCode
is not in the form of
* two or three lower-case letters, or locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
@@ -86,8 +86,8 @@
* @param locale the desired locale
* @return the name of the given script code for the specified locale, or null if it's not
* available.
- * @exception NullPointerException if scriptCode
or locale
is null
- * @exception IllegalArgumentException if scriptCode
is not in the form of
+ * @throws NullPointerException if scriptCode
or locale
is null
+ * @throws IllegalArgumentException if scriptCode
is not in the form of
* four title case letters, or locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
@@ -115,8 +115,8 @@
* @param locale the desired locale
* @return the name of the given country code for the specified locale, or null if it's not
* available.
- * @exception NullPointerException if countryCode
or locale
is null
- * @exception IllegalArgumentException if countryCode
is not in the form of
+ * @throws NullPointerException if countryCode
or locale
is null
+ * @throws IllegalArgumentException if countryCode
is not in the form of
* two upper-case letters or three digit letters, or locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
@@ -134,8 +134,8 @@
* @param locale the desired locale
* @return the name of the given variant string for the specified locale, or null if it's not
* available.
- * @exception NullPointerException if variant
or locale
is null
- * @exception IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if variant
or locale
is null
+ * @throws IllegalArgumentException if locale
isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@@ -154,8 +154,8 @@
* @param locale the desired locale, not null.
* @return the name of the given key string for the specified locale,
* or null if it's not available.
- * @exception NullPointerException if {@code key} or {@code locale} is null
- * @exception IllegalArgumentException if {@code locale} isn't
+ * @throws NullPointerException if {@code key} or {@code locale} is null
+ * @throws IllegalArgumentException if {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@@ -179,8 +179,8 @@
* @param locale the desired locale, not null.
* @return the name of the given type string for the specified locale,
* or null if it's not available.
- * @exception NullPointerException if {@code key}, {@code type} or {@code locale} is null
- * @exception IllegalArgumentException if {@code locale} isn't
+ * @throws NullPointerException if {@code key}, {@code type} or {@code locale} is null
+ * @throws IllegalArgumentException if {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/spi/TimeZoneNameProvider.java
--- a/src/java.base/share/classes/java/util/spi/TimeZoneNameProvider.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/spi/TimeZoneNameProvider.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -68,11 +68,11 @@
* @param locale the desired locale
* @return the human-readable name of the given time zone in the
* given locale, or null if it's not available.
- * @exception IllegalArgumentException if style
is invalid,
+ * @throws IllegalArgumentException if style
is invalid,
* or locale
isn't one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
- * @exception NullPointerException if ID
or locale
+ * @throws NullPointerException if ID
or locale
* is null
* @see java.util.TimeZone#getDisplayName(boolean, int, java.util.Locale)
*/
@@ -96,11 +96,11 @@
* @param locale the desired locale
* @return the human-readable generic name of the given time zone in the
* given locale, or {@code null} if it's not available.
- * @exception IllegalArgumentException if style
is invalid,
+ * @throws IllegalArgumentException if style
is invalid,
* or locale
isn't one of the locales returned from
* {@link LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
- * @exception NullPointerException if ID
or locale
+ * @throws NullPointerException if ID
or locale
* is {@code null}
* @since 1.8
*/
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/zip/CheckedInputStream.java
--- a/src/java.base/share/classes/java/util/zip/CheckedInputStream.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/zip/CheckedInputStream.java Fri Sep 20 11:07:52 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2006, 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
@@ -54,7 +54,7 @@
/**
* Reads a byte. Will block if no input is 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 {
int b = in.read();
@@ -73,11 +73,11 @@
* @param len the maximum number of bytes read
* @return the actual number of bytes read, or -1 if the end
* of the stream is reached.
- * @exception NullPointerException If buf
is null
.
- * @exception IndexOutOfBoundsException If off
is negative,
+ * @throws NullPointerException If buf
is null
.
+ * @throws IndexOutOfBoundsException If off
is negative,
* len
is negative, or len
is greater than
* buf.length - off
- * @exception IOException if an I/O error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public int read(byte[] buf, int off, int len) throws IOException {
len = in.read(buf, off, len);
@@ -91,7 +91,7 @@
* Skips specified number of bytes of input.
* @param n the number of bytes to skip
* @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 {
byte[] buf = new byte[512];
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/zip/CheckedOutputStream.java
--- a/src/java.base/share/classes/java/util/zip/CheckedOutputStream.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/zip/CheckedOutputStream.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
@@ -55,7 +55,7 @@
/**
* Writes a byte. Will block until the byte is actually written.
* @param b the byte to be written
- * @exception IOException if an I/O error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public void write(int b) throws IOException {
out.write(b);
@@ -68,7 +68,7 @@
* @param b the data to be written
* @param off the start offset of the data
* @param len the number of bytes to be written
- * @exception IOException if an I/O error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public void write(byte[] b, int off, int len) throws IOException {
out.write(b, off, len);
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/zip/Deflater.java
--- a/src/java.base/share/classes/java/util/zip/Deflater.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/zip/Deflater.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
@@ -364,7 +364,7 @@
* effect only after that invocation.
*
* @param strategy the new compression strategy
- * @exception IllegalArgumentException if the compression strategy is
+ * @throws IllegalArgumentException if the compression strategy is
* invalid
*/
public void setStrategy(int strategy) {
@@ -393,7 +393,7 @@
* take effect only after that invocation.
*
* @param level the new compression level (0-9)
- * @exception IllegalArgumentException if the compression level is invalid
+ * @throws IllegalArgumentException if the compression level is invalid
*/
public void setLevel(int level) {
if ((level < 0 || level > 9) && level != DEFAULT_COMPRESSION) {
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/zip/DeflaterOutputStream.java
--- a/src/java.base/share/classes/java/util/zip/DeflaterOutputStream.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/zip/DeflaterOutputStream.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
@@ -101,7 +101,7 @@
* @param out the output stream
* @param def the compressor ("deflater")
* @param size the output buffer size
- * @exception IllegalArgumentException if {@code size <= 0}
+ * @throws IllegalArgumentException if {@code size <= 0}
*/
public DeflaterOutputStream(OutputStream out, Deflater def, int size) {
this(out, def, size, false);
@@ -180,7 +180,7 @@
* Writes a byte to the compressed output stream. This method will
* block until the byte can be written.
* @param b the byte to be written
- * @exception IOException if an I/O error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public void write(int b) throws IOException {
byte[] buf = new byte[1];
@@ -194,7 +194,7 @@
* @param b the data to be written
* @param off the start offset of the data
* @param len the length of the data
- * @exception IOException if an I/O error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public void write(byte[] b, int off, int len) throws IOException {
if (def.finished()) {
@@ -217,7 +217,7 @@
* Finishes writing compressed data to the output stream without closing
* the underlying stream. Use this method when applying multiple filters
* in succession to the same output stream.
- * @exception IOException if an I/O error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public void finish() throws IOException {
if (!def.finished()) {
@@ -231,7 +231,7 @@
/**
* Writes remaining compressed data to the output stream and closes the
* underlying stream.
- * @exception IOException if an I/O error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public void close() throws IOException {
if (!closed) {
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/zip/GZIPInputStream.java
--- a/src/java.base/share/classes/java/util/zip/GZIPInputStream.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/zip/GZIPInputStream.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
@@ -69,10 +69,10 @@
* @param in the input stream
* @param size the input buffer size
*
- * @exception ZipException if a GZIP format error has occurred or the
+ * @throws ZipException if a GZIP format error has occurred or the
* compression method used is unsupported
- * @exception IOException if an I/O error has occurred
- * @exception IllegalArgumentException if {@code size <= 0}
+ * @throws IOException if an I/O error has occurred
+ * @throws IllegalArgumentException if {@code size <= 0}
*/
public GZIPInputStream(InputStream in, int size) throws IOException {
super(in, new Inflater(true), size);
@@ -84,9 +84,9 @@
* Creates a new input stream with a default buffer size.
* @param in the input stream
*
- * @exception ZipException if a GZIP format error has occurred or the
+ * @throws ZipException if a GZIP format error has occurred or the
* compression method used is unsupported
- * @exception IOException if an I/O error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public GZIPInputStream(InputStream in) throws IOException {
this(in, 512);
@@ -102,12 +102,12 @@
* @return the actual number of bytes read, or -1 if the end of the
* compressed input stream is reached
*
- * @exception NullPointerException If buf
is null
.
- * @exception IndexOutOfBoundsException If off
is negative,
+ * @throws NullPointerException If buf
is null
.
+ * @throws IndexOutOfBoundsException If off
is negative,
* len
is negative, or len
is greater than
* buf.length - off
- * @exception ZipException if the compressed input data is corrupt.
- * @exception IOException if an I/O error has occurred.
+ * @throws ZipException if the compressed input data is corrupt.
+ * @throws IOException if an I/O error has occurred.
*
*/
public int read(byte[] buf, int off, int len) throws IOException {
@@ -130,7 +130,7 @@
/**
* Closes this input stream and releases any system 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 {
if (!closed) {
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/zip/GZIPOutputStream.java
--- a/src/java.base/share/classes/java/util/zip/GZIPOutputStream.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/zip/GZIPOutputStream.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
@@ -61,8 +61,8 @@
*
* @param out the output stream
* @param size the output buffer size
- * @exception IOException If an I/O error has occurred.
- * @exception IllegalArgumentException if {@code size <= 0}
+ * @throws IOException If an I/O error has occurred.
+ * @throws IllegalArgumentException if {@code size <= 0}
*/
public GZIPOutputStream(OutputStream out, int size) throws IOException {
this(out, size, false);
@@ -80,8 +80,8 @@
* this instance flushes the compressor with flush mode
* {@link Deflater#SYNC_FLUSH} before flushing the output
* stream, otherwise only flushes the output stream
- * @exception IOException If an I/O error has occurred.
- * @exception IllegalArgumentException if {@code size <= 0}
+ * @throws IOException If an I/O error has occurred.
+ * @throws IllegalArgumentException if {@code size <= 0}
*
* @since 1.7
*/
@@ -104,7 +104,7 @@
* the 2-argument constructor GZIPOutputStream(out, false).
*
* @param out the output stream
- * @exception IOException If an I/O error has occurred.
+ * @throws IOException If an I/O error has occurred.
*/
public GZIPOutputStream(OutputStream out) throws IOException {
this(out, 512, false);
@@ -122,7 +122,7 @@
* {@link Deflater#SYNC_FLUSH} before flushing the output
* stream, otherwise only flushes the output stream
*
- * @exception IOException If an I/O error has occurred.
+ * @throws IOException If an I/O error has occurred.
*
* @since 1.7
*/
@@ -138,7 +138,7 @@
* @param buf the data to be written
* @param off the start offset of the data
* @param len the length of the data
- * @exception IOException If an I/O error has occurred.
+ * @throws IOException If an I/O error has occurred.
*/
public synchronized void write(byte[] buf, int off, int len)
throws IOException
@@ -151,7 +151,7 @@
* Finishes writing compressed data to the output stream without closing
* the underlying stream. Use this method when applying multiple filters
* in succession to the same output stream.
- * @exception IOException if an I/O error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public void finish() throws IOException {
if (!def.finished()) {
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/zip/InflaterInputStream.java
--- a/src/java.base/share/classes/java/util/zip/InflaterInputStream.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/zip/InflaterInputStream.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 @@
* @param in the input stream
* @param inf the decompressor ("inflater")
* @param size the input buffer size
- * @exception IllegalArgumentException if {@code size <= 0}
+ * @throws IllegalArgumentException if {@code size <= 0}
*/
public InflaterInputStream(InputStream in, Inflater inf, int size) {
super(in);
@@ -116,7 +116,7 @@
* Reads a byte of uncompressed data. This method will block until
* enough input is available for decompression.
* @return the byte read, or -1 if end of compressed input 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 {
ensureOpen();
@@ -132,12 +132,12 @@
* @param len the maximum number of bytes read
* @return the actual number of bytes read, or -1 if the end of the
* compressed input is reached or a preset dictionary is needed
- * @exception NullPointerException If b
is null
.
- * @exception IndexOutOfBoundsException If off
is negative,
+ * @throws NullPointerException If b
is null
.
+ * @throws IndexOutOfBoundsException If off
is negative,
* len
is negative, or len
is greater than
* b.length - off
- * @exception ZipException if a ZIP format error has occurred
- * @exception IOException if an I/O error has occurred
+ * @throws ZipException if a ZIP format error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public int read(byte[] b, int off, int len) throws IOException {
ensureOpen();
@@ -173,7 +173,7 @@
* of bytes that could be read without blocking.
*
* @return 1 before EOF and 0 after EOF.
- * @exception IOException if an I/O error occurs.
+ * @throws IOException if an I/O error occurs.
*
*/
public int available() throws IOException {
@@ -195,8 +195,8 @@
* Skips specified number of bytes of uncompressed data.
* @param n the number of bytes to skip
* @return the actual number of bytes skipped.
- * @exception IOException if an I/O error has occurred
- * @exception IllegalArgumentException if {@code n < 0}
+ * @throws IOException if an I/O error has occurred
+ * @throws IllegalArgumentException if {@code n < 0}
*/
public long skip(long n) throws IOException {
if (n < 0) {
@@ -223,7 +223,7 @@
/**
* Closes this input stream and releases any system 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 {
if (!closed) {
@@ -236,7 +236,7 @@
/**
* Fills input buffer with more data to decompress.
- * @exception IOException if an I/O error has occurred
+ * @throws IOException if an I/O error has occurred
*/
protected void fill() throws IOException {
ensureOpen();
@@ -283,7 +283,7 @@
* InflaterInputStream
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
*/
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/zip/ZipInputStream.java
--- a/src/java.base/share/classes/java/util/zip/ZipInputStream.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/zip/ZipInputStream.java Fri Sep 20 11:07:52 2019 +0100
@@ -110,8 +110,8 @@
* Reads the next ZIP file entry and positions the stream at the
* beginning of the entry data.
* @return the next ZIP file entry, or null if there are no more entries
- * @exception ZipException if a ZIP file error has occurred
- * @exception IOException if an I/O error has occurred
+ * @throws ZipException if a ZIP file error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public ZipEntry getNextEntry() throws IOException {
ensureOpen();
@@ -133,8 +133,8 @@
/**
* Closes the current ZIP entry and positions the stream for reading the
* next entry.
- * @exception ZipException if a ZIP file error has occurred
- * @exception IOException if an I/O error has occurred
+ * @throws ZipException if a ZIP file error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public void closeEntry() throws IOException {
ensureOpen();
@@ -150,7 +150,7 @@
* of bytes that could be read without blocking.
*
* @return 1 before EOF and 0 after EOF has reached for current entry.
- * @exception IOException if an I/O error occurs.
+ * @throws IOException if an I/O error occurs.
*
*/
public int available() throws IOException {
@@ -172,12 +172,12 @@
* @param len the maximum number of bytes read
* @return the actual number of bytes read, or -1 if the end of the
* entry is reached
- * @exception NullPointerException if b
is null
.
- * @exception IndexOutOfBoundsException if off
is negative,
+ * @throws NullPointerException if b
is null
.
+ * @throws IndexOutOfBoundsException if off
is negative,
* len
is negative, or len
is greater than
* b.length - off
- * @exception ZipException if a ZIP file error has occurred
- * @exception IOException if an I/O error has occurred
+ * @throws ZipException if a ZIP file error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public int read(byte[] b, int off, int len) throws IOException {
ensureOpen();
@@ -231,9 +231,9 @@
* Skips specified number of bytes in the current ZIP entry.
* @param n the number of bytes to skip
* @return the actual number of bytes skipped
- * @exception ZipException if a ZIP file error has occurred
- * @exception IOException if an I/O error has occurred
- * @exception IllegalArgumentException if {@code n < 0}
+ * @throws ZipException if a ZIP file error has occurred
+ * @throws IOException if an I/O error has occurred
+ * @throws IllegalArgumentException if {@code n < 0}
*/
public long skip(long n) throws IOException {
if (n < 0) {
@@ -260,7 +260,7 @@
/**
* Closes this input stream and releases any system 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 {
if (!closed) {
diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/zip/ZipOutputStream.java
--- a/src/java.base/share/classes/java/util/zip/ZipOutputStream.java Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/util/zip/ZipOutputStream.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
@@ -140,8 +140,8 @@
/**
* Sets the ZIP file comment.
- * @param comment the comment string
- * @exception IllegalArgumentException if the length of the specified
+ * @param comment the comment string
+ * @throws IllegalArgumentException if the length of the specified
* ZIP file comment is greater than 0xFFFF bytes
*/
public void setComment(String comment) {
@@ -156,8 +156,8 @@
* Sets the default compression method for subsequent entries. This
* default will be used whenever the compression method is not specified
* for an individual ZIP file entry, and is initially set to DEFLATED.
- * @param method the default compression method
- * @exception IllegalArgumentException if the specified compression method
+ * @param method the default compression method
+ * @throws IllegalArgumentException if the specified compression method
* is invalid
*/
public void setMethod(int method) {
@@ -170,8 +170,8 @@
/**
* Sets the compression level for subsequent entries which are DEFLATED.
* The default setting is DEFAULT_COMPRESSION.
- * @param level the compression level (0-9)
- * @exception IllegalArgumentException if the compression level is invalid
+ * @param level the compression level (0-9)
+ * @throws IllegalArgumentException if the compression level is invalid
*/
public void setLevel(int level) {
def.setLevel(level);
@@ -183,9 +183,9 @@
* The default compression method will be used if no compression method
* was specified for the entry, and the current time will be used if
* the entry has no set modification time.
- * @param e the ZIP entry to be written
- * @exception ZipException if a ZIP format error has occurred
- * @exception IOException if an I/O error has occurred
+ * @param e the ZIP entry to be written
+ * @throws ZipException if a ZIP format error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public void putNextEntry(ZipEntry e) throws IOException {
ensureOpen();
@@ -242,8 +242,8 @@
/**
* Closes the current ZIP entry and positions the stream for writing
* the next entry.
- * @exception ZipException if a ZIP format error has occurred
- * @exception IOException if an I/O error has occurred
+ * @throws ZipException if a ZIP format error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public void closeEntry() throws IOException {
ensureOpen();
@@ -307,11 +307,11 @@
/**
* Writes an array of bytes to the current ZIP entry data. This method
* will block until all the bytes are 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 ZipException if a ZIP file error has occurred
- * @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 ZipException if a ZIP file error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public synchronized void write(byte[] b, int off, int len)
throws IOException
@@ -349,8 +349,8 @@
* Finishes writing the contents of the ZIP output stream without closing
* the underlying stream. Use this method when applying multiple filters
* in succession to the same output stream.
- * @exception ZipException if a ZIP file error has occurred
- * @exception IOException if an I/O exception has occurred
+ * @throws ZipException if a ZIP file error has occurred
+ * @throws IOException if an I/O exception has occurred
*/
public void finish() throws IOException {
ensureOpen();
@@ -370,8 +370,8 @@
/**
* Closes the ZIP output stream as well as the stream being filtered.
- * @exception ZipException if a ZIP file error has occurred
- * @exception IOException if an I/O error has occurred
+ * @throws ZipException if a ZIP file error has occurred
+ * @throws IOException if an I/O error has occurred
*/
public void close() throws IOException {
if (!closed) {