Skip to content
Permalink
Browse files
8252537: Updated @exception with @throws
8252536: Replace @exception with @throws for core-libs
8252539: Replace @exception with @throws java.rmi.activation package
8252540: Replace @exception with @throws java.rmi.registry package
8252541: Replace @exception with @throws java.rmi.server package

Reviewed-by: rriggs, sspitsyn, lancea
  • Loading branch information
Vipin Sharma authored and Lance Andersen committed Oct 2, 2020
1 parent 406db1c commit dffe9db25c19a7e99d3d35c535197bf7e4c15c8a
Showing with 2,109 additions and 2,109 deletions.
  1. +4 −4 src/java.management/share/classes/java/lang/management/ClassLoadingMXBean.java
  2. +2 −2 src/java.management/share/classes/java/lang/management/ManagementFactory.java
  3. +4 −4 src/java.management/share/classes/java/lang/management/MemoryMXBean.java
  4. +16 −16 src/java.naming/share/classes/javax/naming/CompositeName.java
  5. +20 −20 src/java.naming/share/classes/javax/naming/CompoundName.java
  6. +7 −7 src/java.naming/share/classes/javax/naming/InitialContext.java
  7. +3 −3 src/java.naming/share/classes/javax/naming/LinkRef.java
  8. +3 −3 src/java.naming/share/classes/javax/naming/NameParser.java
  9. +5 −5 src/java.naming/share/classes/javax/naming/NamingEnumeration.java
  10. +4 −4 src/java.naming/share/classes/javax/naming/Reference.java
  11. +2 −2 src/java.naming/share/classes/javax/naming/Referenceable.java
  12. +3 −3 src/java.naming/share/classes/javax/naming/ReferralException.java
  13. +5 −5 src/java.naming/share/classes/javax/naming/event/EventContext.java
  14. +5 −5 src/java.naming/share/classes/javax/naming/event/EventDirContext.java
  15. +3 −3 src/java.naming/share/classes/javax/naming/ldap/ControlFactory.java
  16. +3 −3 src/java.naming/share/classes/javax/naming/ldap/ExtendedRequest.java
  17. +5 −5 src/java.naming/share/classes/javax/naming/ldap/LdapContext.java
  18. +4 −4 src/java.naming/share/classes/javax/naming/ldap/LdapReferralException.java
  19. +5 −5 src/java.naming/share/classes/javax/naming/ldap/PagedResultsControl.java
  20. +2 −2 src/java.naming/share/classes/javax/naming/ldap/PagedResultsResponseControl.java
  21. +1 −1 src/java.naming/share/classes/javax/naming/ldap/Rdn.java
  22. +9 −9 src/java.naming/share/classes/javax/naming/ldap/SortControl.java
  23. +2 −2 src/java.naming/share/classes/javax/naming/ldap/SortResponseControl.java
  24. +2 −2 src/java.naming/share/classes/javax/naming/ldap/StartTlsRequest.java
  25. +2 −2 src/java.naming/share/classes/javax/naming/spi/DirObjectFactory.java
  26. +2 −2 src/java.naming/share/classes/javax/naming/spi/DirStateFactory.java
  27. +5 −5 src/java.naming/share/classes/javax/naming/spi/DirectoryManager.java
  28. +2 −2 src/java.naming/share/classes/javax/naming/spi/InitialContextFactory.java
  29. +2 −2 src/java.naming/share/classes/javax/naming/spi/InitialContextFactoryBuilder.java
  30. +16 −16 src/java.naming/share/classes/javax/naming/spi/NamingManager.java
  31. +2 −2 src/java.naming/share/classes/javax/naming/spi/ObjectFactory.java
  32. +2 −2 src/java.naming/share/classes/javax/naming/spi/ObjectFactoryBuilder.java
  33. +2 −2 src/java.naming/share/classes/javax/naming/spi/StateFactory.java
  34. +34 −34 src/java.rmi/share/classes/java/rmi/activation/Activatable.java
  35. +8 −8 src/java.rmi/share/classes/java/rmi/activation/ActivationDesc.java
  36. +22 −22 src/java.rmi/share/classes/java/rmi/activation/ActivationGroup.java
  37. +3 −3 src/java.rmi/share/classes/java/rmi/activation/ActivationID.java
  38. +2 −2 src/java.rmi/share/classes/java/rmi/activation/ActivationInstantiator.java
  39. +6 −6 src/java.rmi/share/classes/java/rmi/activation/ActivationMonitor.java
  40. +28 −28 src/java.rmi/share/classes/java/rmi/activation/ActivationSystem.java
  41. +3 −3 src/java.rmi/share/classes/java/rmi/activation/Activator.java
  42. +8 −8 src/java.rmi/share/classes/java/rmi/registry/LocateRegistry.java
  43. +13 −13 src/java.rmi/share/classes/java/rmi/server/LoaderHandler.java
  44. +2 −2 src/java.rmi/share/classes/java/rmi/server/RMIClientSocketFactory.java
  45. +2 −2 src/java.rmi/share/classes/java/rmi/server/RMIServerSocketFactory.java
  46. +6 −6 src/java.rmi/share/classes/java/rmi/server/RMISocketFactory.java
  47. +9 −9 src/java.rmi/share/classes/java/rmi/server/RemoteCall.java
  48. +2 −2 src/java.rmi/share/classes/java/rmi/server/RemoteObject.java
  49. +2 −2 src/java.rmi/share/classes/java/rmi/server/RemoteRef.java
  50. +3 −3 src/java.rmi/share/classes/java/rmi/server/ServerRef.java
  51. +1 −1 src/java.rmi/share/classes/java/rmi/server/Skeleton.java
  52. +7 −7 src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java
  53. +23 −23 src/java.sql/share/classes/java/sql/Array.java
  54. +42 −42 src/java.sql/share/classes/java/sql/Blob.java
  55. +325 −325 src/java.sql/share/classes/java/sql/CallableStatement.java
  56. +50 −50 src/java.sql/share/classes/java/sql/Clob.java
  57. +77 −77 src/java.sql/share/classes/java/sql/Connection.java
  58. +170 −170 src/java.sql/share/classes/java/sql/DatabaseMetaData.java
  59. +9 −9 src/java.sql/share/classes/java/sql/Date.java
  60. +4 −4 src/java.sql/share/classes/java/sql/Driver.java
  61. +9 −9 src/java.sql/share/classes/java/sql/DriverManager.java
  62. +10 −10 src/java.sql/share/classes/java/sql/ParameterMetaData.java
  63. +111 −111 src/java.sql/share/classes/java/sql/PreparedStatement.java
  64. +9 −9 src/java.sql/share/classes/java/sql/Ref.java
  65. +410 −410 src/java.sql/share/classes/java/sql/ResultSet.java
  66. +22 −22 src/java.sql/share/classes/java/sql/ResultSetMetaData.java
  67. +7 −7 src/java.sql/share/classes/java/sql/SQLData.java
  68. +58 −58 src/java.sql/share/classes/java/sql/SQLInput.java
  69. +59 −59 src/java.sql/share/classes/java/sql/SQLOutput.java
  70. +10 −10 src/java.sql/share/classes/java/sql/SQLXML.java
  71. +3 −3 src/java.sql/share/classes/java/sql/Savepoint.java
  72. +137 −137 src/java.sql/share/classes/java/sql/Statement.java
  73. +7 −7 src/java.sql/share/classes/java/sql/Struct.java
  74. +17 −17 src/java.sql/share/classes/java/sql/Time.java
  75. +8 −8 src/java.sql/share/classes/java/sql/Timestamp.java
  76. +5 −5 src/java.sql/share/classes/javax/sql/CommonDataSource.java
  77. +5 −5 src/java.sql/share/classes/javax/sql/ConnectionPoolDataSource.java
  78. +3 −3 src/java.sql/share/classes/javax/sql/DataSource.java
  79. +5 −5 src/java.sql/share/classes/javax/sql/PooledConnection.java
  80. +159 −159 src/java.sql/share/classes/javax/sql/RowSet.java
  81. +9 −9 src/java.sql/share/classes/javax/sql/RowSetInternal.java
  82. +18 −18 src/java.sql/share/classes/javax/sql/RowSetMetaData.java
  83. +3 −3 src/java.sql/share/classes/javax/sql/RowSetReader.java
  84. +2 −2 src/java.sql/share/classes/javax/sql/RowSetWriter.java
  85. +3 −3 src/java.sql/share/classes/javax/sql/XAConnection.java
  86. +5 −5 src/java.sql/share/classes/javax/sql/XADataSource.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
@@ -105,9 +105,9 @@
* @param value {@code true} to enable the verbose output;
* {@code false} to disable.
*
* @exception java.lang.SecurityException if a security manager
* exists and the caller does not have
* ManagementPermission("control").
* @throws java.lang.SecurityException if a security manager
* exists and the caller does not have
* ManagementPermission("control").
*/
public void setVerbose(boolean value);

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
@@ -465,7 +465,7 @@ public static OperatingSystemMXBean getOperatingSystemMXBean() {
* MXBeans are registered into the platform {@code MBeanServer}
* at the first time this method is called.
*
* @exception SecurityException if there is a security manager
* @throws SecurityException if there is a security manager
* and the caller does not have the permission required by
* {@link javax.management.MBeanServerFactory#createMBeanServer}.
*
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
@@ -283,9 +283,9 @@
* @param value {@code true} to enable verbose output;
* {@code false} to disable.
*
* @exception java.lang.SecurityException if a security manager
* exists and the caller does not have
* ManagementPermission("control").
* @throws java.lang.SecurityException if a security manager
* exists and the caller does not have
* ManagementPermission("control").
*/
public void setVerbose(boolean value);

@@ -231,7 +231,7 @@ protected CompositeName(Enumeration<String> comps) {
* description.
*
* @param n The non-null string to parse.
* @exception InvalidNameException If n has invalid composite name syntax.
* @throws InvalidNameException If n has invalid composite name syntax.
*/
public CompositeName(String n) throws InvalidNameException {
impl = new NameImpl(null, n); // null means use default syntax
@@ -321,7 +321,7 @@ public int hashCode() {
*
* @return a negative integer, zero, or a positive integer as this Name
* is less than, equal to, or greater than the given Object.
* @exception ClassCastException if obj is not a CompositeName.
* @throws ClassCastException if obj is not a CompositeName.
*/
public int compareTo(Object obj) {
if (!(obj instanceof CompositeName)) {
@@ -380,7 +380,7 @@ public boolean isEmpty() {
* @param posn The 0-based index of the component to retrieve.
* Must be in the range [0,size()).
* @return The non-null component at index posn.
* @exception ArrayIndexOutOfBoundsException if posn is outside the
* @throws ArrayIndexOutOfBoundsException if posn is outside the
* specified range.
*/
public String get(int posn) {
@@ -396,7 +396,7 @@ public String get(int posn) {
* Must be in the range [0,size()].
* @return A composite name consisting of the components at indexes in
* the range [0,posn).
* @exception ArrayIndexOutOfBoundsException
* @throws ArrayIndexOutOfBoundsException
* If posn is outside the specified range.
*/
public Name getPrefix(int posn) {
@@ -414,7 +414,7 @@ public Name getPrefix(int posn) {
* @return A composite name consisting of the components at indexes in
* the range [posn,size()). If posn is equal to
* size(), an empty composite name is returned.
* @exception ArrayIndexOutOfBoundsException
* @throws ArrayIndexOutOfBoundsException
* If posn is outside the specified range.
*/
public Name getSuffix(int posn) {
@@ -465,7 +465,7 @@ public boolean endsWith(Name n) {
*
* @param suffix The non-null components to add.
* @return The updated CompositeName, not a new one. Cannot be null.
* @exception InvalidNameException If suffix is not a composite name.
* @throws InvalidNameException If suffix is not a composite name.
*/
public Name addAll(Name suffix)
throws InvalidNameException
@@ -490,8 +490,8 @@ public Name addAll(Name suffix)
* @param posn The index in this name at which to add the new
* components. Must be in the range [0,size()].
* @return The updated CompositeName, not a new one. Cannot be null.
* @exception InvalidNameException If n is not a composite name.
* @exception ArrayIndexOutOfBoundsException
* @throws InvalidNameException If n is not a composite name.
* @throws ArrayIndexOutOfBoundsException
* If posn is outside the specified range.
*/
public Name addAll(int posn, Name n)
@@ -511,8 +511,8 @@ public Name addAll(int posn, Name n)
*
* @param comp The non-null component to add.
* @return The updated CompositeName, not a new one. Cannot be null.
* @exception InvalidNameException If adding comp at end of the name
* would violate the name's syntax.
* @throws InvalidNameException If adding comp at end of the name
* would violate the name's syntax.
*/
public Name add(String comp) throws InvalidNameException {
impl.add(comp);
@@ -530,10 +530,10 @@ public Name add(String comp) throws InvalidNameException {
* @param posn The index at which to add the new component.
* Must be in the range [0,size()].
* @return The updated CompositeName, not a new one. Cannot be null.
* @exception ArrayIndexOutOfBoundsException
* @throws ArrayIndexOutOfBoundsException
* If posn is outside the specified range.
* @exception InvalidNameException If adding comp at the specified position
* would violate the name's syntax.
* @throws InvalidNameException If adding comp at the specified position
* would violate the name's syntax.
*/
public Name add(int posn, String comp)
throws InvalidNameException
@@ -551,11 +551,11 @@ public Name add(int posn, String comp)
* @param posn The index of the component to delete.
* Must be in the range [0,size()).
* @return The component removed (a String).
* @exception ArrayIndexOutOfBoundsException
* @throws ArrayIndexOutOfBoundsException
* If posn is outside the specified range (includes case where
* composite name is empty).
* @exception InvalidNameException If deleting the component
* would violate the name's syntax.
* @throws InvalidNameException If deleting the component
* would violate the name's syntax.
*/
public Object remove(int posn) throws InvalidNameException{
return impl.remove(posn);
@@ -192,7 +192,7 @@ protected CompoundName(Enumeration<String> comps, Properties syntax) {
* @param syntax A non-null list of properties that specify the syntax of
* this compound name. See class description for
* contents of properties.
* @exception InvalidNameException If 'n' violates the syntax specified
* @throws InvalidNameException If 'n' violates the syntax specified
* by {@code syntax}.
*/
public CompoundName(String n, Properties syntax) throws InvalidNameException {
@@ -304,7 +304,7 @@ public Object clone() {
* @param obj The non-null object to compare against.
* @return a negative integer, zero, or a positive integer as this Name
* is less than, equal to, or greater than the given Object.
* @exception ClassCastException if obj is not a CompoundName.
* @throws ClassCastException if obj is not a CompoundName.
* @see #equals(java.lang.Object)
*/
public int compareTo(Object obj) {
@@ -352,7 +352,7 @@ public boolean isEmpty() {
* @param posn The 0-based index of the component to retrieve.
* Must be in the range [0,size()).
* @return The component at index posn.
* @exception ArrayIndexOutOfBoundsException if posn is outside the
* @throws ArrayIndexOutOfBoundsException if posn is outside the
* specified range.
*/
public String get(int posn) {
@@ -371,7 +371,7 @@ public String get(int posn) {
* Must be in the range [0,size()].
* @return A compound name consisting of the components at indexes in
* the range [0,posn).
* @exception ArrayIndexOutOfBoundsException
* @throws ArrayIndexOutOfBoundsException
* If posn is outside the specified range.
*/
public Name getPrefix(int posn) {
@@ -391,7 +391,7 @@ public Name getPrefix(int posn) {
* @return A compound name consisting of the components at indexes in
* the range [posn,size()). If posn is equal to
* size(), an empty compound name is returned.
* @exception ArrayIndexOutOfBoundsException
* @throws ArrayIndexOutOfBoundsException
* If posn is outside the specified range.
*/
public Name getSuffix(int posn) {
@@ -449,9 +449,9 @@ public boolean endsWith(Name n) {
* is not used or checked. They might be in the future.
* @param suffix The non-null components to add.
* @return The updated CompoundName, not a new one. Cannot be null.
* @exception InvalidNameException If suffix is not a compound name,
* or if the addition of the components violates the syntax
* of this compound name (e.g. exceeding number of components).
* @throws InvalidNameException If suffix is not a compound name,
* or if the addition of the components violates the syntax
* of this compound name (e.g. exceeding number of components).
*/
public Name addAll(Name suffix) throws InvalidNameException {
if (suffix instanceof CompoundName) {
@@ -477,11 +477,11 @@ public Name addAll(Name suffix) throws InvalidNameException {
* @param posn The index in this name at which to add the new
* components. Must be in the range [0,size()].
* @return The updated CompoundName, not a new one. Cannot be null.
* @exception ArrayIndexOutOfBoundsException
* @throws ArrayIndexOutOfBoundsException
* If posn is outside the specified range.
* @exception InvalidNameException If n is not a compound name,
* or if the addition of the components violates the syntax
* of this compound name (e.g. exceeding number of components).
* @throws InvalidNameException If n is not a compound name,
* or if the addition of the components violates the syntax
* of this compound name (e.g. exceeding number of components).
*/
public Name addAll(int posn, Name n) throws InvalidNameException {
if (n instanceof CompoundName) {
@@ -498,8 +498,8 @@ public Name addAll(int posn, Name n) throws InvalidNameException {
*
* @param comp The non-null component to add.
* @return The updated CompoundName, not a new one. Cannot be null.
* @exception InvalidNameException If adding comp at end of the name
* would violate the compound name's syntax.
* @throws InvalidNameException If adding comp at end of the name
* would violate the compound name's syntax.
*/
public Name add(String comp) throws InvalidNameException{
impl.add(comp);
@@ -516,11 +516,11 @@ public Name add(String comp) throws InvalidNameException{
* @param comp The non-null component to add.
* @param posn The index at which to add the new component.
* Must be in the range [0,size()].
* @exception ArrayIndexOutOfBoundsException
* @throws ArrayIndexOutOfBoundsException
* If posn is outside the specified range.
* @return The updated CompoundName, not a new one. Cannot be null.
* @exception InvalidNameException If adding comp at the specified position
* would violate the compound name's syntax.
* @throws InvalidNameException If adding comp at the specified position
* would violate the compound name's syntax.
*/
public Name add(int posn, String comp) throws InvalidNameException{
impl.add(posn, comp);
@@ -536,11 +536,11 @@ public Name add(int posn, String comp) throws InvalidNameException{
* @param posn The index of the component to delete.
* Must be in the range [0,size()).
* @return The component removed (a String).
* @exception ArrayIndexOutOfBoundsException
* @throws ArrayIndexOutOfBoundsException
* If posn is outside the specified range (includes case where
* compound name is empty).
* @exception InvalidNameException If deleting the component
* would violate the compound name's syntax.
* @throws InvalidNameException If deleting the component
* would violate the compound name's syntax.
*/
public Object remove(int posn) throws InvalidNameException {
return impl.remove(posn);
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2020, 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
@@ -297,8 +297,8 @@ private static String getURLScheme(String str) {
* and cache it in defaultInitCtx.
* Set <code>gotDefault</code> so that we know we've tried this before.
* @return The non-null cached initial context.
* @exception NoInitialContextException If cannot find an initial context.
* @exception NamingException If a naming exception was encountered.
* @throws NoInitialContextException If cannot find an initial context.
* @throws NamingException If a naming exception was encountered.
*/
protected Context getDefaultInitCtx() throws NamingException{
if (!gotDefault) {
@@ -323,8 +323,8 @@ protected Context getDefaultInitCtx() throws NamingException{
* @param name The non-null name for which to get the context.
* @return A URL context for <code>name</code> or the cached
* initial context. The result cannot be null.
* @exception NoInitialContextException If cannot find an initial context.
* @exception NamingException In a naming exception is encountered.
* @throws NoInitialContextException If cannot find an initial context.
* @throws NamingException In a naming exception is encountered.
* @see javax.naming.spi.NamingManager#getURLContext
*/
protected Context getURLOrDefaultInitCtx(String name)
@@ -379,8 +379,8 @@ protected Context getURLOrDefaultInitCtx(String name)
* @param name The non-null name for which to get the context.
* @return A URL context for <code>name</code> or the cached
* initial context. The result cannot be null.
* @exception NoInitialContextException If cannot find an initial context.
* @exception NamingException In a naming exception is encountered.
* @throws NoInitialContextException If cannot find an initial context.
* @throws NamingException In a naming exception is encountered.
*
* @see javax.naming.spi.NamingManager#getURLContext
*/
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2020, 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,8 +97,8 @@ public LinkRef(String linkName) {
* Retrieves the name of this link.
*
* @return The non-null name of this link.
* @exception MalformedLinkException If a link name could not be extracted
* @exception NamingException If a naming exception was encountered.
* @throws MalformedLinkException If a link name could not be extracted
* @throws NamingException If a naming exception was encountered.
*/
public String getLinkName() throws NamingException {
if (className != null && className.equals(linkClassName)) {
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2020, 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 @@
* @param name The non-null string name to parse.
* @return A non-null parsed form of the name using the naming convention
* of this parser.
* @exception InvalidNameException If name does not conform to
* @throws InvalidNameException If name does not conform to
* syntax defined for the namespace.
* @exception NamingException If a naming exception was encountered.
* @throws NamingException If a naming exception was encountered.
*/
Name parse(String name) throws NamingException;
}

1 comment on commit dffe9db

@bridgekeeper

This comment has been minimized.

Please sign in to comment.