You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2006/08/17 19:56:16 UTC

[jira] Resolved: (HARMONY-692) [classlib][logging]unexpected error message for Handler().isLoggable(null)

     [ http://issues.apache.org/jira/browse/HARMONY-692?page=all ]

Tim Ellison resolved HARMONY-692.
---------------------------------

    Resolution: Fixed

Thanks Vladimir,

Patch applied to LOGGING module at repo revision r432309.

Please check that it was applied as you expected.


> [classlib][logging]unexpected error message for Handler().isLoggable(null)
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-692
>                 URL: http://issues.apache.org/jira/browse/HARMONY-692
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Vladimir Ivanov
>         Assigned To: Tim Ellison
>            Priority: Minor
>         Attachments: Handler.patch
>
>
> The j2se spec says for the java.util.logging.Handler.isLoggable(LogRecord record)
> 'It will return false if the LogRecord is Null'
> but harmony print additional error message that can confuse user.
> =============== test.java ======================
> import java.util.logging.*;
> public class test  {
>     public static void main (String[] args) { 
>         System.out.println("isLoggable(null) = " + new ConsoleHandler().isLoggable(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))
> isLoggable(null) = false
> 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.
> java.util.logging.ErrorManager: the error code is 0.
> The error message is: Null pointer of LogRecord
> java.lang.NullPointerException: null
> isLoggable(null) = false
> 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.Handler.initProperties(Handler.java:132)
>         at java.util.logging.StreamHandler.<init>(StreamHandler.java:79)
>         at java.util.logging.StreamHandler.<init>(StreamHandler.java:94)
>         at java.util.logging.ConsoleHandler.<init>(ConsoleHandler.java:58)
>         at test.main(test.java:5)
> java.util.logging.ErrorManager: the error code is 0.
> The error message is: Null pointer of LogRecord
> java.lang.NullPointerException: null
> isLoggable(null) = false

-- 
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