Fix PetValidator when using the JDBC profile

Steps to reproduce:
Set the web.xml context-param spring.profiles.active to jdbc.
Run app and navigate to Find owners > Find Owner > Betty Davis > Edit
Pet.
Notice the java.lang.IllegalStateException: Invalid target for Validator
[org.springframework.samples.petclinic.web.PetValidator@213eb80d]: Basil
This commit is contained in:
mengelhardt 2015-10-03 21:40:59 -04:00
parent dda105599b
commit 22da88c948

View file

@ -58,7 +58,7 @@ public class PetValidator implements Validator {
*/
@Override
public boolean supports(Class<?> clazz) {
return Pet.class.equals(clazz);
return Pet.class.isAssignableFrom(clazz);
}