mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 04:55:50 +00:00
Update PetValidator.java
Add log code smell test.
This commit is contained in:
parent
36163094bc
commit
511f5f025a
1 changed files with 7 additions and 0 deletions
|
@ -37,6 +37,13 @@ public class PetValidator implements Validator {
|
||||||
public void validate(Object obj, Errors errors) {
|
public void validate(Object obj, Errors errors) {
|
||||||
Pet pet = (Pet) obj;
|
Pet pet = (Pet) obj;
|
||||||
String name = pet.getName();
|
String name = pet.getName();
|
||||||
|
System.out.println("########################");
|
||||||
|
System.out.println("########################");
|
||||||
|
System.out.println("########################");
|
||||||
|
System.out.println("########################");
|
||||||
|
System.out.println("########################");
|
||||||
|
System.out.println("########################");
|
||||||
|
System.out.println("########################");
|
||||||
// name validation
|
// name validation
|
||||||
if (!StringUtils.hasText(name)) {
|
if (!StringUtils.hasText(name)) {
|
||||||
errors.rejectValue("name", REQUIRED, REQUIRED);
|
errors.rejectValue("name", REQUIRED, REQUIRED);
|
||||||
|
|
Loading…
Reference in a new issue