Sponsoring getting 5015163 "(str) String merge/join that is the inverse of String.split()" into JDK 7
Neal Gafter
neal at gafter.com
Mon Oct 26 17:40:49 UTC 2009
You can hardly add any methods to Object, event static methods, without
breaking compatibility, because they get added to every the overload set if
the name is used for methods in existing code.
On Mon, Oct 26, 2009 at 9:29 AM, David Holmes <David.Holmes at sun.com> wrote:
> Joseph D. Darcy wrote:
>
> Stephen Colebourne wrote:
>>
>>> Joe, would you be prepared to sponsor a Strings class, and see join on
>>> there instead of String?
>>>
>>>
>>
>> No.
>>
>
> +1.
>
> It was necessary to introduce Arrays and Collections for utility methods
> because there was no place else to locate the static methods. But for String
> these should simply be static String methods.
>
> But that also means I'd prefer to see additional static methods in Object,
> rather than the added Objects class.
>
> Personally I think a java.util.Utilities class containing nested static
> classes for Objects, Arrays, Collections, Strings, Maps etc, might have been
> a better way to organize such things. But it's probably too late now as the
> duplication would be very ugly.
>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/core-libs-dev/attachments/20091026/68d5f9cd/attachment.html>
More information about the core-libs-dev
mailing list