I’m a bit curious on the desire to split it out. I’m not hard opposed but
also don’t know that it would save much time or clarify things for most. I
wouldn’t want to say that this is a critical reason for keeping things as
they are, but I’d imagine that your typical dev doesn’t use StringUtils for
abbreviate or getLevenshteinDistance style-features nearly as often as they
do for length and indexOf to avoid onerous unit tests.


On Tue, May 28, 2019 at 7:53 AM Gary Gregory <garydgreg...@gmail.com> wrote:

> Hi All:
>
> Right now we have a giant class called StringUtils. I have code that in my
> own library that has at least one null-safe API that for Strings. For
> example a String.getBytes(String, Charset) that returns a null byte[] if
> the input String is null.
>
> I'd like to propose a new class called NullSafeStrings, that covers all
> String APIs (there aren't that many) for null-safe String input. If some of
> these APIs are already in StringUtils, those would be deprecated and point
> to NullSafeStrings.
>
> Note that I am not using the "Utils" postfix on purpose since I find it
> meaning less and the JRE now uses the plural form for this kind of code;
> see Files and Paths.
>
> Thoughts?
>
> Gary
>

Reply via email to