Package: libsablevm-classlib1-java
Version: 1.1.9-1
Severity: normal

Found this problem while investigating #297665

Boiled the problem down to this:


public class TestMessageFormat
{
    public static void main( String argv[] )
    {
        MessageFormat one = new MessageFormat("{0}{1}", Locale.US );
        Object[] args = {new Long(0), new Long(10)};
        System.out.println( one.format(args) );

        MessageFormat two = new MessageFormat("{0}{1}", Locale.ENGLISH );
        System.out.println( two.format(args) );
    }
}

In running this class, the first .format works, the second give the following 
NullPointerException:

java.lang.NullPointerException
   at java.text.DecimalFormatSymbols.setCurrency (DecimalFormatSymbols.java:404)
   at java.text.DecimalFormatSymbols.DecimalFormatSymbols 
(DecimalFormatSymbols.java:153)
   at java.text.NumberFormat.computeInstance (NumberFormat.java:327)
   at java.text.NumberFormat.getNumberInstance (NumberFormat.java:456)
   at java.text.NumberFormat.getInstance (NumberFormat.java:381)
   at java.text.MessageFormat.formatInternal (MessageFormat.java:449)
   at java.text.MessageFormat.format (MessageFormat.java:406)
   at java.text.MessageFormat.format (MessageFormat.java:521)
   at java.text.Format.format (Format.java:101)
   at TestMessageFormat.main (TestMessageFormat.java:13)
   at java.lang.VirtualMachine.invokeMain (VirtualMachine.java)
   at java.lang.VirtualMachine.main (VirtualMachine.java:108)

I did some investigating, and I'm not sure what the best way to fix
this is. 

-stew

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-1-k7-smp
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libsablevm-classlib1-java depends on:
ii  java-common                   0.22       Base of all Java packages

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to