changeset 60743:e10d8b01715e

8252265: Replace @exception with @throws java.util.logging package Summary: @exception should be updated with @throws. Reviewed-by: dfuchs, lancea
author vsharma
date Sat, 29 Aug 2020 00:00:10 +0530
parents 888baa56b951
children c871ea8d4993
files src/java.logging/share/classes/java/util/logging/FileHandler.java src/java.logging/share/classes/java/util/logging/Handler.java src/java.logging/share/classes/java/util/logging/LogManager.java src/java.logging/share/classes/java/util/logging/MemoryHandler.java src/java.logging/share/classes/java/util/logging/SocketHandler.java src/java.logging/share/classes/java/util/logging/StreamHandler.java
diffstat 6 files changed, 45 insertions(+), 45 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.logging/share/classes/java/util/logging/FileHandler.java	Mon Aug 31 11:18:20 2020 +0300
+++ b/src/java.logging/share/classes/java/util/logging/FileHandler.java	Sat Aug 29 00:00:10 2020 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -262,10 +262,10 @@
      * Construct a default {@code FileHandler}.  This will be configured
      * entirely from {@code LogManager} properties (or their default values).
      *
-     * @exception  IOException if there are IO problems opening the files.
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  IOException if there are IO problems opening the files.
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control"))}.
-     * @exception  NullPointerException if pattern property is an empty String.
+     * @throws  NullPointerException if pattern property is an empty String.
      */
     public FileHandler() throws IOException, SecurityException {
         checkPermission();
@@ -290,10 +290,10 @@
      * so use this with care.
      *
      * @param pattern  the name of the output file
-     * @exception  IOException if there are IO problems opening the files.
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  IOException if there are IO problems opening the files.
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
-     * @exception  IllegalArgumentException if pattern is an empty string
+     * @throws  IllegalArgumentException if pattern is an empty string
      */
     public FileHandler(String pattern) throws IOException, SecurityException {
         if (pattern.length() < 1 ) {
@@ -322,10 +322,10 @@
      *
      * @param pattern  the name of the output file
      * @param append  specifies append mode
-     * @exception  IOException if there are IO problems opening the files.
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  IOException if there are IO problems opening the files.
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
-     * @exception  IllegalArgumentException if pattern is an empty string
+     * @throws  IllegalArgumentException if pattern is an empty string
      */
     public FileHandler(String pattern, boolean append) throws IOException,
             SecurityException {
@@ -358,11 +358,11 @@
      * @param pattern  the pattern for naming the output file
      * @param limit  the maximum number of bytes to write to any one file
      * @param count  the number of files to use
-     * @exception  IOException if there are IO problems opening the files.
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  IOException if there are IO problems opening the files.
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
-     * @exception  IllegalArgumentException if {@code limit < 0}, or {@code count < 1}.
-     * @exception  IllegalArgumentException if pattern is an empty string
+     * @throws  IllegalArgumentException if {@code limit < 0}, or {@code count < 1}.
+     * @throws  IllegalArgumentException if pattern is an empty string
      */
     public FileHandler(String pattern, int limit, int count)
                                         throws IOException, SecurityException {
@@ -396,11 +396,11 @@
      * @param limit  the maximum number of bytes to write to any one file
      * @param count  the number of files to use
      * @param append  specifies append mode
-     * @exception  IOException if there are IO problems opening the files.
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  IOException if there are IO problems opening the files.
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
-     * @exception  IllegalArgumentException if {@code limit < 0}, or {@code count < 1}.
-     * @exception  IllegalArgumentException if pattern is an empty string
+     * @throws  IllegalArgumentException if {@code limit < 0}, or {@code count < 1}.
+     * @throws  IllegalArgumentException if pattern is an empty string
      *
      */
     public FileHandler(String pattern, int limit, int count, boolean append)
@@ -427,11 +427,11 @@
      * @param limit  the maximum number of bytes to write to any one file
      * @param count  the number of files to use
      * @param append  specifies append mode
-     * @exception  IOException if there are IO problems opening the files.
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  IOException if there are IO problems opening the files.
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
-     * @exception  IllegalArgumentException if {@code limit < 0}, or {@code count < 1}.
-     * @exception  IllegalArgumentException if pattern is an empty string
+     * @throws  IllegalArgumentException if {@code limit < 0}, or {@code count < 1}.
+     * @throws  IllegalArgumentException if pattern is an empty string
      *
      * @since 9
      *
@@ -769,7 +769,7 @@
     /**
      * Close all the files.
      *
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
      */
     @Override
--- a/src/java.logging/share/classes/java/util/logging/Handler.java	Mon Aug 31 11:18:20 2020 +0300
+++ b/src/java.logging/share/classes/java/util/logging/Handler.java	Sat Aug 29 00:00:10 2020 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -148,7 +148,7 @@
      * should no longer be used.  Method calls may either be silently
      * ignored or may throw runtime exceptions.
      *
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
      */
     public abstract void close() throws SecurityException;
@@ -161,7 +161,7 @@
      * which case the {@code Formatter} will be remembered, but not used.
      *
      * @param newFormatter the {@code Formatter} to use (may not be null)
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
      */
     public synchronized void setFormatter(Formatter newFormatter) throws SecurityException {
@@ -185,9 +185,9 @@
      *
      * @param encoding  The name of a supported character encoding.
      *        May be null, to indicate the default platform encoding.
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
-     * @exception  UnsupportedEncodingException if the named encoding is
+     * @throws  UnsupportedEncodingException if the named encoding is
      *          not supported.
      */
     public synchronized void setEncoding(String encoding)
@@ -223,7 +223,7 @@
      * {@code LogRecord} should be published or discarded.
      *
      * @param   newFilter  a {@code Filter} object (may be null)
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
      */
     public synchronized void setFilter(Filter newFilter) throws SecurityException {
@@ -247,7 +247,7 @@
      * errors occur while using this Handler.
      *
      * @param em  the new ErrorManager
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
      */
     public synchronized void setErrorManager(ErrorManager em) {
@@ -262,7 +262,7 @@
      * Retrieves the ErrorManager for this Handler.
      *
      * @return the ErrorManager for this Handler
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
      */
     public ErrorManager getErrorManager() {
@@ -299,7 +299,7 @@
      * {@code Handlers}.
      *
      * @param newLevel   the new value for the log level
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
      */
     public synchronized void setLevel(Level newLevel) throws SecurityException {
--- a/src/java.logging/share/classes/java/util/logging/LogManager.java	Mon Aug 31 11:18:20 2020 +0300
+++ b/src/java.logging/share/classes/java/util/logging/LogManager.java	Sat Aug 29 00:00:10 2020 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -1184,7 +1184,7 @@
      * @param   logger the new logger.
      * @return  true if the argument logger was registered successfully,
      *          false if a logger of that name already exists.
-     * @exception NullPointerException if the logger name is null.
+     * @throws NullPointerException if the logger name is null.
      */
     public boolean addLogger(Logger logger) {
         final String name = logger.getName();
@@ -2439,7 +2439,7 @@
      * If the check fails we throw a SecurityException, otherwise
      * we return normally.
      *
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have LoggingPermission("control").
      */
     public void checkAccess() throws SecurityException {
--- a/src/java.logging/share/classes/java/util/logging/MemoryHandler.java	Mon Aug 31 11:18:20 2020 +0300
+++ b/src/java.logging/share/classes/java/util/logging/MemoryHandler.java	Sat Aug 29 00:00:10 2020 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -226,7 +226,7 @@
      * Close the {@code Handler} and free all associated resources.
      * This will also close the target {@code Handler}.
      *
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
      */
     @Override
@@ -241,7 +241,7 @@
      * the {@code pushLevel}, then {@code push} will be called.
      *
      * @param newLevel the new value of the {@code pushLevel}
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
      */
     public synchronized void setPushLevel(Level newLevel) throws SecurityException {
--- a/src/java.logging/share/classes/java/util/logging/SocketHandler.java	Mon Aug 31 11:18:20 2020 +0300
+++ b/src/java.logging/share/classes/java/util/logging/SocketHandler.java	Sat Aug 29 00:00:10 2020 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -152,7 +152,7 @@
     /**
      * Close this output stream.
      *
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
      */
     @Override
--- a/src/java.logging/share/classes/java/util/logging/StreamHandler.java	Mon Aug 31 11:18:20 2020 +0300
+++ b/src/java.logging/share/classes/java/util/logging/StreamHandler.java	Sat Aug 29 00:00:10 2020 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -119,7 +119,7 @@
      * Then the output stream is replaced with the new output stream.
      *
      * @param out   New output stream.  May not be null.
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
      */
     protected synchronized void setOutputStream(OutputStream out) throws SecurityException {
@@ -151,9 +151,9 @@
      *
      * @param encoding  The name of a supported character encoding.
      *        May be null, to indicate the default platform encoding.
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have {@code LoggingPermission("control")}.
-     * @exception  UnsupportedEncodingException if the named encoding is
+     * @throws  UnsupportedEncodingException if the named encoding is
      *          not supported.
      */
     @Override
@@ -282,7 +282,7 @@
      * yet been written to the stream, it will be written before the
      * "tail" string.
      *
-     * @exception  SecurityException  if a security manager exists and if
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have LoggingPermission("control").
      */
     @Override