Added Spring Java Conventions to all of the spring sub-projects and formatted them to meet the guidelines.
This commit is contained in:
@@ -54,7 +54,7 @@ public class BirthDateFormAction extends FormAction {
|
||||
*/
|
||||
public Event calculateAge(RequestContext context) throws Exception {
|
||||
// pull the date from the model
|
||||
BirthDate birthDate = (BirthDate)getFormObject(context);
|
||||
BirthDate birthDate = (BirthDate) getFormObject(context);
|
||||
|
||||
// calculate the age (quick & dirty)
|
||||
// in a real application you would delegate to the business layer for
|
||||
|
||||
@@ -28,7 +28,7 @@ public class BirthDateValidator implements Validator {
|
||||
}
|
||||
|
||||
public void validate(Object obj, Errors errors) {
|
||||
BirthDate birthDate = (BirthDate)obj;
|
||||
BirthDate birthDate = (BirthDate) obj;
|
||||
validateBirthdateForm(birthDate, errors);
|
||||
validateCardForm(birthDate, errors);
|
||||
}
|
||||
@@ -44,8 +44,7 @@ public class BirthDateValidator implements Validator {
|
||||
cal.setTime(birthDate.getDate());
|
||||
if (cal.get(Calendar.MONTH) == 11) {
|
||||
errors.reject("tooGoodForCards", "You're born in December--you're too good for a silly card!");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "emailAddress", "noEmail",
|
||||
"Please specify your email address.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user