RE: [classlib] Approval for String patch for HARMONY-719

2006-07-04 Thread Nathan Beyer
-Original Message- From: Geir Magnusson Jr [mailto:[EMAIL PROTECTED] Nathan Beyer wrote: -Original Message- From: Geir Magnusson Jr [mailto:[EMAIL PROTECTED] Nathan Beyer wrote: The concern I would have about this is the scenario where it actually is a

Re: [classlib] Approval for String patch for HARMONY-719

2006-07-03 Thread Tim Ellison
No objection. Regards, Tim Nathan Beyer wrote: http://issues.apache.org/jira/browse/HARMONY-719 This issue identifies a valid bug in java.lang.String and good patch to fix it. Does anyone have any objections to applying this patch or any comments? -Nathan -- Tim Ellison

Re: [classlib] Approval for String patch for HARMONY-719

2006-07-03 Thread Geir Magnusson Jr
Interesting - couldn't you promote this fix as a minor performance improvement as well to knock out would would be a pointless instanceof in the case of ? public boolean contentEquals(CharSequence cs) { if (cs == null) { throw new NPE; } if (cs.length() != count) { return

RE: [classlib] Approval for String patch for HARMONY-719

2006-07-03 Thread Nathan Beyer
The concern I would have about this is the scenario where it actually is a StringBuffer, especially an empty StringBuffer. The point of the instanceof check and delegation to the contentEquals(StringBuffer) is to maintain synchronization guarantees of StringBuffer. If we call the 'length()' before

Re: [classlib] Approval for String patch for HARMONY-719

2006-07-03 Thread Geir Magnusson Jr
Nathan Beyer wrote: The concern I would have about this is the scenario where it actually is a StringBuffer, especially an empty StringBuffer. The point of the instanceof check and delegation to the contentEquals(StringBuffer) is to maintain synchronization guarantees of StringBuffer. If we

RE: [classlib] Approval for String patch for HARMONY-719

2006-07-03 Thread Nathan Beyer
-Original Message- From: Geir Magnusson Jr [mailto:[EMAIL PROTECTED] Nathan Beyer wrote: The concern I would have about this is the scenario where it actually is a StringBuffer, especially an empty StringBuffer. The point of the instanceof check and delegation to the

Re: [classlib] Approval for String patch for HARMONY-719

2006-07-03 Thread Geir Magnusson Jr
Nathan Beyer wrote: -Original Message- From: Geir Magnusson Jr [mailto:[EMAIL PROTECTED] Nathan Beyer wrote: The concern I would have about this is the scenario where it actually is a StringBuffer, especially an empty StringBuffer. The point of the instanceof check and