Added Spring Java Conventions to all of the spring sub-projects and formatted them to meet the guidelines.

This commit is contained in:
Ben Hale
2007-08-13 16:16:51 +00:00
parent 2e4ed776c1
commit 67a05c196d
50 changed files with 119 additions and 139 deletions

View File

@@ -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

View File

@@ -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.");
}