Am 18.01.2012 21:09, schrieb Joe Darcy:
Hi Roger,
On 01/18/2012 11:21 AM, Roger Riggs wrote:
1. In the new parsing methods, could the String arguments be changed to the
more general
java.lang.CharSequence? For many parsing applications, it could be more
convenient
to pass a CharSequence than to create a new String.
I don't think that would be very helpful in this case. If the methods were changed to take a
CharSequence, the first action I'd write in the method would be to call toString on the argument;
this is necessary to guard against the class of time-of-check-versus-time-of-use problems because
the CharSequence objects can be mutable.
Doesn't this argument make the usage of CharSequence in most other API's
inappropriate at all?
-Ulf