Objects.nonNull() (original) (raw)
Ulf Zibis Ulf.Zibis at gmx.de
Fri Jan 14 12:56:21 UTC 2011
- Previous message: Objects.nonNull()
- Next message: Objects.nonNull()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: Objects.nonNull()
- Next message: Objects.nonNull()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]