8230648: Replace @exception tag with @throws in java.base

Minor coding style update of javadoc tag in any file in java.base

Reviewed-by: prappo, lancea
This commit is contained in:
Julia Boes 2019-09-20 11:07:52 +01:00
parent 2fc6c6459d
commit b15b322cf3
196 changed files with 1959 additions and 1962 deletions

View file

@ -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 @@ public class Attributes implements Map<Object,Object>, Cloneable {
* @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 @@ public class Attributes implements Map<Object,Object>, Cloneable {
* @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 @@ public class Attributes implements Map<Object,Object>, Cloneable {
* 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 @@ public class Attributes implements Map<Object,Object>, Cloneable {
* 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);

View file

@ -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 @@ class JarEntry extends ZipEntry {
* entry name.
*
* @param name the JAR file entry name
* @exception NullPointerException if the entry name is <code>null</code>
* @exception IllegalArgumentException if the entry name is longer than
* @throws NullPointerException if the entry name is <code>null</code>
* @throws IllegalArgumentException if the entry name is longer than
* 0xFFFF bytes.
*/
public JarEntry(String name) {

View file

@ -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 @@ class JarInputStream extends ZipInputStream {
* 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 @@ class JarInputStream extends ZipInputStream {
* @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 @@ class JarInputStream extends ZipInputStream {
* 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 @@ class JarInputStream extends ZipInputStream {
* 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 @@ class JarInputStream extends ZipInputStream {
* @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 <code>b</code> is <code>null</code>.
* @exception IndexOutOfBoundsException If <code>off</code> is negative,
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @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 {

View file

@ -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 @@ class JarOutputStream extends ZipOutputStream {
*
* @param out the actual output stream
* @param man the optional <code>Manifest</code>
* @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 @@ class JarOutputStream extends ZipOutputStream {
/**
* Creates a new <code>JarOutputStream</code> 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 @@ class JarOutputStream extends ZipOutputStream {
* 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) {

View file

@ -195,7 +195,7 @@ public class Manifest implements Cloneable {
* 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 @@ public class Manifest implements Cloneable {
* 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);

View file

@ -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 @@ public abstract class Pack200 {
* 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 @@ public abstract class Pack200 {
* @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 @@ public abstract class Pack200 {
* 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 @@ public abstract class Pack200 {
* 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;
}