-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0
Name: szR10032 Date: 09/18/2000
The logging APIs specification (v. 049) defines all methods which throw
SecurityException (RuntimeException's subclass). However,
SocketHandler.SocketHandler(Formatter) is not defined as throwing SecurityException.
The nsk/logging/SocketHandler/SocketHandler_f/sckth_f002 test shows that SecurityException
is thrown by SocketHandler(Formatter) if logging permission is denied.
And it's clear because SocketHandler(Formatter) invokes Handler.setFormatter method
which, according to the spec, must throw SecurityException if logging
permission is denied. Therefore, the spec should define SocketHandler.SocketHandler(Formatter)
as throwing SecurityException and this method source should have corresponding
throws clause.
The same problem occurs also for
ConsoleHandler.ConsoleHandler(Formatter) constructor.
======================================================================
Name: elR10090 Date: 10/04/2000
Moreover, the same problem occurs also for the following constructors:
(1) ConsoleHandler()
(2) SocketHandler()
(3) SocketHandler(String, int)
(4) StreamHandler(Formatter)
(5) StreamHandler(OutputStream, Formatter)
(1), (2), (3) invoke Handler.setLevel(Level) method that according
to the spec throws SecurityException if logging permission is denied.
(4), (5) invoke Handler.setFormatter method like the constructors
mentioned above.
======================================================================
Name: elR10090 Date: 02/01/2001
This bug affects the following testbase_nsk test:
nsk/logging/ConsoleHandler/ConsoleHandler/cnslhndl002
nsk/logging/SocketHandler/SocketHandler/sckthndl002
nsk/logging/SocketHandler/SocketHandler_si/sckth_si002
nsk/logging/StreamHandler/StreamHandler/strmhnd002
nsk/logging/StreamHandler/StreamHandler_of/strmhndof002
See also Justification.
======================================================================
- relates to
-
JDK-7009131 undocumented SecurityException in LOGGING API
- Open
-
JDK-4462052 ConsoleHandler constructor throws SecurityException
- Closed