This is proper syntax for specifying the generic parameter when calling a static method. If you have the following method...
public T myMethod();
You could call it as MyClass.<String>myMethod()
. In many cases type inference allow for not including the <>
. For example the work work for the above: String myVal = MyClass.myMethod()
.
The javadoc for
Matchers
has the following signature fornotNullValue
public static Matcher notNullValue()
Notice that the is no generic variable <T>
therefore it is not proper to specify one. If it is compiling, I assume it is because the compiler is ignoring it.