As of JDK 10 var is a restricted local variable type and cannot be used for type declarations (see JEP 286).
var
Suppress false positives by adding the suppression annotation @SuppressWarnings("VarTypeName") to the enclosing element.
@SuppressWarnings("VarTypeName")