Class is a raw type. References to generic type Class<T> should be parameterized
I have the following class (from a simple Spring tutorial) public class CarValidator implements Validator { public boolean supports(Class aClass) { return Car.class.equals(aClass); } public void validate(Object obj, Errors errors) { Car car = (Car) obj; ValidationUtils.rejectIfEmptyOrWhitespace(errors, "model", "field.required", "Required field"); ValidationUtils.rejectIfEmptyOrWhitespace(errors, "price", "field.required", "Required field"); if( ! errors.hasFieldErrors("price")) { if (car.getPrice().intValue() == 0) { errors.rejectValue("price", "not_zero", "Can't be free!"); } } } } Where the