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

@@ -1,4 +1,4 @@
#Tue Jul 31 15:11:23 EDT 2007
#Mon Aug 13 12:11:13 EDT 2007
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -76,7 +76,7 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
org.eclipse.jdt.core.formatter.indentation.size=4
org.eclipse.jdt.core.formatter.indentation.size=8
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
@@ -256,7 +256,7 @@ org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.jdt.core.formatter.tabulation.char=mixed
org.eclipse.jdt.core.formatter.tabulation.size=8
org.eclipse.jdt.core.formatter.tabulation.char=tab
org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true

View File

@@ -1,9 +1,8 @@
#Tue Jul 31 15:07:56 EDT 2007
#Mon Aug 13 12:11:13 EDT 2007
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_Spring Java Conventions
formatter_settings_version=11
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true

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