Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8252265: Replace @exception with @throws java.util.logging package
@exception should be updated with @throws.

Reviewed-by: dfuchs, lancea
  • Loading branch information
Vipin Sharma committed Aug 28, 2020
1 parent fe0c2ad commit e038528e974b5298df11a3b40422cedf427e39c6
@@ -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 @@ private void configure() {
* 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 @@ public FileHandler() throws IOException, SecurityException {
* 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 @@ public FileHandler(String pattern) throws IOException, SecurityException {
*
* @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 @@ public FileHandler(String pattern, boolean append) throws IOException,
* @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 @@ public FileHandler(String pattern, int limit, int count)
* @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 @@ public FileHandler(String pattern, int limit, int count, boolean append)
* @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 @@ public Object run() {
/**
* 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
@@ -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 @@ public Void run() {
* 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 @@ public Void run() {
* 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 @@ public Formatter getFormatter() {
*
* @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 @@ public String getEncoding() {
* {@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 @@ public Filter getFilter() {
* 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 @@ public synchronized void setErrorManager(ErrorManager em) {
* 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 @@ protected void reportError(String msg, Exception ex, int code) {
* {@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 {
@@ -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 @@ final void drainLoggerRefQueueBounded() {
* @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 @@ void checkPermission() {
* 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 {
@@ -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 @@ public void flush() {
* 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 @@ public void close() throws SecurityException {
* 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 {
@@ -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 @@ private void connect() throws IOException {
/**
* 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
@@ -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 @@ public StreamHandler(OutputStream out, Formatter formatter) {
* 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 @@ protected synchronized void setOutputStream(OutputStream out) throws SecurityExc
*
* @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 @@ private synchronized void flushAndClose() throws SecurityException {
* 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

0 comments on commit e038528

Please sign in to comment.