Whitespace polishing: leading spaces->tabs; updated eclipse configuration to default to leading tabs for all bundles

This commit is contained in:
Chris Beams
2008-12-18 14:50:25 +00:00
parent 0f521c3bfb
commit 579280d7bf
87 changed files with 4294 additions and 654 deletions

View File

@@ -1,4 +1,4 @@
#Fri Oct 24 15:08:16 EDT 2008
#Thu Dec 18 06:34:20 PST 2008
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
@@ -10,3 +10,259 @@ org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
org.eclipse.jdt.core.formatter.comment.format_header=false
org.eclipse.jdt.core.formatter.comment.format_html=true
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
org.eclipse.jdt.core.formatter.comment.format_source_code=true
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
org.eclipse.jdt.core.formatter.comment.line_length=80
org.eclipse.jdt.core.formatter.compact_else_if=true
org.eclipse.jdt.core.formatter.continuation_indentation=2
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_empty_lines=false
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.insert_new_line_after_annotation_on_local_variable=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not 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
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
org.eclipse.jdt.core.formatter.lineSplit=80
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
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=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

@@ -0,0 +1,4 @@
#Thu Dec 18 06:34:20 PST 2008
eclipse.preferences.version=1
formatter_profile=org.eclipse.jdt.ui.default.eclipse_profile
formatter_settings_version=11

View File

@@ -28,7 +28,7 @@ package org.springframework.context;
* @see org.springframework.context.event.EventPublicationInterceptor
*/
public interface ApplicationEventPublisher {
/**
* Notify all listeners registered with this application of an application
* event. Events may be framework events (such as RequestHandledEvent)

View File

@@ -44,11 +44,11 @@ abstract class AbstractPropertyLoadingBeanDefinitionParser extends AbstractSingl
String[] locations = StringUtils.commaDelimitedListToStringArray(location);
builder.addPropertyValue("locations", locations);
}
String propertiesRef = element.getAttribute("properties-ref");
if (StringUtils.hasLength(propertiesRef)) {
builder.addPropertyReference("properties", propertiesRef);
}
builder.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
String propertiesRef = element.getAttribute("properties-ref");
if (StringUtils.hasLength(propertiesRef)) {
builder.addPropertyReference("properties", propertiesRef);
}
builder.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
}
}
}

View File

@@ -89,7 +89,7 @@ import org.springframework.util.StringUtils;
* @see java.util.ResourceBundle
*/
public class ReloadableResourceBundleMessageSource extends AbstractMessageSource
implements ResourceLoaderAware {
implements ResourceLoaderAware {
private static final String PROPERTIES_SUFFIX = ".properties";

View File

@@ -59,7 +59,7 @@ import org.springframework.util.ClassUtils;
* @see AbstractRemoteSlsbInvokerInterceptor#setRefreshHomeOnConnectFailure
*/
public class SimpleRemoteStatelessSessionProxyFactoryBean extends SimpleRemoteSlsbInvokerInterceptor
implements FactoryBean, BeanClassLoaderAware {
implements FactoryBean, BeanClassLoaderAware {
/** The business interface of the EJB we're proxying */
private Class businessInterface;

View File

@@ -42,8 +42,8 @@ import org.apache.commons.logging.LogFactory;
* @author Rod Johnson
*/
public abstract class AbstractMessageDrivenBean extends AbstractEnterpriseBean
implements MessageDrivenBean {
implements MessageDrivenBean {
/** Logger available to subclasses */
protected final Log logger = LogFactory.getLog(getClass());

View File

@@ -34,7 +34,7 @@ import javax.naming.NamingException;
* @see org.springframework.jdbc.core.JdbcTemplate
*/
public interface JndiCallback<T> {
/**
* Do something with the given JNDI context.
* <p>Implementations don't need to worry about error handling
@@ -43,7 +43,7 @@ public interface JndiCallback<T> {
* @throws NamingException if thrown by JNDI methods
* @return a result object, or <code>null</code>
*/
T doInContext(Context ctx) throws NamingException;
T doInContext(Context ctx) throws NamingException;
}

View File

@@ -25,21 +25,21 @@ import org.springframework.beans.factory.access.BeanFactoryLocator;
*/
public class DefaultLocatorFactoryTests extends TestCase {
/*
* Class to test for BeanFactoryLocator getInstance()
*/
public void testGetInstance() {
BeanFactoryLocator bf = DefaultLocatorFactory.getInstance();
BeanFactoryLocator bf2 = DefaultLocatorFactory.getInstance();
assertTrue(bf.equals(bf2));
}
/*
* Class to test for BeanFactoryLocator getInstance()
*/
public void testGetInstance() {
BeanFactoryLocator bf = DefaultLocatorFactory.getInstance();
BeanFactoryLocator bf2 = DefaultLocatorFactory.getInstance();
assertTrue(bf.equals(bf2));
}
/*
* Class to test for BeanFactoryLocator getInstance(String)
*/
public void testGetInstanceString() {
BeanFactoryLocator bf = DefaultLocatorFactory.getInstance("my-bean-refs.xml");
BeanFactoryLocator bf2 = DefaultLocatorFactory.getInstance("my-bean-refs.xml");
assertTrue(bf.equals(bf2));
}
/*
* Class to test for BeanFactoryLocator getInstance(String)
*/
public void testGetInstanceString() {
BeanFactoryLocator bf = DefaultLocatorFactory.getInstance("my-bean-refs.xml");
BeanFactoryLocator bf2 = DefaultLocatorFactory.getInstance("my-bean-refs.xml");
assertTrue(bf.equals(bf2));
}
}

View File

@@ -26,12 +26,12 @@ import org.springframework.beans.factory.FactoryBean;
public class TestProxyFactoryBean extends AbstractSingletonProxyFactoryBean
implements FactoryBean, BeanFactoryAware {
@Override
protected Object createMainInterceptor() {
return new NoOpAdvice();
}
@Override
protected Object createMainInterceptor() {
return new NoOpAdvice();
}
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
}
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
}
}

View File

@@ -43,15 +43,15 @@ public class LocalSlsbInvokerInterceptorTests {
public void testPerformsLookup() throws Exception {
LocalInterfaceWithBusinessMethods ejb = createMock(LocalInterfaceWithBusinessMethods.class);
replay(ejb);
String jndiName= "foobar";
Context mockContext = mockContext(jndiName, ejb);
configuredInterceptor(mockContext, jndiName);
verify(mockContext);
}
@Test
public void testLookupFailure() throws Exception {
final NamingException nex = new NamingException();
@@ -62,7 +62,7 @@ public class LocalSlsbInvokerInterceptorTests {
throw nex;
}
};
LocalSlsbInvokerInterceptor si = new LocalSlsbInvokerInterceptor();
si.setJndiName("foobar");
// default resourceRef=false should cause this to fail, as java:/comp/env will not
@@ -76,7 +76,7 @@ public class LocalSlsbInvokerInterceptorTests {
assertTrue(ex == nex);
}
}
@Test
public void testInvokesMethodOnEjbInstance() throws Exception {
Object retVal = new Object();
@@ -84,22 +84,22 @@ public class LocalSlsbInvokerInterceptorTests {
expect(ejb.targetMethod()).andReturn(retVal);
ejb.remove();
replay(ejb);
String jndiName= "foobar";
Context mockContext = mockContext(jndiName, ejb);
LocalSlsbInvokerInterceptor si = configuredInterceptor(mockContext, jndiName);
ProxyFactory pf = new ProxyFactory(new Class[] { BusinessMethods.class } );
pf.addAdvice(si);
BusinessMethods target = (BusinessMethods) pf.getProxy();
assertTrue(target.targetMethod() == retVal);
verify(mockContext);
verify(ejb);
}
@Test
public void testInvokesMethodOnEjbInstanceWithSeparateBusinessMethods() throws Exception {
Object retVal = new Object();
@@ -148,7 +148,7 @@ public class LocalSlsbInvokerInterceptorTests {
verify(mockContext);
verify(ejb);
}
@Test
public void testApplicationException() throws Exception {
testException(new ApplicationException());
@@ -160,15 +160,15 @@ public class LocalSlsbInvokerInterceptorTests {
final SlsbHome mockHome = createMock(SlsbHome.class);
expect(mockHome.create()).andReturn((LocalInterface)ejbInstance);
replay(mockHome);
final Context mockCtx = createMock(Context.class);
expect(mockCtx.lookup("java:comp/env/" + jndiName)).andReturn(mockHome);
mockCtx.close();
replay(mockCtx);
return mockCtx;
}
protected LocalSlsbInvokerInterceptor configuredInterceptor(final Context mockCtx, final String jndiName)
throws Exception {
@@ -181,11 +181,11 @@ public class LocalSlsbInvokerInterceptorTests {
si.setJndiName(jndiName);
si.setResourceRef(true);
si.afterPropertiesSet();
return si;
}
/**
* Needed so that we can mock the create() method.
*/
@@ -212,11 +212,11 @@ public class LocalSlsbInvokerInterceptorTests {
@SuppressWarnings("serial")
private class ApplicationException extends Exception {
private class ApplicationException extends Exception {
public ApplicationException() {
super("appException");
}
}
}

View File

@@ -140,7 +140,7 @@ public class SimpleRemoteSlsbInvokerInterceptorTests {
assertTrue(ex == nex);
}
}
@Test
public void testInvokesMethodOnEjbInstance() throws Exception {
doTestInvokesMethodOnEjbInstance(true, true);
@@ -178,7 +178,7 @@ public class SimpleRemoteSlsbInvokerInterceptorTests {
final String jndiName= "foobar";
Context mockContext = mockContext(jndiName, ejb, 2, lookupCount, lookupCount);
SimpleRemoteSlsbInvokerInterceptor si = configuredInterceptor(mockContext, jndiName);
si.setLookupHomeOnStartup(lookupHomeOnStartup);
si.setCacheHome(cacheHome);
@@ -391,7 +391,7 @@ public class SimpleRemoteSlsbInvokerInterceptorTests {
@SuppressWarnings("serial")
protected class ApplicationException extends Exception {
protected class ApplicationException extends Exception {
public ApplicationException() {
super("appException");

View File

@@ -34,22 +34,22 @@ import org.springframework.jmx.export.SpringModelMBean;
*/
public final class ModelMBeanNotificationPublisherTests {
@Test(expected=IllegalArgumentException.class)
@Test(expected=IllegalArgumentException.class)
public void testCtorWithNullMBean() throws Exception {
new ModelMBeanNotificationPublisher(null, createObjectName(), this);
new ModelMBeanNotificationPublisher(null, createObjectName(), this);
}
@Test(expected=IllegalArgumentException.class)
@Test(expected=IllegalArgumentException.class)
public void testCtorWithNullObjectName() throws Exception {
new ModelMBeanNotificationPublisher(new SpringModelMBean(), null, this);
}
@Test(expected=IllegalArgumentException.class)
@Test(expected=IllegalArgumentException.class)
public void testCtorWithNullManagedResource() throws Exception {
new ModelMBeanNotificationPublisher(new SpringModelMBean(), createObjectName(), null);
}
@Test(expected=IllegalArgumentException.class)
@Test(expected=IllegalArgumentException.class)
public void testSendNullNotification() throws Exception {
NotificationPublisher publisher
= new ModelMBeanNotificationPublisher(new SpringModelMBean(), createObjectName(), this);

View File

@@ -35,7 +35,7 @@ import org.springframework.mock.jndi.ExpectedLookupTemplate;
*/
public class JndiObjectFactoryBeanTests {
@Test
@Test
public void testNoJndiName() throws NamingException {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
try {
@@ -45,8 +45,8 @@ public class JndiObjectFactoryBeanTests {
catch (IllegalArgumentException ex) {
}
}
@Test
@Test
public void testLookupWithFullNameAndResourceRefTrue() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
Object o = new Object();
@@ -57,7 +57,7 @@ public class JndiObjectFactoryBeanTests {
assertTrue(jof.getObject() == o);
}
@Test
@Test
public void testLookupWithFullNameAndResourceRefFalse() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
Object o = new Object();
@@ -68,7 +68,7 @@ public class JndiObjectFactoryBeanTests {
assertTrue(jof.getObject() == o);
}
@Test
@Test
public void testLookupWithSchemeNameAndResourceRefTrue() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
Object o = new Object();
@@ -79,7 +79,7 @@ public class JndiObjectFactoryBeanTests {
assertTrue(jof.getObject() == o);
}
@Test
@Test
public void testLookupWithSchemeNameAndResourceRefFalse() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
Object o = new Object();
@@ -90,7 +90,7 @@ public class JndiObjectFactoryBeanTests {
assertTrue(jof.getObject() == o);
}
@Test
@Test
public void testLookupWithShortNameAndResourceRefTrue() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
Object o = new Object();
@@ -101,7 +101,7 @@ public class JndiObjectFactoryBeanTests {
assertTrue(jof.getObject() == o);
}
@Test
@Test
public void testLookupWithShortNameAndResourceRefFalse() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
Object o = new Object();
@@ -117,7 +117,7 @@ public class JndiObjectFactoryBeanTests {
}
}
@Test
@Test
public void testLookupWithArbitraryNameAndResourceRefFalse() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
Object o = new Object();
@@ -128,7 +128,7 @@ public class JndiObjectFactoryBeanTests {
assertTrue(jof.getObject() == o);
}
@Test
@Test
public void testLookupWithExpectedTypeAndMatch() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
String s = "";
@@ -139,7 +139,7 @@ public class JndiObjectFactoryBeanTests {
assertTrue(jof.getObject() == s);
}
@Test
@Test
public void testLookupWithExpectedTypeAndNoMatch() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
Object o = new Object();
@@ -155,7 +155,7 @@ public class JndiObjectFactoryBeanTests {
}
}
@Test
@Test
public void testLookupWithDefaultObject() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
String s = "";
@@ -167,7 +167,7 @@ public class JndiObjectFactoryBeanTests {
assertEquals("myString", jof.getObject());
}
@Test
@Test
public void testLookupWithDefaultObjectAndExpectedType() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
String s = "";
@@ -179,7 +179,7 @@ public class JndiObjectFactoryBeanTests {
assertEquals("myString", jof.getObject());
}
@Test
@Test
public void testLookupWithDefaultObjectAndExpectedTypeNoMatch() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
String s = "";
@@ -196,7 +196,7 @@ public class JndiObjectFactoryBeanTests {
}
}
@Test
@Test
public void testLookupWithProxyInterface() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
TestBean tb = new TestBean();
@@ -211,7 +211,7 @@ public class JndiObjectFactoryBeanTests {
assertEquals(99, tb.getAge());
}
@Test
@Test
public void testLookupWithProxyInterfaceAndDefaultObject() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
TestBean tb = new TestBean();
@@ -228,7 +228,7 @@ public class JndiObjectFactoryBeanTests {
}
}
@Test
@Test
public void testLookupWithProxyInterfaceAndLazyLookup() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
final TestBean tb = new TestBean();
@@ -254,7 +254,7 @@ public class JndiObjectFactoryBeanTests {
assertEquals(99, tb.getAge());
}
@Test
@Test
public void testLookupWithProxyInterfaceWithNotCache() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
final TestBean tb = new TestBean();
@@ -282,7 +282,7 @@ public class JndiObjectFactoryBeanTests {
assertEquals(4, tb.getAge());
}
@Test
@Test
public void testLookupWithProxyInterfaceWithLazyLookupAndNotCache() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
final TestBean tb = new TestBean();
@@ -314,7 +314,7 @@ public class JndiObjectFactoryBeanTests {
assertEquals(4, tb.getAge());
}
@Test
@Test
public void testLazyLookupWithoutProxyInterface() throws NamingException {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
jof.setJndiName("foo");
@@ -328,7 +328,7 @@ public class JndiObjectFactoryBeanTests {
}
}
@Test
@Test
public void testNotCacheWithoutProxyInterface() throws NamingException {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
jof.setJndiName("foo");
@@ -343,7 +343,7 @@ public class JndiObjectFactoryBeanTests {
}
}
@Test
@Test
public void testLookupWithProxyInterfaceAndExpectedTypeAndMatch() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
TestBean tb = new TestBean();
@@ -359,7 +359,7 @@ public class JndiObjectFactoryBeanTests {
assertEquals(99, tb.getAge());
}
@Test
@Test
public void testLookupWithProxyInterfaceAndExpectedTypeAndNoMatch() {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
TestBean tb = new TestBean();
@@ -376,7 +376,7 @@ public class JndiObjectFactoryBeanTests {
}
}
@Test
@Test
public void testLookupWithExposeAccessContext() throws Exception {
JndiObjectFactoryBean jof = new JndiObjectFactoryBean();
TestBean tb = new TestBean();

View File

@@ -27,7 +27,7 @@ import org.junit.Test;
*/
public class JndiTemplateEditorTests {
@Test
@Test
public void testNullIsIllegalArgument() {
try {
new JndiTemplateEditor().setAsText(null);
@@ -37,16 +37,16 @@ public class JndiTemplateEditorTests {
// OK
}
}
@Test
@Test
public void testEmptyStringMeansNullEnvironment() {
JndiTemplateEditor je = new JndiTemplateEditor();
je.setAsText("");
JndiTemplate jt = (JndiTemplate) je.getValue();
assertTrue(jt.getEnvironment() == null);
}
@Test
@Test
public void testCustomEnvironment() {
JndiTemplateEditor je = new JndiTemplateEditor();
// These properties are meaningless for JNDI, but we don't worry about that:

View File

@@ -32,7 +32,7 @@ import org.junit.Test;
*/
public class JndiTemplateTests {
@Test
@Test
public void testLookupSucceeds() throws Exception {
Object o = new Object();
String name = "foo";
@@ -51,8 +51,8 @@ public class JndiTemplateTests {
assertEquals(o, o2);
verify(context);
}
@Test
@Test
public void testLookupFails() throws Exception {
NameNotFoundException ne = new NameNotFoundException();
String name = "foo";
@@ -76,8 +76,8 @@ public class JndiTemplateTests {
}
verify(context);
}
@Test
@Test
public void testLookupReturnsNull() throws Exception {
String name = "foo";
final Context context = createMock(Context.class);
@@ -101,7 +101,7 @@ public class JndiTemplateTests {
verify(context);
}
@Test
@Test
public void testLookupFailsWithTypeMismatch() throws Exception {
Object o = new Object();
String name = "foo";
@@ -126,7 +126,7 @@ public class JndiTemplateTests {
verify(context);
}
@Test
@Test
public void testBind() throws Exception {
Object o = new Object();
String name = "foo";
@@ -134,18 +134,18 @@ public class JndiTemplateTests {
context.bind(name, o);
context.close();
replay(context);
JndiTemplate jt = new JndiTemplate() {
protected Context createInitialContext() {
return context;
}
};
jt.bind(name, o);
verify(context);
}
@Test
@Test
public void testRebind() throws Exception {
Object o = new Object();
String name = "foo";
@@ -164,20 +164,20 @@ public class JndiTemplateTests {
verify(context);
}
@Test
@Test
public void testUnbind() throws Exception {
String name = "something";
final Context context = createMock(Context.class);
context.unbind(name);
context.close();
replay(context);
JndiTemplate jt = new JndiTemplate() {
protected Context createInitialContext() {
return context;
}
};
jt.unbind(name);
verify(context);
}

View File

@@ -46,7 +46,7 @@ import org.springframework.mock.jndi.SimpleNamingContextBuilder;
*/
public class SimpleNamingContextTests {
@Test
@Test
public void testNamingContextBuilder() throws NamingException {
SimpleNamingContextBuilder builder = new SimpleNamingContextBuilder();
InitialContextFactory factory = builder.createInitialContextFactory(null);
@@ -174,12 +174,12 @@ public class SimpleNamingContextTests {
assertTrue("Correct DataSource registered", StubDataSource.class.getName().equals(pairMap.get("myds")));
assertTrue("Correct DataSource registered", StubDataSource.class.getName().equals(pairMap.get("mydsX")));
}
/**
* Demonstrates how emptyActivatedContextBuilder() method can be
* used repeatedly, and how it affects creating a new InitialContext()
*/
@Test
@Test
public void testCreateInitialContext() throws Exception {
SimpleNamingContextBuilder builder = SimpleNamingContextBuilder.emptyActivatedContextBuilder();
String name = "foo";
@@ -198,7 +198,7 @@ public class SimpleNamingContextTests {
catch (NamingException ex) {
// expected
}
// Check the same call will work again, but the context is empty
builder = SimpleNamingContextBuilder.emptyActivatedContextBuilder();
try {
@@ -218,36 +218,36 @@ public class SimpleNamingContextTests {
class StubDataSource implements DataSource {
public Connection getConnection() throws SQLException {
return null;
}
public Connection getConnection() throws SQLException {
return null;
}
public Connection getConnection(String username, String password) throws SQLException {
return null;
}
public Connection getConnection(String username, String password) throws SQLException {
return null;
}
public PrintWriter getLogWriter() throws SQLException {
return null;
}
public PrintWriter getLogWriter() throws SQLException {
return null;
}
public int getLoginTimeout() throws SQLException {
return 0;
}
public int getLoginTimeout() throws SQLException {
return 0;
}
public void setLogWriter(PrintWriter arg0) throws SQLException {
}
public void setLogWriter(PrintWriter arg0) throws SQLException {
public void setLoginTimeout(int arg0) throws SQLException {
}
}
public boolean isWrapperFor(Class<?> arg0) throws SQLException {
return false;
}
public void setLoginTimeout(int arg0) throws SQLException {
}
public boolean isWrapperFor(Class<?> arg0) throws SQLException {
return false;
}
public <T> T unwrap(Class<T> arg0) throws SQLException {
return null;
}
public <T> T unwrap(Class<T> arg0) throws SQLException {
return null;
}
}

View File

@@ -56,7 +56,7 @@ import org.springframework.scripting.support.ScriptFactoryPostProcessor;
*/
public class GroovyScriptFactoryTests {
@Test
@Test
public void testStaticScript() throws Exception {
ApplicationContext ctx = new ClassPathXmlApplicationContext("groovyContext.xml", getClass());
@@ -85,7 +85,7 @@ public class GroovyScriptFactoryTests {
assertTrue(ctx.getBeansOfType(Messenger.class).values().contains(messenger));
}
@Test
@Test
public void testStaticPrototypeScript() throws Exception {
ApplicationContext ctx = new ClassPathXmlApplicationContext("groovyContext.xml", getClass());
ConfigurableMessenger messenger = (ConfigurableMessenger) ctx.getBean("messengerPrototype");
@@ -104,7 +104,7 @@ public class GroovyScriptFactoryTests {
assertEquals("Byebye World!", messenger2.getMessage());
}
@Test
@Test
public void testStaticScriptWithInstance() throws Exception {
ApplicationContext ctx = new ClassPathXmlApplicationContext("groovyContext.xml", getClass());
assertTrue(Arrays.asList(ctx.getBeanNamesForType(Messenger.class)).contains("messengerInstance"));
@@ -118,7 +118,7 @@ public class GroovyScriptFactoryTests {
assertTrue(ctx.getBeansOfType(Messenger.class).values().contains(messenger));
}
@Test
@Test
public void testStaticScriptWithInlineDefinedInstance() throws Exception {
ApplicationContext ctx = new ClassPathXmlApplicationContext("groovyContext.xml", getClass());
assertTrue(Arrays.asList(ctx.getBeanNamesForType(Messenger.class)).contains("messengerInstanceInline"));
@@ -132,7 +132,7 @@ public class GroovyScriptFactoryTests {
assertTrue(ctx.getBeansOfType(Messenger.class).values().contains(messenger));
}
@Test
@Test
public void testNonStaticScript() throws Exception {
ApplicationContext ctx = new ClassPathXmlApplicationContext("groovyRefreshableContext.xml", getClass());
Messenger messenger = (Messenger) ctx.getBean("messenger");
@@ -150,7 +150,7 @@ public class GroovyScriptFactoryTests {
assertEquals("Incorrect refresh count", 2, refreshable.getRefreshCount());
}
@Test
@Test
public void testNonStaticPrototypeScript() throws Exception {
ApplicationContext ctx = new ClassPathXmlApplicationContext("groovyRefreshableContext.xml", getClass());
ConfigurableMessenger messenger = (ConfigurableMessenger) ctx.getBean("messengerPrototype");
@@ -174,7 +174,7 @@ public class GroovyScriptFactoryTests {
assertEquals("Incorrect refresh count", 2, refreshable.getRefreshCount());
}
@Test
@Test
public void testScriptCompilationException() throws Exception {
try {
new ClassPathXmlApplicationContext("org/springframework/scripting/groovy/groovyBrokenContext.xml");
@@ -185,7 +185,7 @@ public class GroovyScriptFactoryTests {
}
}
@Test
@Test
public void testScriptedClassThatDoesNotHaveANoArgCtor() throws Exception {
MockControl mock = MockControl.createControl(ScriptSource.class);
ScriptSource script = (ScriptSource) mock.getMock();
@@ -206,7 +206,7 @@ public class GroovyScriptFactoryTests {
mock.verify();
}
@Test
@Test
public void testScriptedClassThatHasNoPublicNoArgCtor() throws Exception {
MockControl mock = MockControl.createControl(ScriptSource.class);
ScriptSource script = (ScriptSource) mock.getMock();
@@ -227,7 +227,7 @@ public class GroovyScriptFactoryTests {
mock.verify();
}
@Test
@Test
public void testWithTwoClassesDefinedInTheOneGroovyFile_CorrectClassFirst() throws Exception {
ApplicationContext ctx = new ClassPathXmlApplicationContext("twoClassesCorrectOneFirst.xml", getClass());
Messenger messenger = (Messenger) ctx.getBean("messenger");
@@ -238,7 +238,7 @@ public class GroovyScriptFactoryTests {
GroovyObject goo = (GroovyObject) messenger;
}
@Test
@Test
public void testWithTwoClassesDefinedInTheOneGroovyFile_WrongClassFirst() throws Exception {
try {
ApplicationContext ctx = new ClassPathXmlApplicationContext("twoClassesWrongOneFirst.xml", getClass());
@@ -250,7 +250,7 @@ public class GroovyScriptFactoryTests {
}
}
@Test
@Test
public void testCtorWithNullScriptSourceLocator() throws Exception {
try {
new GroovyScriptFactory(null);
@@ -260,7 +260,7 @@ public class GroovyScriptFactoryTests {
}
}
@Test
@Test
public void testCtorWithEmptyScriptSourceLocator() throws Exception {
try {
new GroovyScriptFactory("");
@@ -270,7 +270,7 @@ public class GroovyScriptFactoryTests {
}
}
@Test
@Test
public void testCtorWithWhitespacedScriptSourceLocator() throws Exception {
try {
new GroovyScriptFactory("\n ");
@@ -280,7 +280,7 @@ public class GroovyScriptFactoryTests {
}
}
@Test
@Test
public void testWithInlineScriptWithLeadingWhitespace() throws Exception {
try {
new ClassPathXmlApplicationContext("lwspBadGroovyContext.xml", getClass());
@@ -291,7 +291,7 @@ public class GroovyScriptFactoryTests {
}
}
@Test
@Test
public void testGetScriptedObjectDoesNotChokeOnNullInterfacesBeingPassedIn() throws Exception {
MockControl mock = MockControl.createControl(ScriptSource.class);
ScriptSource scriptSource = (ScriptSource) mock.getMock();
@@ -307,7 +307,7 @@ public class GroovyScriptFactoryTests {
mock.verify();
}
@Test
@Test
public void testGetScriptedObjectDoesChokeOnNullScriptSourceBeingPassedIn() throws Exception {
GroovyScriptFactory factory = new GroovyScriptFactory("a script source locator (doesn't matter here)");
try {
@@ -318,7 +318,7 @@ public class GroovyScriptFactoryTests {
}
}
@Test
@Test
public void testResourceScriptFromTag() throws Exception {
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("groovy-with-xsd.xml", getClass());
Messenger messenger = (Messenger) ctx.getBean("messenger");
@@ -334,7 +334,7 @@ public class GroovyScriptFactoryTests {
assertEquals(-200, countingAspect.getCalls());
}
@Test
@Test
public void testPrototypeScriptFromTag() throws Exception {
ApplicationContext ctx = new ClassPathXmlApplicationContext("groovy-with-xsd.xml", getClass());
ConfigurableMessenger messenger = (ConfigurableMessenger) ctx.getBean("messengerPrototype");
@@ -350,7 +350,7 @@ public class GroovyScriptFactoryTests {
assertEquals("Byebye World!", messenger2.getMessage());
}
@Test
@Test
public void testInlineScriptFromTag() throws Exception {
ApplicationContext ctx = new ClassPathXmlApplicationContext("groovy-with-xsd.xml", getClass());
Calculator calculator = (Calculator) ctx.getBean("calculator");
@@ -358,7 +358,7 @@ public class GroovyScriptFactoryTests {
assertFalse(calculator instanceof Refreshable);
}
@Test
@Test
public void testRefreshableFromTag() throws Exception {
ApplicationContext ctx = new ClassPathXmlApplicationContext("groovy-with-xsd.xml", getClass());
assertTrue(Arrays.asList(ctx.getBeanNamesForType(Messenger.class)).contains("refreshableMessenger"));
@@ -375,7 +375,7 @@ public class GroovyScriptFactoryTests {
assertTrue(ctx.getBeansOfType(Messenger.class).values().contains(messenger));
}
@Test
@Test
public void testAnonymousScriptDetected() throws Exception {
ApplicationContext ctx = new ClassPathXmlApplicationContext("groovy-with-xsd.xml", getClass());
Map beans = ctx.getBeansOfType(Messenger.class);
@@ -386,7 +386,7 @@ public class GroovyScriptFactoryTests {
* Tests the SPR-2098 bug whereby no more than 1 property element could be
* passed to a scripted bean :(
*/
@Test
@Test
public void testCanPassInMoreThanOneProperty() {
ApplicationContext ctx = new ClassPathXmlApplicationContext("groovy-multiple-properties.xml", getClass());
TestBean tb = (TestBean) ctx.getBean("testBean");
@@ -411,26 +411,26 @@ public class GroovyScriptFactoryTests {
}
}
@Test
@Test
public void testMetaClassWithBeans() {
testMetaClass("org/springframework/scripting/groovy/calculators.xml");
}
@Test
@Test
public void testMetaClassWithXsd() {
testMetaClass("org/springframework/scripting/groovy/calculators-with-xsd.xml");
}
private void testMetaClass(final String xmlFile) {
// expect the exception we threw in the custom metaclass to show it got invoked
try {
try {
ApplicationContext ctx =
new ClassPathXmlApplicationContext(xmlFile);
Calculator calc = (Calculator) ctx.getBean("delegatingCalculator");
calc.add(1, 2);
fail("expected IllegalStateException");
} catch (IllegalStateException ex) {
assertEquals("Gotcha", ex.getMessage());
assertEquals("Gotcha", ex.getMessage());
}
}