Re: [LANG] Null-protection methods

2009-04-09 Thread Stephen Colebourne
Henri Yandell wrote: Is the following worth keeping in Lang? Yes. Its a neat way of managing nulls, and the Java gods are actually pretty opposed to the null suggestions IIUC. Stephen - To unsubscribe, e-mail: dev-unsubscr

Re: [LANG] Null-protection methods

2009-04-09 Thread Sujit Pal
I am guessing methods such as StringUtils.trim() are included? If so, I would like to say that a lot of times we use the StringUtils version over the native String version because the StringUtils one is null-safe. So taking these out would probably hurt users, at least until null-safety (or NoneTyp

Re: [LANG] Null-protection methods

2009-04-09 Thread James Carman
On Thu, Apr 9, 2009 at 4:43 AM, Henri Yandell wrote: > Is the following worth keeping in Lang? > > public Foo someJdkMethod(Object input) { >    if(input == null) { >        handleAccordingly(); >    } >    return input.jdkMethod(); > } > > I feel that we've bloated up with these methods, and is i

[LANG] Null-protection methods

2009-04-09 Thread Henri Yandell
Is the following worth keeping in Lang? public Foo someJdkMethod(Object input) { if(input == null) { handleAccordingly(); } return input.jdkMethod(); } I feel that we've bloated up with these methods, and is it really worth it? I still have lots of if(x != null && x.callFoo())