JDK-4948295 : MemoryHandler() prints to stderr along with RuntimeException
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.logging
  • Affected Version: 5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2003-11-04
  • Updated: 2003-11-23
  • Resolved: 2003-11-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b30Fixed
Related Reports
Relates :  
Description

Name: agR10195			Date: 11/04/2003



The following test MH reveals that MemoryHandler() throws RuntimeException,
but it also  prints two messages into stderr, if
java.util.logging.MemoryHandler.target is not set or set to unexisting
handler. Such behavior does not contradict the spec, but it is unusual - error
messages are usually wrapped into execptions (into RuntimeException in this
case).

public class MH {
    final static LogManager logManager = LogManager.getLogManager();

    public static void main (String args[]) {
        try {
            MemoryHandler handler = new MemoryHandler();
        } catch (RuntimeException e) {
        }
    }
}

% ../jdk1.5.0-b25/solaris-sparc/bin/java MH
MemoryHandler can't load handler "null"
java.lang.NullPointerException

======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta FIXED IN: tiger-beta INTEGRATED IN: tiger-b30 tiger-beta
14-06-2004

EVALUATION Simply use a runtimeexception with a throw cause ###@###.### 2003-11-05
05-11-2003