You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Petrenko (JIRA)" <ji...@apache.org> on 2006/12/07 13:17:34 UTC

[jira] Updated: (HARMONY-1685) [classlib][text] no NPE for NumberFormat.parseObject("test", null))

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

Alexey Petrenko updated HARMONY-1685:
-------------------------------------

    Patch Info: [Patch Available]

> [classlib][text] no NPE for NumberFormat.parseObject("test", null))
> -------------------------------------------------------------------
>
>                 Key: HARMONY-1685
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1685
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Vladimir Ivanov
>         Attachments: NumberFormat.patch
>
>
> The spec says for java.text.NumberFormat.parseObject(String source, ParsePosition pos): "Throws: NullPointerException - if pos is null." Ri do it while Harmony returns null.
> ================ test.java ================
> import java.text.*;
> public class test {
>     public static void main(String[] args) {
>         System.out.println("Result = " + NumberFormat.getInstance().parseObject("test", null));
>     }
> }
> =======================================
> Output:
> ============ BEA 1.5 =============
> C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -cp . -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))
> java.lang.NullPointerException
>         at java.text.DecimalFormat.parse(DecimalFormat.java:1217)
>         at java.text.NumberFormat.parseObject(NumberFormat.java:243)
>         at test.main(test.java:5)
> ============ IBM VM =============
> C:\tmp\tmp17>C:\harmony\classlib1.5\deploy\jdk\jre\bin\java.exe -Dshowversion=true -cp . test
> Result = null
> ============ DRL VM (as usuall) =============
> C:\tmp\tmp17>C:\harmony\drlvm1.5\build\win_ia32_msvc_debug\deploy\jre\bin\java -Dvm.assert_dialog=false -cp . -showversion test
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r452710, (Oct  4 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> ...VM Crashed!
> Windows reported exception: ACCESS_VIOLATION
> Registers:
>     EAX: 0x00000674, EBX: 0x00421ee8, ECX: 0x0041df80, EDX=0x00000005
>     ESI: 0x0332ff1c, EDI: 0x00000020, ESP: 0x0332ff18, EBP=0x0332ff34
>     EIP: 0x10005d48
> SEH handler: shutdown error...VM Crashed!
> Windows reported exception: ACCESS_VIOLATION
> Registers:
>     EAX: 0x00000000, EBX: 0x7c97e4a0, ECX: 0x02b0b238, EDX=0x00000000
>     ESI: 0x0332f91c, EDI: 0x0332f9dc, ESP: 0x0332f91c, EBP=0x0332f920
>     EIP: 0x005ef603
> SEH handler: too many shutdown errors

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