On 12/15/10 7:09 PM, [email protected] wrote:
Hi Jörn,

I couldn't understand what you mean with "I think its nice to just do it in
a util method instead."
Should I move the method StringUtil.isEmpty to another class?

I mean the approach you chose is good. You can do it like you did
it or, just write length() == null in the places where String.isEmpty
was used. The util method you created can be deprecated later
and replaced with String.isEmpty when we switch to a new Java
version.
I'll throw the NPE if the string is null.

You do not have to throw it, just remove the check. Then
it will be thrown on the call to String.length().

Jörn

Reply via email to