package net.kleinhaneveld.fn.validations;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;

public abstract class Validations {
    public static <T> T notNull(@CheckForNull T item) {
        if (item == null) {
            throw new NullPointerException();
        }
        return item;
    }

    public static <T> T notNull(@CheckForNull T item, @Nonnull String message) {
        if (item == null) {
            throw new NullPointerException(message);
        }
        return item;
    }
}

@@ -389,16 +389,41 @@
  message
+, @Nonnull String... args
 ) %7B%0A    
@@ -489,23 +489,44 @@
 ception(
-message
+String.format(message, args)
 );%0A     

Allow formatting of error message for null check.