On 03/12/2013 18:15, Stuart Marks wrote:
Hi all,
Please review this small change to the subSequence() method specs of
CharSequence and String. Essentially this removes the requirement of
returning a "new" character sequence at each call. This brings the
spec in line with String's implementation, which will return 'this' in
appropriate circumstances.
No change is necessary for the other CharSequence implementations.
StringBuilder/Buffer still say "new" and in fact they always return
new String objects. CharBuffer defines its exact sharing behavior.
Segment returns a "new" Segment with a shared character array, which
is (supposedly) immutable.
Looks good and I think is the best solution for this.
-Alan