Request for Review : CR#6924259: Remove String.count/String.offset (original) (raw)
Mike Duigou mike.duigou at oracle.com
Thu May 24 23:11:40 UTC 2012
- Previous message: Request for Review : CR#6924259: Remove String.count/String.offset
- Next message: Request for Review : CR#6924259: Remove String.count/String.offset
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 : EMPTYSTRINGVALUE; 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.
- Previous message: Request for Review : CR#6924259: Remove String.count/String.offset
- Next message: Request for Review : CR#6924259: Remove String.count/String.offset
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]