Am 14.01.2011 10:17, schrieb Alan Bateman:

Along the lines of Rémi's first suggestion, then another possible candidate is 
failIfNull(x).


+1
Yes, this sounds better to me than throwIfNull(x).

The purpose of this method, if I understand right, is to pull out from behind the potential failing to a well defined place in the stacktrace, so more specific it could be named failHereIfNull(x), but I more like the short form.
In 2nd place I like checkForNull(x).

The nonNull(x) is ambiguous, and could be misunderstood as 
transform-to-a-non-null-value.

-Ulf

Reply via email to