* sr.po: Update.
[official-gcc.git] / libjava / testsuite / libjava.lang / PR12350.java
blobded8856cf92a0b02d6a872e2314834cf7a77176f
1 public class PR12350
3 static public void main (String[] ignored) throws Throwable
5 StringBuffer b = new StringBuffer ("Good string. More than 16 chars.");
7 // Should cause sharing.
8 String s = b.toString();
10 // Take a char by char unshared copy of s.
11 String t = new String (s.toCharArray());
13 b.substring (0, 4); // BUG: Clears shared flag.
14 b.replace (0, 4, "Bad "); // Modifies shared data.
16 System.out.println (s);
17 assert s.equals (t);