This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgcj/23183] SimpleDateFormat fails to render '' as single quotes


------- Additional Comments From tromey at gcc dot gnu dot org  2005-08-23 17:02 -------
Here is the complete test case:

import java.text.*;
import java.util.*;

public class pr23183 {
  public static void main(String[] args) {
    SimpleDateFormat sdf = new SimpleDateFormat("''yyyy-MM-dd HH:mm:ss''");
    // Should have quotes around it, but does not.
    System.out.println(sdf.format(new Date()));

    // should produce ' ' 'FOO' ' '
    sdf = new SimpleDateFormat("'' '' '''FOO''' '' ''");
    System.out.println(sdf.format(new Date()));
  }
}


This fails with both gcj 4.1 and classpath cvs head (0.17+)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23183


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]