[kaffe] classpath + et_EE locale bug was: SimpleDateFormat failure with kaffe/cvs

Marko Kreen marko at l-t.ee
Mon Dec 27 06:18:10 PST 2004


jamvm 1.2.3 got locale support, and now I can reproduce it with
it too, so I guess its classpath bug.

On Thu, Dec 23, 2004 at 12:07:35PM +0200, Marko Kreen wrote:
> Following code works with Kaffe from Debian,
> jamvm1.2.2 + classpath-cvs, but fails with kaffe-cvs:
> 
> -----------
> import java.util.Date;
> import java.text.SimpleDateFormat;
> 
> public class Test2 {
>     public static void main(String [] args) {
>         SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
>         System.out.println(f.format(new Date()));
>     }
> }
> -----------

jamvm-cvs is jamvm 1.2.3 with Classpath CVS.


$ LANG=C kaffe-cvs Test2
2004-12-27 16:14:17

$ LANG=et_EE.iso-8859-1 kaffe-cvs Test2
java.lang.IllegalArgumentException: Illegal pattern character -1
   at java.text.SimpleDateFormat.formatWithAttribute
(SimpleDateFormat.java:539)
   at java.text.SimpleDateFormat.format
(SimpleDateFormat.java:557)
   at java.text.DateFormat.format (DateFormat.java:267)
   at Test2.main (Test2.java:7)

$ LANG=C jamvm-cvs Test2
2004-12-27 16:15:08

$ LANG=et_EE.iso-8859-1 jamvm-cvs Test2
java.lang.IllegalArgumentException: Illegal pattern character -1
   at java.text.SimpleDateFormat.formatWithAttribute
(SimpleDateFormat.java:539)
   at java.text.SimpleDateFormat.format
(SimpleDateFormat.java:557)
   at java.text.DateFormat.format (DateFormat.java:267)
   at Test2.main (Test2.java:7)

-- 
marko





More information about the kaffe mailing list