You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vladimir Ivanov (JIRA)" <ji...@apache.org> on 2006/06/28 15:09:30 UTC
[jira] Updated: (HARMONY-693) [classlib][logging] unexpected NPE
for XMLFormatter().getHead((Handler) null)
[ http://issues.apache.org/jira/browse/HARMONY-693?page=all ]
Vladimir Ivanov updated HARMONY-693:
------------------------------------
Attachment: XMLFormatterTest.patch
unit test
> [classlib][logging] unexpected NPE for XMLFormatter().getHead((Handler) null)
> -----------------------------------------------------------------------------
>
> Key: HARMONY-693
> URL: http://issues.apache.org/jira/browse/HARMONY-693
> Project: Harmony
> Type: Bug
> Reporter: Vladimir Ivanov
> Attachments: XMLFormatterTest.patch
>
> The j2se spec says for java.util.logging.XMLFormatter().getHead(Handler h)
> 'h - The target handler (can be null) ' but harmony throw NPE.
> ================ test.java =======================
> import java.util.logging.*;
> public class test {
> public static void main (String[] args) {
> System.out.println("getHead(null) = " + new XMLFormatter().getHead((Handler) null));
> }
> }
> ==============================================
> Output:
> C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -showversion test
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
> getHead(null) = <?xml version="1.0" encoding="windows-1252" standalone="no"?>
> <!DOCTYPE log SYSTEM "logger.dtd">
> <log>
> C:\tmp\tmp17>C:\harmony\trunk_0427\deploy\jdk\jre\bin\java.exe -showversion test
> java version 1.5 (subset)
> (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> Exception in thread "main" java.lang.NullPointerException
> at java.util.logging.XMLFormatter.getHead(XMLFormatter.java:191)
> at test.main(test.java:5)
> C:\tmp\tmp17>C:\harmony\drlvm\trunk\build\win_ia32_msvc_release\deploy\jre\bin\ij -showversion test
> Apache Harmony DRLVM HEAD-4807 (2006-05-02), Windows/ia32/msvc 1310, release
> java.io.FileNotFoundException
> at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:223)
> at java.io.FileInputStream.<init>(FileInputStream.java:66)
> at java.io.FileInputStream.<init>(FileInputStream.java:110)
> at java.util.logging.LogManager.readConfigurationImpl(LogManager.java:428)
> at java.util.logging.LogManager.<clinit>(LogManager.java:186)
> at java.util.logging.XMLFormatter.<clinit>(XMLFormatter.java:41)
> at test.main(test.java:5)
> java.lang.NullPointerException
> at java.util.logging.XMLFormatter.getHead(XMLFormatter.java:191)
> at test.main(test.java:5)
> C:\tmp\tmp17>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira