Re: Objects.nonNull()

2011-01-16 Thread mark . reinhold
> Date: Thu, 13 Jan 2011 19:52:27 -0500 > From: brian.go...@oracle.com > Mark Reinhold wrote: >> I'm still troubled by the "check" prefix, though. It implies that the >> named condition will be tested but it doesn't clearly relate the result >> of that test to the method's exception-throwing beha

Re: Objects.nonNull()

2011-01-16 Thread Brian Goetz
I still don't like checkNonNull. It checks whether its argument is non-null, but then what does it do? Throw an exception if it is non-null? Throw an exception if it isn't? Do something else? My aversion to checkNonNull naming pattern comes from experience. Long, long ago in a code base far,

Re: Objects.nonNull()

2011-01-16 Thread Ariel Weisberg
Hi all, As a user the first name that came to mind was expect. Expect doesn't imply a specific error signaling pattern, but it does imply that it is an error if the condition is not as expected. Expect is only one letter less than throwIf, but it doesn't include a capital letter. expectNonNull: I