We could also just throw an IllegalArgumentException if it's null.


On Wed, Nov 27, 2013 at 11:51 AM, ajs6f <notifications@github.com> wrote:

> In
> fcrepo-kernel/src/main/java/org/fcrepo/kernel/utils/FedoraTypesUtils.java:
>
> > @@ -142,37 +143,22 @@ public boolean apply(final Node node) {
> >      /**
> >       * Predicate for determining whether this {@link Node} is a Fedora object.
> >       */
> > -    public static Predicate<Node> isFedoraObject = new Predicate<Node>() {
> > -
> > -        @Override
> > -        public boolean apply(final Node node) {
> > -            checkArgument(node != null, "null cannot be a Fedora object!");
>
> Guava has a more precise check: Preconditions.checkNotNull(reference,
> errorMessage).
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/futures/fcrepo4/pull/173/files#r7962572>
> .
>