Summary
-------
Report that the method throws a NullPointerException and specify that the method calls the negate method of target argument.
Problem
-------
The current Javadoc does not indicate that the method explicitly checks for a null target. Also, the method should indicate that the target Predicate's negate method is called to produce the result.
Solution
--------
Update the Javadoc.
Specification
-------------
/**
* Returns a predicate that is the negation of the supplied predicate.
* This is accomplished by returning result of the calling
* {@code target.negate()}.
*
* @param <T> the type of arguments to the specified predicate
* @param target predicate to negate
*
* @return a predicate that negates the results of the supplied
* predicate
*
* @throws NullPointerException if target is null
*
* @since 11
*/
@SuppressWarnings("unchecked")
static <T> Predicate<T> not(Predicate<? super T> target) {
Objects.requireNonNull(target);
return (Predicate<T>)target.negate();
}