On May 24 2012, at 15:56 , Ulf Zibis wrote: > Am 24.05.2012 22:45, schrieb Mike Duigou: >> A patch of the changes to java.lang.String for JDK 8 are >> at<http://cr.openjdk.java.net/~mduigou/6924259/0/webrev/>. The changes for >> JDK 7 have only superficial differences (line offsets in the patch). > Correct Copyright date. > > 157 public String(String original) { > 158 this.value = (original.value.length> 0) > 159 ? original.value > 160 : EMPTY_STRING_VALUE; 145 > 161 } > > Does the last case ever occur?, if you have:
It can occur in cases where original is - a deserialized string - a string from a class file constant pool - the string constant "" - (new StringBuilder()).toString() and other empty string generators.