ICU-6952 Removed most of conditional compilation sources for old Java versions.
X-SVN-Rev: 26026
This commit is contained in:
parent
78e0e98e34
commit
0c061f5b4c
@ -1,337 +1,337 @@
|
||||
#Wed Apr 22 17:38:50 EDT 2009
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
|
||||
org.eclipse.jdt.core.codeComplete.fieldPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.fieldSuffixes=
|
||||
org.eclipse.jdt.core.codeComplete.localPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.localSuffixes=
|
||||
org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
#Wed May 20 10:35:08 EDT 2009
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
|
||||
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.3
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
|
||||
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
|
||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=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_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||
org.eclipse.jdt.core.formatter.comment.format_source_code=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
|
||||
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_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
|
||||
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||
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_local_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
|
||||
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.formatter.comment.format_header=false
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.comment.line_length=120
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
|
||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation=2
|
||||
org.eclipse.jdt.core.codeComplete.fieldSuffixes=
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.formatter.comment.format_comments=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
|
||||
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
|
||||
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
|
||||
org.eclipse.jdt.core.formatter.comment.format_html=true
|
||||
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_closing_paren_in_enum_constant=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_closing_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||
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_closing_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.3
|
||||
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=20
|
||||
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=false
|
||||
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_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=insert
|
||||
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.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
|
||||
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.compiler.problem.possibleAccidentalBooleanAssignment=warning
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=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.brace_position_for_method_declaration=end_of_line
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=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_comma_in_enum_constant_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=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_new_line_after_annotation_on_member=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_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_before_comma_in_multiple_local_declarations=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=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_new_line_before_finally_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=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_after_opening_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
org.eclipse.jdt.core.codeComplete.fieldPrefixes=
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
|
||||
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=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.alignment_for_enum_constants=0
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
|
||||
org.eclipse.jdt.core.formatter.tabulation.char=space
|
||||
org.eclipse.jdt.core.formatter.tabulation.size=4
|
||||
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
|
||||
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.compact_else_if=true
|
||||
org.eclipse.jdt.core.codeComplete.localPrefixes=
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=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_space_before_closing_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||
org.eclipse.jdt.core.codeComplete.localSuffixes=
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=20
|
||||
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
|
||||
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.indentation.size=4
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
|
||||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
|
||||
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.indent_empty_lines=false
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
|
||||
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
|
||||
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=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_before_opening_paren_in_for=insert
|
||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=warning
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
|
||||
org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
|
||||
org.eclipse.jdt.core.formatter.lineSplit=120
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.3
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
|
||||
org.eclipse.jdt.core.formatter.tabulation.size=4
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=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_closing_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
|
||||
|
@ -1,91 +1,4 @@
|
||||
# Copyright (C) 2007-2009, International Business Machines Corporation and
|
||||
# others. All Rights Reserved.
|
||||
|
||||
## core sources
|
||||
src/com/ibm/icu/impl/ByteBuffer.java
|
||||
src/com/ibm/icu/impl/DateNumberFormat.java
|
||||
src/com/ibm/icu/impl/duration/BasicDurationFormat.java
|
||||
src/com/ibm/icu/impl/ICUResourceBundleImpl.java
|
||||
src/com/ibm/icu/impl/IllegalIcuArgumentException.java
|
||||
src/com/ibm/icu/impl/JavaTimeZone.java
|
||||
src/com/ibm/icu/impl/PatternTokenizer.java
|
||||
src/com/ibm/icu/impl/UnicodeRegex.java
|
||||
src/com/ibm/icu/impl/Utility.java
|
||||
src/com/ibm/icu/lang/UCharacter.java
|
||||
|
||||
src/com/ibm/icu/math/BigDecimal.java
|
||||
|
||||
src/com/ibm/icu/text/Bidi.java
|
||||
src/com/ibm/icu/text/CharsetRecog_sbcs.java
|
||||
src/com/ibm/icu/text/ChineseDateFormat.java
|
||||
src/com/ibm/icu/text/DateFormat.java
|
||||
src/com/ibm/icu/text/DateTimePatternGenerator.java
|
||||
src/com/ibm/icu/text/DecimalFormat.java
|
||||
src/com/ibm/icu/text/DigitList.java
|
||||
src/com/ibm/icu/text/IndexCharacters.java
|
||||
src/com/ibm/icu/text/MessageFormat.java
|
||||
src/com/ibm/icu/text/NumberFormat.java
|
||||
src/com/ibm/icu/text/RuleBasedCollator.java
|
||||
src/com/ibm/icu/text/RuleBasedNumberFormat.java
|
||||
src/com/ibm/icu/text/SimpleDateFormat.java
|
||||
src/com/ibm/icu/text/TransliteratorParser.java
|
||||
src/com/ibm/icu/text/UnicodeSet.java
|
||||
src/com/ibm/icu/text/UTF16.java
|
||||
|
||||
src/com/ibm/icu/util/ByteArrayWrapper.java
|
||||
src/com/ibm/icu/util/UResourceBundle.java
|
||||
|
||||
## test sources
|
||||
src/com/ibm/icu/dev/test/bidi/TestAll.java
|
||||
src/com/ibm/icu/dev/test/bidi/TestCompatibility.java
|
||||
src/com/ibm/icu/dev/test/bigdec/DiagBigDecimal.java
|
||||
src/com/ibm/icu/dev/test/calendar/CalendarRegression.java
|
||||
src/com/ibm/icu/dev/test/calendar/CompatibilityTest.java
|
||||
src/com/ibm/icu/dev/test/charsetdet/TestCharsetDetector.java
|
||||
src/com/ibm/icu/dev/test/cldr/TestCLDRVsICU.java
|
||||
src/com/ibm/icu/dev/test/collator/IndexCharactersTest.java
|
||||
src/com/ibm/icu/dev/test/collator/RandomCollator.java
|
||||
src/com/ibm/icu/dev/test/duration/ICUDurationTest.java
|
||||
src/com/ibm/icu/dev/test/format/BigNumberFormatTest.java
|
||||
src/com/ibm/icu/dev/test/format/DateFormatTest.java
|
||||
src/com/ibm/icu/dev/test/format/IntlTestDecimalFormatAPI.java
|
||||
src/com/ibm/icu/dev/test/format/IntlTestDecimalFormatAPIC.java
|
||||
src/com/ibm/icu/dev/test/format/IntlTestNumberFormatAPI.java
|
||||
src/com/ibm/icu/dev/test/format/NumberFormatRegressionTest.java
|
||||
src/com/ibm/icu/dev/test/format/NumberFormatTest.java
|
||||
src/com/ibm/icu/dev/test/format/NumberRegression.java
|
||||
src/com/ibm/icu/dev/test/format/RbnfTest.java
|
||||
src/com/ibm/icu/dev/test/format/TestMessageFormat.java
|
||||
src/com/ibm/icu/dev/test/ResourceModule.java
|
||||
src/com/ibm/icu/dev/test/serializable/FormatTests.java
|
||||
src/com/ibm/icu/dev/test/serializable/SerializableTest.java
|
||||
src/com/ibm/icu/dev/test/TestAll.java
|
||||
src/com/ibm/icu/dev/test/TestDataModule.java
|
||||
src/com/ibm/icu/dev/test/TestFmwk.java
|
||||
src/com/ibm/icu/dev/test/TestUtil.java
|
||||
src/com/ibm/icu/dev/test/timezone/TimeZoneAliasTest.java
|
||||
src/com/ibm/icu/dev/test/timezone/TimeZoneRegression.java
|
||||
src/com/ibm/icu/dev/test/translit/UnicodeMapTest.java
|
||||
src/com/ibm/icu/dev/test/translit/RegexUtilitiesTest.java
|
||||
src/com/ibm/icu/dev/test/translit/RoundTripTest.java
|
||||
src/com/ibm/icu/dev/test/translit/TestAll.java
|
||||
src/com/ibm/icu/dev/test/util/BagFormatter.java
|
||||
src/com/ibm/icu/dev/test/util/BNF.java
|
||||
src/com/ibm/icu/dev/test/util/CollectionUtilities.java
|
||||
src/com/ibm/icu/dev/test/util/DataInputCompressor.java
|
||||
src/com/ibm/icu/dev/test/util/DataOutputCompressor.java
|
||||
src/com/ibm/icu/dev/test/util/FileUtilities.java
|
||||
src/com/ibm/icu/dev/test/util/ICUPropertyFactory.java
|
||||
src/com/ibm/icu/dev/test/util/ICUResourceBundleTest.java
|
||||
src/com/ibm/icu/dev/test/util/TestBagFormatter.java
|
||||
src/com/ibm/icu/dev/test/util/TestBNF.java
|
||||
src/com/ibm/icu/dev/test/util/TestUtilities.java
|
||||
src/com/ibm/icu/dev/test/util/Tokenizer.java
|
||||
src/com/ibm/icu/dev/test/util/TransliteratorUtilities.java
|
||||
src/com/ibm/icu/dev/test/util/UnicodeMap.java
|
||||
src/com/ibm/icu/dev/test/util/UnicodeProperty.java
|
||||
src/com/ibm/icu/dev/test/util/UtilityTest.java
|
||||
src/com/ibm/icu/dev/test/perf/NormalizerPerformanceTest.java
|
||||
|
||||
## tool sources
|
||||
src/com/ibm/icu/dev/tool/docs/ICUTaglet.java
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
**********************************************************************
|
||||
* Copyright (c) 2006-2009, International Business Machines
|
||||
@ -151,11 +150,7 @@ class ResourceModule implements TestDataModule {
|
||||
isStrResPrepared = true; // toggle the tag
|
||||
return true;
|
||||
} catch (DataModuleFormatError e) {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## throw new RuntimeException(e.getMessage());
|
||||
//#else
|
||||
throw new RuntimeException(e.getMessage(),e);
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
public boolean hasNext() {
|
||||
@ -176,11 +171,7 @@ class ResourceModule implements TestDataModule {
|
||||
return true;
|
||||
} catch (DataModuleFormatError e) {
|
||||
// Sadly, we throw RuntimeException also
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## throw new RuntimeException(e.getMessage());
|
||||
//#else
|
||||
throw new RuntimeException(e.getMessage(),e);
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -247,11 +238,7 @@ class ResourceModule implements TestDataModule {
|
||||
if (Arrays.binarySearch(expResTypes, type) >= 0) {
|
||||
return t;
|
||||
} else {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## throw new DataModuleFormatError("Actual type " + t.getType() + " != expected types " + expResTypes + ".");
|
||||
//#else
|
||||
throw new DataModuleFormatError(new UResourceTypeMismatchException("Actual type " + t.getType() + " != expected types " + expResTypes + "."));
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -276,11 +263,7 @@ class ResourceModule implements TestDataModule {
|
||||
throw new UResourceTypeMismatchException("Only accept ARRAY and STRING types.");
|
||||
}
|
||||
} catch (UResourceTypeMismatchException e){
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## throw new DataModuleFormatError(e.getMessage());
|
||||
//#else
|
||||
throw new DataModuleFormatError(e);
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -41,11 +40,8 @@ public class TestAll extends TestGroup {
|
||||
"com.ibm.icu.dev.test.charsetdet.TestCharsetDetector",
|
||||
"com.ibm.icu.dev.test.bidi.TestAll",
|
||||
"com.ibm.icu.dev.test.duration.TestAll",
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
"com.ibm.icu.dev.test.charset.TestAll",
|
||||
"com.ibm.icu.dev.test.serializable.SerializableTest" // *is* a group
|
||||
//#endif
|
||||
},
|
||||
"All tests in ICU");
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2001-2009, International Business Machines Corporation and *
|
||||
@ -52,15 +51,12 @@ public interface TestDataModule {
|
||||
public DataModuleFormatError(String msg){
|
||||
super(msg);
|
||||
}
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
public DataModuleFormatError(String msg, Throwable cause){
|
||||
super(msg, cause);
|
||||
}
|
||||
public DataModuleFormatError(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -7,11 +6,6 @@
|
||||
*/
|
||||
package com.ibm.icu.dev.test;
|
||||
|
||||
import com.ibm.icu.text.UTF16;
|
||||
import com.ibm.icu.text.DecimalFormat;
|
||||
import com.ibm.icu.text.NumberFormat;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
@ -28,9 +22,13 @@ import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.Random;
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## import com.ibm.icu.impl.Utility;
|
||||
//#endif
|
||||
|
||||
import com.ibm.icu.text.DecimalFormat;
|
||||
import com.ibm.icu.text.NumberFormat;
|
||||
import com.ibm.icu.text.UTF16;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
/**
|
||||
* TestFmwk is a base class for tests that can be run conveniently from the
|
||||
* command line as well as under the Java test harness.
|
||||
@ -64,11 +62,7 @@ public class TestFmwk extends AbstractTestLog {
|
||||
}
|
||||
}
|
||||
protected void handleException(Throwable e){
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## Throwable ex = null;
|
||||
//#else
|
||||
Throwable ex = e.getCause();
|
||||
//#endif
|
||||
if(ex==null){
|
||||
ex = e;
|
||||
}
|
||||
@ -1105,11 +1099,7 @@ public class TestFmwk extends AbstractTestLog {
|
||||
public static TestParams create(String arglist, PrintWriter log) {
|
||||
String[] args = null;
|
||||
if (arglist != null && arglist.length() > 0) {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## args = Utility.split(arglist, '\u0020');
|
||||
//#else
|
||||
args = arglist.split("\\s");
|
||||
//#endif
|
||||
}
|
||||
return create(args, log);
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2001-2009, International Business Machines Corporation and *
|
||||
@ -8,11 +7,11 @@
|
||||
package com.ibm.icu.dev.test;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.File;
|
||||
|
||||
public final class TestUtil {
|
||||
/**
|
||||
@ -63,13 +62,7 @@ public final class TestUtil {
|
||||
} catch (Throwable t) {
|
||||
IOException ex =
|
||||
new IOException("data resource '" + name + "' not found");
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## t.printStackTrace();
|
||||
//#else
|
||||
//initCause API was introduced in JDK 1.4
|
||||
ex.initCause(t);
|
||||
//#endif
|
||||
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2001-2009, International Business Machines
|
||||
@ -32,10 +31,7 @@ public class TestAll extends TestGroup {
|
||||
"com.ibm.icu.dev.test.bidi.TestReorderRunsOnly",
|
||||
"com.ibm.icu.dev.test.bidi.TestStreaming",
|
||||
"com.ibm.icu.dev.test.bidi.TestClassOverride",
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
"com.ibm.icu.dev.test.bidi.TestCompatibility",
|
||||
//#endif
|
||||
},
|
||||
"Bidi tests");
|
||||
}
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2007-2009, International Business Machines
|
||||
@ -10,11 +7,12 @@
|
||||
|
||||
package com.ibm.icu.dev.test.bidi;
|
||||
|
||||
import com.ibm.icu.text.Bidi;
|
||||
import java.text.AttributedString;
|
||||
import java.awt.font.NumericShaper;
|
||||
import java.awt.font.TextAttribute;
|
||||
import java.text.AttributedCharacterIterator;
|
||||
import java.awt.font.NumericShaper;
|
||||
import java.text.AttributedString;
|
||||
|
||||
import com.ibm.icu.text.Bidi;
|
||||
|
||||
/**
|
||||
* Regression test for java.text.Bidi compatibility
|
||||
@ -294,4 +292,3 @@ public class TestCompatibility extends BidiTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2000-2009, International Business Machines Corporation and *
|
||||
@ -6,17 +5,18 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.test.calendar;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
import java.util.MissingResourceException;
|
||||
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
import com.ibm.icu.text.NumberFormat;
|
||||
import com.ibm.icu.text.SimpleDateFormat;
|
||||
@ -823,13 +823,6 @@ public class CalendarRegression extends com.ibm.icu.dev.test.TestFmwk {
|
||||
if (!cal.getTime().equals(epoch))
|
||||
errln("Fail: after clear() expect " + epoch + ", got " + cal.getTime());
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## // This test case does not work well with JRE1.3 with
|
||||
//## // the timezone update for US 2007 rule. Java 1.3 only
|
||||
//## // supports single DST rule for all years. March 15
|
||||
//## // was not in DST before, but with the new rule, it is
|
||||
//## // in DST.
|
||||
//#else
|
||||
cal.setTime(d11);
|
||||
cal.clear( Calendar.MONTH );
|
||||
logln(cal.getTime().toString());
|
||||
@ -837,7 +830,6 @@ public class CalendarRegression extends com.ibm.icu.dev.test.TestFmwk {
|
||||
errln("Fail: " + d11 + " clear(MONTH) => expect " +
|
||||
dM + ", got " + cal.getTime());
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
||||
public void Test4114578() {
|
||||
@ -2139,7 +2131,7 @@ public class CalendarRegression extends com.ibm.icu.dev.test.TestFmwk {
|
||||
}
|
||||
if (!matchPref) {
|
||||
errln("FAIL: Preferred values for locale " + loc
|
||||
+ " got:" + Utility.arrayToString(pref) + " expected:" + Utility.arrayToString(expected));
|
||||
+ " got:" + Arrays.toString(pref) + " expected:" + Arrays.toString(expected));
|
||||
}
|
||||
|
||||
String[] all = Calendar.getKeywordValuesForLocale("calendar", loc, false);
|
||||
@ -2155,7 +2147,7 @@ public class CalendarRegression extends com.ibm.icu.dev.test.TestFmwk {
|
||||
}
|
||||
if (!matchAll) {
|
||||
errln("FAIL: All values for locale " + loc
|
||||
+ " got:" + Utility.arrayToString(all));
|
||||
+ " got:" + Arrays.toString(all));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2000-2009, International Business Machines Corporation and *
|
||||
@ -6,12 +5,21 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.test.calendar;
|
||||
import com.ibm.icu.util.*;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutput;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.io.*;
|
||||
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
import com.ibm.icu.util.Calendar;
|
||||
import com.ibm.icu.util.GregorianCalendar;
|
||||
import com.ibm.icu.util.SimpleTimeZone;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
|
||||
public class CompatibilityTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
|
||||
@ -339,13 +347,6 @@ public class CompatibilityTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
logln(" Got: " + cal.getTime() + " Expected: " + tempcal.getTime());
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## // This test case does not work well with JRE1.3 with
|
||||
//## // the timezone update for US 2007 rule. Java 1.3 only
|
||||
//## // supports single DST rule for all years. April 2, 1985
|
||||
//## // was actually not in DST, but with the new rule, the date
|
||||
//## // is in DST (which is actually wrong).
|
||||
//#else
|
||||
cal.clear();
|
||||
cal.set(1985, 2, 2, 11, 49);
|
||||
tempcal.clear();
|
||||
@ -354,7 +355,6 @@ public class CompatibilityTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
errln("FAIL: Calendar.set(5 args) failed");
|
||||
logln(" Got: " + cal.getTime() + " Expected: " + tempcal.getTime());
|
||||
}
|
||||
//#endif
|
||||
|
||||
cal.clear();
|
||||
cal.set(1995, 9, 12, 1, 39, 55);
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2005-2009, International Business Machines Corporation and *
|
||||
@ -8,16 +7,11 @@
|
||||
package com.ibm.icu.dev.test.charsetdet;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.Reader;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.text.CharsetDetector;
|
||||
import com.ibm.icu.text.CharsetMatch;
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
import java.io.InputStream;
|
||||
import java.io.Reader;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.CharBuffer;
|
||||
import java.nio.charset.CharsetEncoder;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
@ -29,9 +23,9 @@ import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import com.ibm.icu.charset.CharsetProviderICU;
|
||||
import java.nio.charset.CharsetEncoder;
|
||||
import java.nio.CharBuffer;
|
||||
//#endif
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.text.CharsetDetector;
|
||||
import com.ibm.icu.text.CharsetMatch;
|
||||
|
||||
|
||||
/**
|
||||
@ -66,13 +60,9 @@ public class TestCharsetDetector extends TestFmwk
|
||||
throw new Exception();
|
||||
}
|
||||
catch (Exception e) {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## msg = "Test failure " + e.getMessage() ;
|
||||
//#else
|
||||
StackTraceElement failPoint = e.getStackTrace()[1];
|
||||
msg = "Test failure in file " + failPoint.getFileName() +
|
||||
" at line " + failPoint.getLineNumber();
|
||||
//#endif
|
||||
}
|
||||
errln(msg);
|
||||
}
|
||||
@ -299,8 +289,6 @@ public class TestCharsetDetector extends TestFmwk
|
||||
}
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
public void TestDetection()
|
||||
{
|
||||
//
|
||||
@ -516,7 +504,6 @@ public class TestCharsetDetector extends TestFmwk
|
||||
CharsetMatch m = det.detect();
|
||||
return m;
|
||||
}
|
||||
//#endif
|
||||
|
||||
public void TestHebrew() throws Exception {
|
||||
String s = "\u05D4\u05E4\u05E8\u05E7\u05DC\u05D9\u05D8 \u05D4\u05E6\u05D1\u05D0\u05D9 \u05D4" +
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
**********************************************************************
|
||||
* Copyright (c) 2002-2009, International Business Machines
|
||||
@ -12,9 +9,6 @@
|
||||
package com.ibm.icu.dev.test.cldr;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
//import org.unicode.cldr.util.LanguageTagParser;
|
||||
//import org.unicode.cldr.util.Utility;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
@ -23,11 +17,11 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.TreeSet;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
@ -35,17 +29,11 @@ import java.util.regex.Pattern;
|
||||
import javax.xml.parsers.SAXParser;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
|
||||
//import org.unicode.cldr.test.CLDRTest;
|
||||
//import org.unicode.cldr.tool.GenerateCldrTests;
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
|
||||
import com.ibm.icu.util.Currency;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
|
||||
import com.ibm.icu.text.Collator;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
import com.ibm.icu.text.NumberFormat;
|
||||
@ -53,6 +41,9 @@ import com.ibm.icu.text.SimpleDateFormat;
|
||||
import com.ibm.icu.text.Transliterator;
|
||||
import com.ibm.icu.text.UTF16;
|
||||
import com.ibm.icu.text.UnicodeSet;
|
||||
import com.ibm.icu.util.Currency;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
/**
|
||||
* This is a file that runs the CLDR tests for ICU4J, to verify that ICU4J implements them
|
||||
@ -549,4 +540,3 @@ public class TestCLDRVsICU extends TestFmwk {
|
||||
|
||||
};
|
||||
}
|
||||
//#endif
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
package com.ibm.icu.dev.test.collator;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@ -17,7 +18,6 @@ import java.util.MissingResourceException;
|
||||
import java.util.Set;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.text.Collator;
|
||||
import com.ibm.icu.text.Collator.CollatorFactory;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
@ -479,7 +479,7 @@ public class CollationServiceTest extends TestFmwk {
|
||||
}
|
||||
if (!matchPref) {
|
||||
errln("FAIL: Preferred values for locale " + loc
|
||||
+ " got:" + Utility.arrayToString(pref) + " expected:" + Utility.arrayToString(expected));
|
||||
+ " got:" + Arrays.toString(pref) + " expected:" + Arrays.toString(expected));
|
||||
}
|
||||
|
||||
String[] all = Collator.getKeywordValuesForLocale("collation", loc, true);
|
||||
@ -505,7 +505,7 @@ public class CollationServiceTest extends TestFmwk {
|
||||
}
|
||||
if (!matchAll) {
|
||||
errln("FAIL: All values for locale " + loc
|
||||
+ " got:" + Utility.arrayToString(all) + " expected:" + Utility.arrayToString(pref));
|
||||
+ " got:" + Arrays.toString(all) + " expected:" + Arrays.toString(pref));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008-2009, International Business Machines Corporation and *
|
||||
@ -81,4 +78,3 @@ public class IndexCharactersTest extends TestFmwk {
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2002-2009, International Business Machines Corporation and *
|
||||
@ -9,22 +6,20 @@
|
||||
*/
|
||||
package com.ibm.icu.dev.test.collator;
|
||||
|
||||
|
||||
import com.ibm.icu.text.Collator;
|
||||
import com.ibm.icu.text.RuleBasedCollator;
|
||||
import com.ibm.icu.text.UnicodeSet;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.util.BNF;
|
||||
import com.ibm.icu.dev.test.util.BagFormatter;
|
||||
import com.ibm.icu.dev.test.util.Quoter;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.text.ParseException;
|
||||
import java.util.Random;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.util.BNF;
|
||||
import com.ibm.icu.dev.test.util.BagFormatter;
|
||||
import com.ibm.icu.dev.test.util.Quoter;
|
||||
import com.ibm.icu.text.Collator;
|
||||
import com.ibm.icu.text.RuleBasedCollator;
|
||||
import com.ibm.icu.text.UnicodeSet;
|
||||
|
||||
public class RandomCollator extends TestFmwk {
|
||||
public static void main(String[] args) throws Exception {
|
||||
new RandomCollator().run(args);
|
||||
@ -292,5 +287,3 @@ public class RandomCollator extends TestFmwk {
|
||||
};
|
||||
*/
|
||||
}
|
||||
//#endif
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2007-2009, International Business Machines Corporation and *
|
||||
@ -10,12 +9,9 @@ package com.ibm.icu.dev.test.duration;
|
||||
import java.util.Date;
|
||||
import java.util.MissingResourceException;
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13) || defined(J2SE14)
|
||||
//#else
|
||||
import javax.xml.datatype.DatatypeConfigurationException;
|
||||
import javax.xml.datatype.DatatypeFactory;
|
||||
import javax.xml.datatype.Duration;
|
||||
//#endif
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.text.DurationFormat;
|
||||
@ -86,8 +82,6 @@ public class ICUDurationTest extends TestFmwk {
|
||||
}
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13) || defined(J2SE14)
|
||||
//#else
|
||||
public void TestSimpleXMLDuration() {
|
||||
DatatypeFactory factory = null;
|
||||
try {
|
||||
@ -202,7 +196,6 @@ public class ICUDurationTest extends TestFmwk {
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
|
||||
public void TestBadObjectError() {
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -7,11 +6,14 @@
|
||||
*/
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import java.text.ParseException;
|
||||
import java.util.*;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.text.DecimalFormat;
|
||||
import com.ibm.icu.text.DecimalFormatSymbols;
|
||||
import com.ibm.icu.text.NumberFormat;
|
||||
|
||||
/**
|
||||
* @test
|
||||
@ -417,8 +419,6 @@ public class BigNumberFormatTest extends TestFmwk {
|
||||
}
|
||||
}
|
||||
}
|
||||
//#if defined(FOUNDATION10)
|
||||
//#else
|
||||
public void TestBigDecimalRounding() {
|
||||
// jb 3657
|
||||
java.text.DecimalFormat jdkFormat=new java.text.DecimalFormat("###,###,###,##0");
|
||||
@ -447,5 +447,4 @@ public class BigNumberFormatTest extends TestFmwk {
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2001-2009, International Business Machines Corporation and *
|
||||
@ -313,8 +312,6 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
|
||||
assertTrue("data size", EXPECTED.length == COUNT * DateFormat.FIELD_COUNT);
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
final DateFormat.Field[] DTFMT_FIELDS = {
|
||||
DateFormat.Field.AM_PM,
|
||||
DateFormat.Field.DAY_OF_MONTH,
|
||||
@ -371,7 +368,6 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
"0034", "August", "3rd quarter", "0012", "Pacific Daylight Time",
|
||||
"0002", "0033", "1997", "1997"},
|
||||
};
|
||||
//#endif
|
||||
|
||||
TimeZone PT = TimeZone.getTimeZone("America/Los_Angeles");
|
||||
for (j = 0, exp = 0; j < COUNT; ++j) {
|
||||
@ -399,8 +395,6 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
EXPECTED[exp], field);
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
// FieldPostion initialized by DateFormat.Field trac#6089
|
||||
for(i = 0; i < DTFMT_FIELDS.length; i++) {
|
||||
// The format method only set position for the first occurrence of
|
||||
@ -411,7 +405,6 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
field = buf.substring(pos.getBeginIndex(), pos.getEndIndex());
|
||||
assertEquals("pattern#" + j + " " + DTFMT_FIELDS[i].toString(), EXPECTED_BY_FIELD[j][i], field);
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
/**
|
||||
@ -419,8 +412,6 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
*/
|
||||
static final String PATTERN_CHARS = "GyMdkHmsSEDFwWahKzYeugAZvcLQqV";
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/**
|
||||
* A list of the DateFormat.Field.
|
||||
* This MUST be kept in sync with PATTERN_CHARS above.
|
||||
@ -457,7 +448,6 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
DateFormat.Field.QUARTER, // q
|
||||
DateFormat.Field.TIME_ZONE, // V
|
||||
};
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* A list of the names of all the fields in DateFormat.
|
||||
@ -3159,8 +3149,6 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
}
|
||||
*/
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
* Test case for formatToCharacterIterator
|
||||
*/
|
||||
@ -3349,7 +3337,6 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
/*
|
||||
* Test for checking SimpleDateFormat/DateFormatSymbols creation
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*****************************************************************************************
|
||||
*
|
||||
* Copyright (C) 1996-2009, International Business Machines
|
||||
@ -17,15 +16,17 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.text.*;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.Format;
|
||||
import java.text.ParseException;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.ibm.icu.math.BigDecimal;
|
||||
import com.ibm.icu.math.MathContext;
|
||||
import java.util.Locale;
|
||||
import java.text.ParsePosition;
|
||||
import java.text.Format;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParseException;
|
||||
import com.ibm.icu.text.DecimalFormat;
|
||||
import com.ibm.icu.text.DecimalFormatSymbols;
|
||||
import com.ibm.icu.text.NumberFormat;
|
||||
|
||||
public class IntlTestDecimalFormatAPI extends com.ibm.icu.dev.test.TestFmwk
|
||||
{
|
||||
@ -269,8 +270,6 @@ public class IntlTestDecimalFormatAPI extends com.ibm.icu.dev.test.TestFmwk
|
||||
}
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
public void testJB6134()
|
||||
{
|
||||
DecimalFormat decfmt = new DecimalFormat();
|
||||
@ -289,7 +288,6 @@ public class IntlTestDecimalFormatAPI extends com.ibm.icu.dev.test.TestFmwk
|
||||
" / fposByField: " + fposByField.getEndIndex());
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
public void testJB4971()
|
||||
{
|
||||
@ -319,9 +317,6 @@ public class IntlTestDecimalFormatAPI extends com.ibm.icu.dev.test.TestFmwk
|
||||
" / expected: " + comp2.toString());
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13) || defined(J2SE14)
|
||||
//#else
|
||||
|
||||
java.math.MathContext result;
|
||||
|
||||
java.math.MathContext comp3 = new java.math.MathContext(3, java.math.RoundingMode.DOWN);
|
||||
@ -334,8 +329,6 @@ public class IntlTestDecimalFormatAPI extends com.ibm.icu.dev.test.TestFmwk
|
||||
" / expected: " + comp3.toString());
|
||||
}
|
||||
|
||||
//#endif
|
||||
|
||||
}
|
||||
|
||||
public void testJB6354()
|
||||
@ -343,20 +336,12 @@ public class IntlTestDecimalFormatAPI extends com.ibm.icu.dev.test.TestFmwk
|
||||
DecimalFormat pat = new DecimalFormat("#,##0.00");
|
||||
|
||||
// get default rounding increment
|
||||
//#if defined(FOUNDATION10)
|
||||
//## com.ibm.icu.math.BigDecimal r1 = pat.getRoundingIncrement();
|
||||
//#else
|
||||
java.math.BigDecimal r1 = pat.getRoundingIncrement();
|
||||
//#endif
|
||||
|
||||
// set rounding mode with zero increment. Rounding
|
||||
// increment should be set by this operation
|
||||
pat.setRoundingMode(BigDecimal.ROUND_UP);
|
||||
//#if defined(FOUNDATION10)
|
||||
//## com.ibm.icu.math.BigDecimal r2 = pat.getRoundingIncrement();
|
||||
//#else
|
||||
java.math.BigDecimal r2 = pat.getRoundingIncrement();
|
||||
//#endif
|
||||
|
||||
// check for different values
|
||||
if ((r1 != null) && (r2 != null))
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2001-2009, International Business Machines Corporation and *
|
||||
@ -276,8 +275,6 @@ public class IntlTestDecimalFormatAPIC extends com.ibm.icu.dev.test.TestFmwk {
|
||||
}
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
public void testFormatToCharacterIterator() {
|
||||
|
||||
Number number = new Double(350.76);
|
||||
@ -502,7 +499,6 @@ public class IntlTestDecimalFormatAPIC extends com.ibm.icu.dev.test.TestFmwk {
|
||||
&& attribute == fc.attribute && value.equals(fc.value));
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
/*Helper functions */
|
||||
public void verify(String message, String got, double expected) {
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*****************************************************************************************
|
||||
*
|
||||
* Copyright (C) 1996-2009, International Business Machines
|
||||
@ -16,15 +15,14 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParsePosition;
|
||||
import java.text.ParseException;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.ibm.icu.text.NumberFormat;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
public class IntlTestNumberFormatAPI extends com.ibm.icu.dev.test.TestFmwk
|
||||
{
|
||||
@ -219,10 +217,7 @@ public class IntlTestNumberFormatAPI extends com.ibm.icu.dev.test.TestFmwk
|
||||
public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {return null;}
|
||||
public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {return null;}
|
||||
public StringBuffer format(BigInteger number, StringBuffer toAppendTo, FieldPosition pos) {return null;}
|
||||
//#if defined(FOUNDATION10)
|
||||
//#else
|
||||
public StringBuffer format(java.math.BigDecimal number, StringBuffer toAppendTo, FieldPosition pos) {return null;}
|
||||
//#endif
|
||||
public StringBuffer format(com.ibm.icu.math.BigDecimal number, StringBuffer toAppendTo, FieldPosition pos) {return null;}
|
||||
public Number parse(String text, ParsePosition parsePosition) {return null;}
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2001-2009, International Business Machines Corporation and *
|
||||
@ -13,12 +12,19 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.*;
|
||||
import java.util.Locale;
|
||||
import java.util.Date;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.text.ParseException;
|
||||
import java.io.*;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
import com.ibm.icu.text.DecimalFormat;
|
||||
import com.ibm.icu.text.DecimalFormatSymbols;
|
||||
import com.ibm.icu.text.NumberFormat;
|
||||
import com.ibm.icu.util.Calendar;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
/**
|
||||
* Performs regression test for MessageFormat
|
||||
@ -161,8 +167,6 @@ public class NumberFormatRegressionTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
|
||||
//Test New serialized DecimalFormat(2.0) read old serialized forms of DecimalFormat(1.3.1.1)
|
||||
public void TestSerialization() throws IOException{
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
byte[][] contents = NumberFormatSerialTestData.getContent();
|
||||
double data = 1234.56;
|
||||
String[] expected = {
|
||||
@ -181,7 +185,6 @@ public class NumberFormatRegressionTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
warnln("FAIL: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2001-2009, International Business Machines Corporation and *
|
||||
@ -13,23 +12,27 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import com.ibm.icu.dev.test.TestUtil;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.text.NumberFormat.*;
|
||||
import com.ibm.icu.util.*;
|
||||
import com.ibm.icu.impl.LocaleUtility;
|
||||
import com.ibm.icu.impl.data.ResourceReader;
|
||||
import com.ibm.icu.impl.data.TokenIterator;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.math.BigDecimal;
|
||||
|
||||
import java.lang.Double;
|
||||
import java.math.BigInteger;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParsePosition;
|
||||
import java.text.ParseException;
|
||||
import java.util.Locale;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.ibm.icu.dev.test.TestUtil;
|
||||
import com.ibm.icu.impl.LocaleUtility;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.impl.data.ResourceReader;
|
||||
import com.ibm.icu.impl.data.TokenIterator;
|
||||
import com.ibm.icu.math.BigDecimal;
|
||||
import com.ibm.icu.text.DecimalFormat;
|
||||
import com.ibm.icu.text.DecimalFormatSymbols;
|
||||
import com.ibm.icu.text.MeasureFormat;
|
||||
import com.ibm.icu.text.NumberFormat;
|
||||
import com.ibm.icu.text.NumberFormat.SimpleNumberFormatFactory;
|
||||
import com.ibm.icu.util.Currency;
|
||||
import com.ibm.icu.util.CurrencyAmount;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
public class NumberFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
|
||||
@ -307,9 +310,9 @@ public class NumberFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
for (int j=1; j<=3; ++j) {
|
||||
// j represents the number of currency sign in the pattern.
|
||||
if (j == 2) {
|
||||
pat = Utility.replaceAll(pat, "\u00A4", doubleCurrencyStr);
|
||||
pat = pat.replaceAll("\u00A4", doubleCurrencyStr);
|
||||
} else if (j == 3) {
|
||||
pat = Utility.replaceAll(pat, "\u00A4\u00A4", tripleCurrencyStr);
|
||||
pat = pat.replaceAll("\u00A4\u00A4", tripleCurrencyStr);
|
||||
}
|
||||
DecimalFormat fmt = new DecimalFormat(pat, sym);
|
||||
String s = ((NumberFormat) fmt).format(numberToBeFormat);
|
||||
@ -1151,11 +1154,7 @@ public class NumberFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
expect2(df, 2.0, "2.00 *&' \u20a8 '&*");
|
||||
expect2(df, -1.0, "-1.00 *&' \u20a8 '&*");
|
||||
|
||||
//#if defined(FOUNDATION10)
|
||||
//## com.ibm.icu.math.BigDecimal r = df.getRoundingIncrement();
|
||||
//#else
|
||||
java.math.BigDecimal r = df.getRoundingIncrement();
|
||||
//#endif
|
||||
if (r != null) {
|
||||
errln("FAIL: rounding = " + r + ", expect null");
|
||||
}
|
||||
@ -1588,11 +1587,7 @@ public class NumberFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
}
|
||||
}
|
||||
} catch (java.io.IOException e) {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## throw new RuntimeException(e.getMessage());
|
||||
//#else
|
||||
throw new RuntimeException(e);
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -1620,11 +1615,7 @@ public class NumberFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
}
|
||||
|
||||
void checkRounding(DecimalFormat nf, BigDecimal base, int iterations, BigDecimal increment) {
|
||||
//#if defined(FOUNDATION10)
|
||||
//## nf.setRoundingIncrement(increment);
|
||||
//#else
|
||||
nf.setRoundingIncrement(increment.toBigDecimal());
|
||||
//#endif
|
||||
BigDecimal lastParsed = new BigDecimal(Integer.MIN_VALUE); // used to make sure that rounding is monotonic
|
||||
for (int i = -iterations; i <= iterations; ++i) {
|
||||
BigDecimal iValue = base.add(increment.multiply(new BigDecimal(i)).movePointLeft(1));
|
||||
@ -1671,10 +1662,7 @@ public class NumberFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
static BigDecimal toBigDecimal(Number number) {
|
||||
return number instanceof BigDecimal ? (BigDecimal) number
|
||||
: number instanceof BigInteger ? new BigDecimal((BigInteger)number)
|
||||
//#if defined(FOUNDATION10)
|
||||
//#else
|
||||
: number instanceof java.math.BigDecimal ? new BigDecimal((java.math.BigDecimal)number)
|
||||
//#endif
|
||||
: number instanceof Double ? new BigDecimal(number.doubleValue())
|
||||
: number instanceof Float ? new BigDecimal(number.floatValue())
|
||||
: new BigDecimal(number.longValue());
|
||||
@ -2165,12 +2153,9 @@ public class NumberFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
||||
|
||||
expect2(df, BigDecimal.valueOf(Long.MAX_VALUE), BigDecimal.valueOf(Long.MAX_VALUE).negate().toString());
|
||||
expect2(df, BigDecimal.valueOf(Long.MIN_VALUE), BigDecimal.valueOf(Long.MIN_VALUE).negate().toString());
|
||||
|
||||
//#if defined(FOUNDATION10)
|
||||
//#else
|
||||
|
||||
expect2(df, java.math.BigDecimal.valueOf(Long.MAX_VALUE), java.math.BigDecimal.valueOf(Long.MAX_VALUE).negate().toString());
|
||||
expect2(df, java.math.BigDecimal.valueOf(Long.MIN_VALUE), java.math.BigDecimal.valueOf(Long.MIN_VALUE).negate().toString());
|
||||
//#endif
|
||||
}
|
||||
|
||||
public void TestJB5358() {
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*****************************************************************************************
|
||||
*
|
||||
* Copyright (C) 1996-2009, International Business Machines
|
||||
@ -24,12 +23,13 @@
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
//import com.ibm.icu.impl.ICULocaleData;
|
||||
import com.ibm.icu.impl.ICUResourceBundle;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.*;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InvalidObjectException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParseException;
|
||||
@ -37,6 +37,16 @@ import java.text.ParsePosition;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.ibm.icu.impl.ICUResourceBundle;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
import com.ibm.icu.text.DecimalFormat;
|
||||
import com.ibm.icu.text.DecimalFormatSymbols;
|
||||
import com.ibm.icu.text.NumberFormat;
|
||||
import com.ibm.icu.util.GregorianCalendar;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.util.UResourceBundle;
|
||||
import com.ibm.icu.util.VersionInfo;
|
||||
|
||||
public class NumberRegression extends com.ibm.icu.dev.test.TestFmwk {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
@ -1107,8 +1117,6 @@ public class NumberRegression extends com.ibm.icu.dev.test.TestFmwk {
|
||||
}
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10)
|
||||
//#else
|
||||
/**
|
||||
* BigDecimal numbers get their fractions truncated by NumberFormat.
|
||||
*/
|
||||
@ -1124,7 +1132,6 @@ public class NumberRegression extends com.ibm.icu.dev.test.TestFmwk {
|
||||
//e.printStackTrace();
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* DecimalFormat toPattern() doesn't quote special characters or handle
|
||||
@ -1845,12 +1852,9 @@ class MyNumberFormatTest extends NumberFormat {
|
||||
public Number parse(String text, ParsePosition parsePosition) {
|
||||
return new Integer(0);
|
||||
}
|
||||
//#if defined(FOUNDATION10)
|
||||
//#else
|
||||
public StringBuffer format(java.math.BigDecimal number, StringBuffer toAppendTo, FieldPosition pos) {
|
||||
return new StringBuffer("");
|
||||
}
|
||||
//#endif
|
||||
public StringBuffer format(BigInteger number, StringBuffer toAppendTo, FieldPosition pos) {
|
||||
return new StringBuffer("");
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -719,13 +718,10 @@ public class RbnfTest extends TestFmwk {
|
||||
fmt.format(bigI, buf, null);
|
||||
logln("big int: " + buf.toString());
|
||||
|
||||
//#if defined(FOUNDATION10)
|
||||
//#else
|
||||
buf.setLength(0);
|
||||
java.math.BigDecimal bigD = new java.math.BigDecimal(bigI);
|
||||
fmt.format(bigD, buf, null);
|
||||
logln("big dec: " + buf.toString());
|
||||
//#endif
|
||||
}
|
||||
|
||||
public void TestTrailingSemicolon() {
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
**********************************************************************
|
||||
* Copyright (c) 2004-2009, International Business Machines
|
||||
@ -19,9 +18,9 @@ import java.text.Format;
|
||||
import java.text.ParseException;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Locale;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@ -1354,8 +1353,6 @@ public class TestMessageFormat extends com.ibm.icu.dev.test.TestFmwk {
|
||||
assertEquals("Date", dateFormat, ms.getFormatByArgumentName("date"));
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
// Test case for formatToCharacterIterator
|
||||
public void TestFormatToCharacterIterator() {
|
||||
MessageFormat[] msgfmts = {
|
||||
@ -1489,5 +1486,4 @@ public class TestMessageFormat extends com.ibm.icu.dev.test.TestFmwk {
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
//##header
|
||||
//##header J2SE15
|
||||
/*
|
||||
**********************************************************************
|
||||
* Copyright (c) 2002-2009, International Business Machines *
|
||||
@ -693,14 +693,14 @@ public class NormalizerPerformanceTest extends PerfTest {
|
||||
*/
|
||||
|
||||
void normalizerTest(String line, boolean compose) {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13) || defined(J2SE14) || defined(J2SE15)
|
||||
//## sun.text.Normalizer.normalize(line, compose
|
||||
//## ? sun.text.Normalizer.COMPOSE
|
||||
//## : sun.text.Normalizer.DECOMP, 0);
|
||||
//#if defined(J2SE15)
|
||||
sun.text.Normalizer.normalize(line, compose
|
||||
? sun.text.Normalizer.COMPOSE
|
||||
: sun.text.Normalizer.DECOMP, 0);
|
||||
//#else
|
||||
java.text.Normalizer.normalize(line, compose
|
||||
? java.text.Normalizer.Form.NFC
|
||||
: java.text.Normalizer.Form.NFD);
|
||||
//## java.text.Normalizer.normalize(line, compose
|
||||
//## ? java.text.Normalizer.Form.NFC
|
||||
//## : java.text.Normalizer.Form.NFD);
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -17,12 +16,12 @@ import java.util.Locale;
|
||||
import com.ibm.icu.impl.DateNumberFormat;
|
||||
import com.ibm.icu.text.ChineseDateFormat;
|
||||
import com.ibm.icu.text.ChineseDateFormatSymbols;
|
||||
import com.ibm.icu.text.CurrencyPluralInfo;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
import com.ibm.icu.text.DateFormatSymbols;
|
||||
import com.ibm.icu.text.DateIntervalFormat;
|
||||
import com.ibm.icu.text.DateIntervalInfo;
|
||||
import com.ibm.icu.text.DecimalFormat;
|
||||
import com.ibm.icu.text.CurrencyPluralInfo;
|
||||
import com.ibm.icu.text.DecimalFormatSymbols;
|
||||
import com.ibm.icu.text.DurationFormat;
|
||||
import com.ibm.icu.text.MessageFormat;
|
||||
@ -1101,8 +1100,6 @@ public class FormatTests
|
||||
|
||||
formats[i] = getCannedDecimalFormat("#,##0.###", uloc);
|
||||
}
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
if (formats[0] != null) {
|
||||
// Ticket#6449
|
||||
// Once formatToCharacterIterator is called, NumberFormat.Field
|
||||
@ -1115,7 +1112,6 @@ public class FormatTests
|
||||
AttributedCharacterIterator aci = formats[0].formatToCharacterIterator(new Double(12.345D));
|
||||
if (aci == null) {} // NOP - for resolving 'Unused local variable' warning.
|
||||
}
|
||||
//#endif
|
||||
return formats;
|
||||
}
|
||||
}
|
||||
@ -1729,8 +1725,6 @@ public class FormatTests
|
||||
}
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
public static class MessageFormatFieldHandler implements SerializableTest.Handler
|
||||
{
|
||||
public Object[] getTestObjects()
|
||||
@ -1743,7 +1737,6 @@ public class FormatTests
|
||||
return (a == b);
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
public static class DateFormatHandler implements SerializableTest.Handler
|
||||
{
|
||||
@ -1829,8 +1822,6 @@ public class FormatTests
|
||||
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
public static class DateFormatFieldHandler implements SerializableTest.Handler
|
||||
{
|
||||
public Object[] getTestObjects() {
|
||||
@ -1866,7 +1857,6 @@ public class FormatTests
|
||||
return (a == b);
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
public static class DateFormatSymbolsHandler implements SerializableTest.Handler
|
||||
{
|
||||
@ -2008,8 +1998,6 @@ public class FormatTests
|
||||
}
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
public static class ChineseDateFormatFieldHandler implements SerializableTest.Handler
|
||||
{
|
||||
public Object[] getTestObjects() {
|
||||
@ -2022,7 +2010,6 @@ public class FormatTests
|
||||
return (a == b);
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
public static class ChineseDateFormatSymbolsHandler extends DateFormatSymbolsHandler
|
||||
{
|
||||
@ -2055,8 +2042,6 @@ public class FormatTests
|
||||
}
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
public static class NumberFormatFieldHandler implements SerializableTest.Handler
|
||||
{
|
||||
public Object[] getTestObjects()
|
||||
@ -2079,7 +2064,6 @@ public class FormatTests
|
||||
return field_a.toString().equals(field_b.toString());
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
public static class DateNumberFormatHandler implements SerializableTest.Handler
|
||||
{
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -690,13 +689,11 @@ public class SerializableTest extends TestFmwk.TestGroup
|
||||
map.put("com.ibm.icu.util.UResourceTypeMismatchException", new ExceptionTests.UResourceTypeMismatchExceptionHandler());
|
||||
map.put("com.ibm.icu.impl.InvalidFormatException", new ExceptionTests.InvalidFormatExceptionHandler());
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
map.put("com.ibm.icu.text.NumberFormat$Field", new FormatTests.NumberFormatFieldHandler());
|
||||
map.put("com.ibm.icu.text.DateFormat$Field", new FormatTests.DateFormatFieldHandler());
|
||||
map.put("com.ibm.icu.text.ChineseDateFormat$Field", new FormatTests.ChineseDateFormatFieldHandler());
|
||||
map.put("com.ibm.icu.text.MessageFormat$Field", new FormatTests.MessageFormatFieldHandler());
|
||||
//#endif
|
||||
|
||||
map.put("com.ibm.icu.impl.duration.BasicDurationFormat", new FormatTests.BasicDurationFormatHandler());
|
||||
map.put("com.ibm.icu.impl.RelativeDateFormat", new FormatTests.RelativeDateFormatHandler());
|
||||
map.put("com.ibm.icu.util.IllformedLocaleException", new ExceptionTests.IllformedLocaleExceptionHandler());
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2002-2009, International Business Machines Corporation and *
|
||||
@ -9,22 +6,21 @@
|
||||
*/
|
||||
package com.ibm.icu.dev.test.timezone;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.NumberFormat;
|
||||
|
||||
import com.ibm.icu.dev.test.*;
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.util.BagFormatter;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
|
||||
@ -417,5 +413,3 @@ public class TimeZoneAliasTest extends TestFmwk {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//#endif
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2000-2009, International Business Machines Corporation and *
|
||||
@ -13,13 +12,23 @@
|
||||
*/
|
||||
|
||||
package com.ibm.icu.dev.test.timezone;
|
||||
import com.ibm.icu.util.*;
|
||||
import java.io.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.dev.test.*;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.text.DateFormat;
|
||||
import com.ibm.icu.text.SimpleDateFormat;
|
||||
import com.ibm.icu.util.Calendar;
|
||||
import com.ibm.icu.util.GregorianCalendar;
|
||||
import com.ibm.icu.util.SimpleTimeZone;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
public class TimeZoneRegression extends TestFmwk {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
@ -1020,8 +1029,6 @@ public class TimeZoneRegression extends TestFmwk {
|
||||
errln("FAIL: DST is observed in time zone America/New_York on Jan 1, 1900");
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
if (System.getProperty("java.vendor", "").startsWith("IBM") &&
|
||||
System.getProperty("java.version", "").equals("1.4.1")) {
|
||||
// IBM JDK 1.4.1 has a bug and fails to run this test case.
|
||||
@ -1047,7 +1054,6 @@ public class TimeZoneRegression extends TestFmwk {
|
||||
}
|
||||
time += 24*60*60*1000L; // increment 1 day
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13) || defined(J2SE14)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2009, International Business Machines Corporation and *
|
||||
@ -218,4 +215,3 @@ public class RegexUtilitiesTest extends TestFmwk {
|
||||
assertFalse(matchTitle + " and " + shouldNotMatch, matcher.matches());
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2000-2009, International Business Machines Corporation and *
|
||||
@ -7,13 +6,6 @@
|
||||
*/
|
||||
package com.ibm.icu.dev.test.translit;
|
||||
|
||||
import com.ibm.icu.dev.test.*;
|
||||
import com.ibm.icu.lang.*;
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.util.LocaleData;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
@ -25,6 +17,18 @@ import java.io.PrintWriter;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.MissingResourceException;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.lang.UCharacter;
|
||||
import com.ibm.icu.lang.UProperty;
|
||||
import com.ibm.icu.text.Normalizer;
|
||||
import com.ibm.icu.text.Transliterator;
|
||||
import com.ibm.icu.text.UTF16;
|
||||
import com.ibm.icu.text.UnicodeSet;
|
||||
import com.ibm.icu.text.UnicodeSetIterator;
|
||||
import com.ibm.icu.util.LocaleData;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @summary Round trip test of Transliterator
|
||||
@ -175,15 +179,11 @@ public class RoundTripTest extends TestFmwk {
|
||||
private void assertRoundTripTransform(String message, String source, Transliterator lh, Transliterator hl) {
|
||||
String to = hl.transform(source);
|
||||
String back = lh.transform(to);
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## // No regular expression support in Java 1.3
|
||||
//#else
|
||||
if (!source.equals(back)) {
|
||||
String to2 = hl.transform(source.replaceAll("(.)", "$1 ").trim());
|
||||
String to3 = hl.transform(back.replaceAll("(.)", "$1 ").trim());
|
||||
assertEquals(message + " " + source + " [" + to + "/"+ to2 + "/"+ to3 + "]", source, back);
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
||||
public static UnicodeSet getRepresentativeHangul() {
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -28,14 +27,8 @@ public class TestAll extends TestGroup {
|
||||
"RoundTripTest",
|
||||
"TransliteratorTest",
|
||||
"UnicodeSetTest",
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13) || defined(J2SE14)
|
||||
//#else
|
||||
"RegexUtilitiesTest",
|
||||
//#endif
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
"UnicodeMapTest",
|
||||
//#endif
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -9,10 +6,12 @@
|
||||
*/
|
||||
package com.ibm.icu.dev.test.translit;
|
||||
|
||||
import com.ibm.icu.dev.test.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Random;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.dev.test.util.UnicodeMap;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @test
|
||||
@ -71,4 +70,3 @@ public class UnicodeMapTest extends TestFmwk {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2002-2009, International Business Machines Corporation and *
|
||||
@ -10,14 +7,14 @@
|
||||
package com.ibm.icu.dev.test.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import com.ibm.icu.text.UnicodeSet;
|
||||
import java.util.Random;
|
||||
|
||||
public class BNF {
|
||||
private Map map = new HashMap();
|
||||
@ -330,4 +327,3 @@ public class BNF {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2002-2009, International Business Machines Corporation and *
|
||||
@ -1149,4 +1146,3 @@ public class BagFormatter {
|
||||
this.showTotal = showTotal;
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -13,11 +12,7 @@ import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.SortedSet;
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
import java.util.regex.Matcher;
|
||||
//#endif
|
||||
|
||||
import com.ibm.icu.text.Transliterator;
|
||||
import com.ibm.icu.text.UTF16;
|
||||
@ -329,8 +324,6 @@ public final class CollectionUtilities {
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/**
|
||||
* Does one string contain another, starting at a specific offset?
|
||||
* @param text
|
||||
@ -379,7 +372,6 @@ public final class CollectionUtilities {
|
||||
// we don't have to worry about surrogates for this.
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
public static String prettyPrint(UnicodeSet uset, boolean compressRanges, UnicodeSet toQuote, Transliterator quoter,
|
||||
Comparator ordering, Comparator spaceComparator) {
|
||||
@ -480,9 +472,7 @@ public final class CollectionUtilities {
|
||||
return ((String)item).startsWith(prefix);
|
||||
}
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
|
||||
public static class RegexIterator extends FilteredIterator {
|
||||
private Matcher matcher;
|
||||
public RegexIterator set(Iterator baseIterator, Matcher matcher) {
|
||||
@ -494,5 +484,4 @@ public final class CollectionUtilities {
|
||||
return matcher.reset((String)item).matches();
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
@ -10,12 +10,13 @@
|
||||
*/
|
||||
|
||||
package com.ibm.icu.dev.test.util;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.text.DecimalFormatSymbols;
|
||||
import com.ibm.icu.util.Currency;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
@ -464,7 +465,7 @@ public class CurrencyTest extends TestFmwk {
|
||||
}
|
||||
if (!matchPref) {
|
||||
errln("FAIL: Preferred values for locale " + loc
|
||||
+ " got:" + Utility.arrayToString(pref) + " expected:" + Utility.arrayToString(expected));
|
||||
+ " got:" + Arrays.toString(pref) + " expected:" + Arrays.toString(expected));
|
||||
}
|
||||
|
||||
String[] all = Currency.getKeywordValuesForLocale("currency", loc, false);
|
||||
@ -480,7 +481,7 @@ public class CurrencyTest extends TestFmwk {
|
||||
}
|
||||
if (!matchAll) {
|
||||
errln("FAIL: All values for locale " + loc
|
||||
+ " got:" + Utility.arrayToString(all));
|
||||
+ " got:" + Arrays.toString(all));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -14,12 +11,9 @@ import java.io.IOException;
|
||||
import java.io.ObjectInput;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
//import java.util.HashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
//import java.util.Map;
|
||||
|
||||
//import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.text.UTF16;
|
||||
|
||||
/**
|
||||
@ -233,4 +227,3 @@ public final class DataInputCompressor implements ObjectInput {
|
||||
return valuesList;
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -15,12 +12,9 @@ import java.io.ObjectOutput;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
//import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.SortedSet;
|
||||
//import java.util.TreeSet;
|
||||
|
||||
//import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.text.UTF16;
|
||||
|
||||
/**
|
||||
@ -211,5 +205,3 @@ public final class DataOutputCompressor implements ObjectOutput {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//#endif
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2002-2009, International Business Machines Corporation and *
|
||||
@ -10,7 +7,6 @@
|
||||
package com.ibm.icu.dev.test.util;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.Locale;
|
||||
@ -85,4 +81,3 @@ public class FileUtilities {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2002-2009, International Business Machines Corporation and *
|
||||
@ -429,4 +426,3 @@ public class ICUPropertyFactory extends UnicodeProperty.Factory {
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2001-2009, International Business Machines Corporation and *
|
||||
@ -10,16 +9,12 @@ package com.ibm.icu.dev.test.util;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.JarURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.net.JarURLConnection;
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//##import com.ibm.icu.impl.ByteBuffer;
|
||||
//#else
|
||||
import java.nio.ByteBuffer;
|
||||
//#endif
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.Enumeration;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.jar.JarEntry;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
|
@ -6,8 +6,9 @@
|
||||
*/
|
||||
package com.ibm.icu.dev.test.util;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.util.IllformedLocaleException;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.util.ULocale.Builder;
|
||||
@ -80,7 +81,7 @@ public class LocaleBuilderTest extends TestFmwk {
|
||||
bld.setExtension(ULocale.PRIVATE_USE_EXTENSION, TESTCASE[tidx][i++]);
|
||||
} else if (method.equals("X")) {
|
||||
errln("FAIL: No excetion was thrown - test csae: "
|
||||
+ Utility.arrayToString(TESTCASE[tidx]));
|
||||
+ Arrays.toString(TESTCASE[tidx]));
|
||||
} else if (method.equals("T")) {
|
||||
expected = new String[2];
|
||||
expected[0] = TESTCASE[tidx][i];
|
||||
@ -93,7 +94,7 @@ public class LocaleBuilderTest extends TestFmwk {
|
||||
break;
|
||||
} else {
|
||||
errln("FAIL: IllformedLocaleException at offset " + i
|
||||
+ " in test case: " + Utility.arrayToString(TESTCASE[tidx]));
|
||||
+ " in test case: " + Arrays.toString(TESTCASE[tidx]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -101,12 +102,12 @@ public class LocaleBuilderTest extends TestFmwk {
|
||||
ULocale loc = bld.create();
|
||||
if (!expected[1].equals(loc.toString())) {
|
||||
errln("FAIL: Wrong locale ID - " + loc +
|
||||
" for test case: " + Utility.arrayToString(TESTCASE[tidx]));
|
||||
" for test case: " + Arrays.toString(TESTCASE[tidx]));
|
||||
}
|
||||
String langtag = loc.toLanguageTag();
|
||||
if (!expected[0].equals(langtag)) {
|
||||
errln("FAIL: Wrong language tag - " + langtag +
|
||||
" for test case: " + Utility.arrayToString(TESTCASE[tidx]));
|
||||
" for test case: " + Arrays.toString(TESTCASE[tidx]));
|
||||
}
|
||||
ULocale loc1 = ULocale.forLanguageTag(langtag);
|
||||
if (!loc.equals(loc1)) {
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2002-2009, International Business Machines Corporation and *
|
||||
@ -11,8 +8,6 @@ package com.ibm.icu.dev.test.util;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
//TODO integrate this into the test framework
|
||||
|
||||
import com.ibm.icu.text.UnicodeSet;
|
||||
|
||||
public class TestBNF {
|
||||
@ -243,4 +238,3 @@ public class TestBNF {
|
||||
|
||||
}
|
||||
|
||||
//#endif
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2002-2009, International Business Machines Corporation and *
|
||||
@ -244,4 +241,3 @@ public class TestBagFormatter {
|
||||
}
|
||||
*/
|
||||
}
|
||||
//#endif
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -466,4 +463,3 @@ public class TestUtilities extends TestFmwk {
|
||||
}
|
||||
|
||||
}
|
||||
//#endif
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2002-2009, International Business Machines Corporation and *
|
||||
@ -10,14 +7,16 @@
|
||||
package com.ibm.icu.dev.test.util;
|
||||
|
||||
import java.text.ParsePosition;
|
||||
|
||||
import com.ibm.icu.text.*;
|
||||
import com.ibm.icu.lang.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.ibm.icu.lang.UCharacter;
|
||||
import com.ibm.icu.text.SymbolTable;
|
||||
import com.ibm.icu.text.UTF16;
|
||||
import com.ibm.icu.text.UnicodeMatcher;
|
||||
import com.ibm.icu.text.UnicodeSet;
|
||||
|
||||
public class Tokenizer {
|
||||
protected String source;
|
||||
@ -319,5 +318,3 @@ public class Tokenizer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//#endif
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2002-2009, International Business Machines Corporation and *
|
||||
@ -11,9 +10,6 @@ import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.ibm.icu.text.Transliterator;
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//##import com.ibm.icu.dev.test.TestUtil;
|
||||
//#endif
|
||||
|
||||
public class TransliteratorUtilities {
|
||||
public static boolean DEBUG = false;
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -9,8 +6,20 @@
|
||||
*/
|
||||
package com.ibm.icu.dev.test.util;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.io.Externalizable;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInput;
|
||||
import java.io.ObjectOutput;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.text.UTF16;
|
||||
@ -894,4 +903,3 @@ public final class UnicodeMap implements Cloneable, Freezable, Externalizable {
|
||||
// }
|
||||
// }
|
||||
}
|
||||
//#endif
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -1236,5 +1233,4 @@ public abstract class UnicodeProperty extends UnicodeLabel {
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
**********************************************************************
|
||||
* Copyright (c) 2003-2009, International Business Machines
|
||||
@ -10,6 +9,7 @@
|
||||
**********************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.test.util;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@ -116,11 +116,8 @@ public class UtilityTest extends TestFmwk {
|
||||
{
|
||||
byte[] ba = {0x00, 0x01, 0x02};
|
||||
byte[] bb = {0x00, 0x01, 0x02, -1};
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## com.ibm.icu.impl.ByteBuffer buffer = com.ibm.icu.impl.ByteBuffer.wrap(ba);
|
||||
//#else
|
||||
|
||||
java.nio.ByteBuffer buffer = java.nio.ByteBuffer.wrap(ba);
|
||||
//#endif
|
||||
ByteArrayWrapper x = new ByteArrayWrapper(buffer);
|
||||
|
||||
ByteArrayWrapper y = new ByteArrayWrapper(ba, 3);
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2002-2009, International Business Machines Corporation and *
|
||||
@ -6,18 +5,9 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
/**
|
||||
* Preprocess with com.ibm.icu.dev.tool.docs.CodeMangler to generate
|
||||
* either a JDK 1.4 or JDK 1.5 version. For the 1.5 version, define
|
||||
* VERSION_1.5.
|
||||
*/
|
||||
|
||||
package com.ibm.icu.dev.tool.docs;
|
||||
|
||||
import com.sun.javadoc.*;
|
||||
//#if defined(J2SE13) || defined(J2SE14)
|
||||
//##import com.sun.tools.doclets.*;
|
||||
//#else
|
||||
// jdk 1.5 contains both com.sun.tools.doclets.Taglet and
|
||||
// com.sun.tools.doclets.internal.toolkit.taglets.Taglet.
|
||||
// Their registration code casts to the second, not the first, and the
|
||||
@ -25,7 +15,6 @@ import com.sun.javadoc.*;
|
||||
// first, you die.
|
||||
import com.sun.tools.doclets.internal.toolkit.taglets.*;
|
||||
import com.sun.tools.doclets.internal.toolkit.taglets.Taglet;
|
||||
//#endif
|
||||
|
||||
import java.text.BreakIterator;
|
||||
import java.util.Locale;
|
||||
@ -50,9 +39,6 @@ public abstract class ICUTaglet implements Taglet {
|
||||
ICUInternalTaglet.register(taglets);
|
||||
ICUDraftTaglet.register(taglets);
|
||||
ICUStableTaglet.register(taglets);
|
||||
//#if defined(J2SE13) || defined(J2SE14)
|
||||
//## ICUDeprecatedTaglet.register(taglets);
|
||||
//#endif
|
||||
ICUProvisionalTaglet.register(taglets);
|
||||
ICUObsoleteTaglet.register(taglets);
|
||||
ICUIgnoreTaglet.register(taglets);
|
||||
@ -114,8 +100,6 @@ public abstract class ICUTaglet implements Taglet {
|
||||
return null;
|
||||
}
|
||||
|
||||
//#if defined(J2SE13) || defined(J2SE14)
|
||||
//#else
|
||||
public TagletOutput getTagletOutput(Tag tag, TagletWriter writer) throws IllegalArgumentException {
|
||||
TagletOutput out = writer.getTagletOutputInstance();
|
||||
out.setOutput(toString(tag));
|
||||
@ -131,7 +115,6 @@ public abstract class ICUTaglet implements Taglet {
|
||||
out.setOutput(toString(tags[0]));
|
||||
return out;
|
||||
}
|
||||
//#endif
|
||||
|
||||
protected static final String STATUS = "<dt><b>Status:</b></dt>";
|
||||
|
||||
@ -191,41 +174,6 @@ public abstract class ICUTaglet implements Taglet {
|
||||
}
|
||||
}
|
||||
}
|
||||
//#if defined(J2SE13) || defined(J2SE14)
|
||||
//## /*
|
||||
//## * sigh, in JDK 1.5 we can't override the standard deprecated taglet
|
||||
//## * so easily. I'm not impressed with the javadoc code.
|
||||
//## */
|
||||
//## public static class ICUDeprecatedTaglet extends ICUTaglet {
|
||||
//## private static final String NAME = "deprecated";
|
||||
//##
|
||||
//## public static void register(Map taglets) {
|
||||
//## taglets.remove(NAME); // override standard deprecated taglet
|
||||
//## taglets.put(NAME, new ICUDeprecatedTaglet());
|
||||
//## }
|
||||
//##
|
||||
//## private ICUDeprecatedTaglet() {
|
||||
//## super(NAME, MASK_DEFAULT);
|
||||
//## }
|
||||
//##
|
||||
//## public String toString(Tag tag) {
|
||||
//## BreakIterator bi = BreakIterator.getSentenceInstance(Locale.US);
|
||||
//## String text = tag.text();
|
||||
//## bi.setText(text);
|
||||
//## int first = bi.first();
|
||||
//## int next = bi.next();
|
||||
//## if (first == -1 || next == -1) {
|
||||
//## System.err.println("Warning: bad deprecated tag '" + text + "'");
|
||||
//## return "<dd><em>Note</em>. " + text + "</dd>";
|
||||
//## } else {
|
||||
//## if ("This API is ICU internal only.".equals(text)) {
|
||||
//## return null;
|
||||
//## }
|
||||
//## return "<dd><em>Note, " + text.substring(first, next) + "</em>. " + text.substring(next) + "</dd>";
|
||||
//## }
|
||||
//## }
|
||||
//## }
|
||||
//#endif
|
||||
|
||||
public static class ICUProvisionalTaglet extends ICUTaglet {
|
||||
private static final String NAME = "provisional";
|
||||
|
@ -1,100 +0,0 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13) || defined(ECLIPSE_FRAGMENT)
|
||||
//##/*
|
||||
//## * *****************************************************************************
|
||||
//## * Copyright (C) 2006-2009, International Business Machines
|
||||
//## * Corporation and others. All Rights Reserved.
|
||||
//## * *****************************************************************************
|
||||
//## */
|
||||
//##// dlf13 internal 1.3 compatibility only
|
||||
//##
|
||||
//##package com.ibm.icu.impl;
|
||||
//##
|
||||
//##/**
|
||||
//## * @internal
|
||||
//## */
|
||||
//##public final class ByteBuffer {
|
||||
//## private byte[] data;
|
||||
//##
|
||||
//## private int pos;
|
||||
//##
|
||||
//## private int limit;
|
||||
//##
|
||||
//## private ByteBuffer() {
|
||||
//## }
|
||||
//##
|
||||
//## public byte[] array() {
|
||||
//## byte[] result = new byte[limit];
|
||||
//## for (int i = 0; i < limit; ++i) {
|
||||
//## result[i] = data[i];
|
||||
//## }
|
||||
//## return result;
|
||||
//## }
|
||||
//##
|
||||
//## public static ByteBuffer wrap(byte[] data) {
|
||||
//## if (data == null)
|
||||
//## throw new NullPointerException();
|
||||
//## ByteBuffer result = new ByteBuffer();
|
||||
//## result.data = data;
|
||||
//## result.pos = 0;
|
||||
//## result.limit = data.length;
|
||||
//## return result;
|
||||
//## }
|
||||
//##
|
||||
//## public int limit() {
|
||||
//## return limit;
|
||||
//## }
|
||||
//##
|
||||
//## public int position() {
|
||||
//## return pos;
|
||||
//## }
|
||||
//##
|
||||
//## public int remaining() {
|
||||
//## return limit - pos;
|
||||
//## }
|
||||
//##
|
||||
//## public byte get() {
|
||||
//## if (pos < limit)
|
||||
//## return data[pos++];
|
||||
//## throw new IndexOutOfBoundsException();
|
||||
//## }
|
||||
//##
|
||||
//## public void get(byte[] dst, int offset, int length) {
|
||||
//## if (offset < 0 || offset + length > dst.length || pos + length > limit) {
|
||||
//## throw new IndexOutOfBoundsException();
|
||||
//## }
|
||||
//## for (int i = 0; i < length; ++i) {
|
||||
//## dst[offset++] = data[pos++];
|
||||
//## }
|
||||
//## }
|
||||
//##
|
||||
//## public void put(byte b) {
|
||||
//## if (pos < limit) {
|
||||
//## data[pos++] = b;
|
||||
//## } else {
|
||||
//## throw new IndexOutOfBoundsException();
|
||||
//## }
|
||||
//## }
|
||||
//##
|
||||
//## public void put(byte[] src, int offset, int length) {
|
||||
//## if (offset < 0 || offset + length > src.length || pos + length > limit) {
|
||||
//## throw new IndexOutOfBoundsException();
|
||||
//## }
|
||||
//## for (int i = offset; i < offset + length; i++) {
|
||||
//## put(src[i]);
|
||||
//## }
|
||||
//## }
|
||||
//##
|
||||
//## public void put(byte[] src) {
|
||||
//## put(src, 0, src.length);
|
||||
//## }
|
||||
//##
|
||||
//## public static final ByteBuffer allocate(int size){
|
||||
//## ByteBuffer ret = new ByteBuffer();
|
||||
//## ret.data = new byte[size];
|
||||
//## ret.pos = 0;
|
||||
//## ret.limit = size;
|
||||
//## return ret;
|
||||
//## }
|
||||
//##}
|
||||
//#endif
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2007-2009, International Business Machines
|
||||
@ -140,13 +139,10 @@ public final class DateNumberFormat extends NumberFormat {
|
||||
throw new UnsupportedOperationException("StringBuffer format(BigInteger, StringBuffer, FieldPostion) is not implemented");
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10)
|
||||
//#else
|
||||
public StringBuffer format(java.math.BigDecimal number, StringBuffer toAppendTo,
|
||||
FieldPosition pos) {
|
||||
throw new UnsupportedOperationException("StringBuffer format(BigDecimal, StringBuffer, FieldPostion) is not implemented");
|
||||
}
|
||||
//#endif
|
||||
|
||||
public StringBuffer format(BigDecimal number,
|
||||
StringBuffer toAppendTo, FieldPosition pos) {
|
||||
|
@ -1191,7 +1191,7 @@ public class ICUResourceBundle extends UResourceBundle {
|
||||
if (res != null && lookup != null && !alias[0]) {
|
||||
// We do not want to cache a result from alias entry
|
||||
lookup.put(resKey, res);
|
||||
lookup.put(Utility.integerValueOf(index[0]), res);
|
||||
lookup.put(Integer.valueOf(index[0]), res);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
@ -1201,7 +1201,7 @@ public class ICUResourceBundle extends UResourceBundle {
|
||||
UResourceBundle res = null;
|
||||
Integer indexKey = null;
|
||||
if (lookup != null) {
|
||||
indexKey = Utility.integerValueOf(index);
|
||||
indexKey = Integer.valueOf(index);
|
||||
res = (UResourceBundle)lookup.get(indexKey);
|
||||
}
|
||||
if (res == null) {
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2004-2009, International Business Machines Corporation and *
|
||||
@ -7,6 +6,7 @@
|
||||
*/
|
||||
package com.ibm.icu.impl;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.HashMap;
|
||||
import java.util.MissingResourceException;
|
||||
|
||||
@ -15,11 +15,6 @@ import com.ibm.icu.util.UResourceBundle;
|
||||
import com.ibm.icu.util.UResourceBundleIterator;
|
||||
import com.ibm.icu.util.UResourceTypeMismatchException;
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13) || defined(ECLIPSE_FRAGMENT)
|
||||
//#else
|
||||
import java.nio.ByteBuffer;
|
||||
//#endif
|
||||
|
||||
class ICUResourceBundleImpl {
|
||||
|
||||
static final class ResourceArray extends ICUResourceBundle {
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2009, Google, International Business Machines Corporation and *
|
||||
@ -18,10 +17,7 @@ public class IllegalIcuArgumentException extends IllegalArgumentException {
|
||||
super(errorMessage);
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
public synchronized Throwable initCause(Throwable cause) {
|
||||
return super.initCause(cause);
|
||||
return super.initCause(cause);
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008-2009, International Business Machines Corporation and *
|
||||
@ -128,18 +127,10 @@ public class JavaTimeZone extends TimeZone {
|
||||
int delta = ((((dayDelta * 24) + hour1 - hour) * 60 + min1 - min) * 60 + sec1 - sec) * 1000 + mil1 - mil;
|
||||
|
||||
// In this case, we use the offsets before the transition
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## javacal.setTime(new Date(javacal.getTime().getTime() - delta - 1));
|
||||
//#else
|
||||
javacal.setTimeInMillis(javacal.getTimeInMillis() - delta - 1);
|
||||
//#endif
|
||||
javacal.setTimeInMillis(javacal.getTimeInMillis() - delta - 1);
|
||||
}
|
||||
} else {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## javacal.setTime(new Date(date));
|
||||
//#else
|
||||
javacal.setTimeInMillis(date);
|
||||
//#endif
|
||||
}
|
||||
offsets[0] = javacal.get(java.util.Calendar.ZONE_OFFSET);
|
||||
offsets[1] = javacal.get(java.util.Calendar.DST_OFFSET);
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2006-2009, Google, International Business Machines Corporation *
|
||||
@ -128,15 +127,9 @@ public class PatternTokenizer {
|
||||
return this;
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## public PatternTokenizer setPattern(StringBuffer pattern) {
|
||||
//## return setPattern(pattern.toString());
|
||||
//## }
|
||||
//#else
|
||||
public PatternTokenizer setPattern(CharSequence pattern) {
|
||||
return setPattern(pattern.toString());
|
||||
}
|
||||
//#endif
|
||||
|
||||
public PatternTokenizer setPattern(String pattern) {
|
||||
if (pattern == null) {
|
||||
@ -152,15 +145,9 @@ public class PatternTokenizer {
|
||||
public static final char BACK_SLASH = '\\';
|
||||
private static int NO_QUOTE = -1, IN_QUOTE = -2;
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## public String quoteLiteral(StringBuffer string) {
|
||||
//## return quoteLiteral(string.toString());
|
||||
//## }
|
||||
//#else
|
||||
public String quoteLiteral(CharSequence string) {
|
||||
return quoteLiteral(string.toString());
|
||||
}
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* Quote a literal string, using the available settings. Thus syntax characters, quote characters, and ignorable characters will be put into quotes.
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13) || defined(J2SE14)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2009, Google, International Business Machines Corporation and *
|
||||
@ -391,5 +388,4 @@ public class UnicodeRegex implements Cloneable, Freezable, StringTransform {
|
||||
return variables;
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -1801,172 +1800,14 @@ public final class Utility {
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
|
||||
// !!! 1.3 compatibility
|
||||
public static int indexOf(StringBuffer buf, String s) {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## return buf.toString().indexOf(s);
|
||||
//#else
|
||||
return buf.indexOf(s);
|
||||
//#endif
|
||||
}
|
||||
|
||||
// !!! 1.3 compatibility
|
||||
public static int lastIndexOf(StringBuffer buf, String s) {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## return buf.toString().lastIndexOf(s);
|
||||
//#else
|
||||
return buf.lastIndexOf(s);
|
||||
//#endif
|
||||
}
|
||||
|
||||
// !!! 1.3 compatibility
|
||||
public static int indexOf(StringBuffer buf, String s, int i) {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## return buf.toString().indexOf(s, i);
|
||||
//#else
|
||||
return buf.indexOf(s, i);
|
||||
//#endif
|
||||
}
|
||||
|
||||
// !!! 1.3 compatibility
|
||||
public static int lastIndexOf(StringBuffer buf, String s, int i) {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## return buf.toString().lastIndexOf(s, i);
|
||||
//#else
|
||||
return buf.lastIndexOf(s, i);
|
||||
//#endif
|
||||
}
|
||||
|
||||
// !!! 1.3/1.4 compatibility
|
||||
public static String replace(String src, String target, String replacement) {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13) || defined(J2SE14)
|
||||
//## int i = src.indexOf(target);
|
||||
//## if (i == -1) {
|
||||
//## return src;
|
||||
//## }
|
||||
//## StringBuffer buf = new StringBuffer();
|
||||
//## int n = 0;
|
||||
//## do {
|
||||
//## buf.append(src.substring(n, i));
|
||||
//## buf.append(replacement);
|
||||
//## n = i + target.length();
|
||||
//## i = src.indexOf(target, n);
|
||||
//## } while (i != -1);
|
||||
//## if (n < src.length()) {
|
||||
//## buf.append(src.substring(n));
|
||||
//## }
|
||||
//## return buf.toString();
|
||||
//#else
|
||||
return src.replace(target, replacement);
|
||||
//#endif
|
||||
}
|
||||
|
||||
// !!! 1.3 compatibility
|
||||
public static String replaceAll(String src, String target, String replacement) {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## return replace(src, target, replacement);
|
||||
//#else
|
||||
return src.replaceAll(target, replacement);
|
||||
//#endif
|
||||
}
|
||||
|
||||
//private static final String REGEX_SPECIALS = ".^$[]*+?|()";
|
||||
|
||||
// !!! 1.3 compatibility
|
||||
// Note: target is not a string literal, not a regular expression.
|
||||
public static String[] splitString(String src, String target) {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## int i = src.indexOf(target);
|
||||
//## if (i == -1) {
|
||||
//## return new String[] { src };
|
||||
//## }
|
||||
//## ArrayList output = new ArrayList();
|
||||
//## int n = 0;
|
||||
//## do {
|
||||
//## output.add(src.substring(n, i));
|
||||
//## n = i + target.length();
|
||||
//## i = src.indexOf(target, n);
|
||||
//## } while (i != -1);
|
||||
//## if (n < src.length()) {
|
||||
//## output.add(src.substring(n));
|
||||
//## }
|
||||
//## return (String[]) output.toArray(new String[output.size()]);
|
||||
//#else
|
||||
return src.split("\\Q" + target + "\\E");
|
||||
//#endif
|
||||
}
|
||||
|
||||
// !!! 1.3 compatibility
|
||||
/**
|
||||
* Split the string at runs of ascii whitespace characters.
|
||||
*/
|
||||
public static String[] splitWhitespace(String src) {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## char ws[] = "\u0020\u0009\n\u000b\u000c\r".toCharArray();
|
||||
//## ArrayList output = new ArrayList();
|
||||
//## boolean inWhitespace = true;
|
||||
//## int n = 0;
|
||||
//## loop:
|
||||
//## for (int i = 0; i < src.length(); ++i) {
|
||||
//## char c = src.charAt(i);
|
||||
//## for (int j = 0; j < ws.length; ++j) {
|
||||
//## if (ws[j] == c) {
|
||||
//## if (!inWhitespace) {
|
||||
//## output.add(src.substring(n, i));
|
||||
//## inWhitespace = true;
|
||||
//## }
|
||||
//## continue loop;
|
||||
//## }
|
||||
//## }
|
||||
//## if (inWhitespace) {
|
||||
//## n = i;
|
||||
//## inWhitespace = false;
|
||||
//## }
|
||||
//## }
|
||||
//## if (n < src.length()) {
|
||||
//## output.add(src.substring(n));
|
||||
//## }
|
||||
//## return (String[]) output.toArray(new String[output.size()]);
|
||||
//#else
|
||||
return src.split("\\s+");
|
||||
//#endif
|
||||
}
|
||||
|
||||
// !!! 1.3/1.4 compatibility
|
||||
// Integer constants - Integer.valueOf(int) is not supported in JDK 1.3/1.4
|
||||
private static final int MAX_INT_CONST = 64;
|
||||
private static final Integer[] INT_CONST = new Integer[MAX_INT_CONST];
|
||||
|
||||
static {
|
||||
for (int i = 0; i < MAX_INT_CONST; i++) {
|
||||
INT_CONST[i] = new Integer(i);
|
||||
}
|
||||
}
|
||||
|
||||
public static Integer integerValueOf(int val) {
|
||||
if (0 <= val && val < MAX_INT_CONST) {
|
||||
return INT_CONST[val];
|
||||
}
|
||||
return new Integer(val);
|
||||
}
|
||||
|
||||
// !!! 1.3/1.4 compatibility
|
||||
// Arrays.toString(Object[])
|
||||
public static String arrayToString(Object[] a) {
|
||||
StringBuffer buf = new StringBuffer("[");
|
||||
for (int i = 0; i < a.length; i++) {
|
||||
if (i != 0) {
|
||||
buf.append(", ");
|
||||
}
|
||||
if (a[i] == null) {
|
||||
buf.append("null");
|
||||
} else {
|
||||
buf.append(a[i].toString());
|
||||
}
|
||||
}
|
||||
buf.append("]");
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2007-2009, International Business Machines Corporation and *
|
||||
@ -31,10 +30,7 @@ public class BasicDurationFormat extends DurationFormat {
|
||||
return new BasicDurationFormat(locale);
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13) || defined(J2SE14)
|
||||
//#else
|
||||
private static boolean checkXMLDuration = true;
|
||||
//#endif
|
||||
|
||||
public StringBuffer format(Object object, StringBuffer toAppend, FieldPosition pos) {
|
||||
if(object instanceof Long) {
|
||||
@ -44,8 +40,6 @@ public class BasicDurationFormat extends DurationFormat {
|
||||
String res = formatDurationFromNowTo(((Date)object));
|
||||
return toAppend.append(res);
|
||||
}
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13) || defined(J2SE14)
|
||||
//#else
|
||||
if(checkXMLDuration) try {
|
||||
if(object instanceof javax.xml.datatype.Duration) {
|
||||
String res = formatDuration(object);
|
||||
@ -55,7 +49,6 @@ public class BasicDurationFormat extends DurationFormat {
|
||||
System.err.println("Skipping XML capability");
|
||||
checkXMLDuration = false; // don't try again
|
||||
}
|
||||
//#endif
|
||||
throw new IllegalArgumentException("Cannot format given Object as a Duration");
|
||||
|
||||
}
|
||||
@ -96,8 +89,6 @@ public class BasicDurationFormat extends DurationFormat {
|
||||
return formatter.formatDurationFromNowTo(targetDate);
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13) || defined(J2SE14)
|
||||
//#else
|
||||
/**
|
||||
* JDK 1.5+ only
|
||||
* @param o
|
||||
@ -183,5 +174,4 @@ public class BasicDurationFormat extends DurationFormat {
|
||||
// now, format it.
|
||||
return pformatter.format(p);
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ public final class InternalLocaleBuilder {
|
||||
}
|
||||
// parse locale keyword extension subtags
|
||||
// String[] kwdtags = (value.replaceAll(LOCALESEP, LANGTAGSEP)).split(LANGTAGSEP);
|
||||
String[] kwdtags = Utility.split(Utility.replaceAll(value, LOCALESEP, LANGTAGSEP), '-');
|
||||
String[] kwdtags = Utility.split(value.replaceAll(LOCALESEP, LANGTAGSEP), '-');
|
||||
if ((kwdtags.length % 2) != 0) {
|
||||
// number of keyword subtags must be even number
|
||||
throw new LocaleSyntaxException("Ill-formed LDML extension key/value pairs: " + value);
|
||||
@ -333,14 +333,14 @@ public final class InternalLocaleBuilder {
|
||||
case FieldType.VARIANT:
|
||||
// Java variant is case sensitive - so no case mapping here
|
||||
// value = value.replaceAll(LANGTAGSEP, LOCALESEP);
|
||||
value = Utility.replaceAll(value, LANGTAGSEP, LOCALESEP);
|
||||
value = value.replaceAll(LANGTAGSEP, LOCALESEP);
|
||||
break;
|
||||
case FieldType.LDMLKEY:
|
||||
case FieldType.LDMLTYPE:
|
||||
case FieldType.EXTENSION:
|
||||
case FieldType.PRIVATEUSE:
|
||||
// value = AsciiUtil.toLowerString(value).replaceAll(LOCALESEP, LANGTAGSEP);
|
||||
value = Utility.replaceAll(AsciiUtil.toLowerString(value), LOCALESEP, LANGTAGSEP);
|
||||
value = AsciiUtil.toLowerString(value).replaceAll(LOCALESEP, LANGTAGSEP);
|
||||
break;
|
||||
}
|
||||
return value;
|
||||
|
@ -39,7 +39,7 @@ public final class LocaleExtensions {
|
||||
}
|
||||
|
||||
// extensions = AsciiUtil.toLowerString(extensions).replaceAll("_", LOCALEEXTSEP);
|
||||
extensions = Utility.replaceAll(AsciiUtil.toLowerString(extensions), "_", LOCALEEXTSEP);
|
||||
extensions = AsciiUtil.toLowerString(extensions).replaceAll("_", LOCALEEXTSEP);
|
||||
|
||||
if (extensions.length() < MINLEN) {
|
||||
// malformed extensions - too short
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -5620,31 +5619,6 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
||||
* @return the code point at the index
|
||||
* @stable ICU 3.0
|
||||
*/
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## public static final int codePointAt(String seq, int index) {
|
||||
//## char c1 = seq.charAt(index++);
|
||||
//## if (isHighSurrogate(c1)) {
|
||||
//## if (index < seq.length()) {
|
||||
//## char c2 = seq.charAt(index);
|
||||
//## if (isLowSurrogate(c2)) {
|
||||
//## return toCodePoint(c1, c2);
|
||||
//## }
|
||||
//## }
|
||||
//## }
|
||||
//## return c1;
|
||||
//## }
|
||||
//## public static final int codePointAt(StringBuffer seq, int index) {
|
||||
//## return codePointAt(seq.toString(), index);
|
||||
//## }
|
||||
//#else
|
||||
//#if defined(ECLIPSE_FRAGMENT)
|
||||
//## public static final int codePointAt(String seq, int index) {
|
||||
//## return codePointAt((CharSequence)seq, index);
|
||||
//## }
|
||||
//## public static final int codePointAt(StringBuffer seq, int index) {
|
||||
//## return codePointAt((CharSequence)seq, index);
|
||||
//## }
|
||||
//#endif
|
||||
public static final int codePointAt(CharSequence seq, int index) {
|
||||
char c1 = seq.charAt(index++);
|
||||
if (isHighSurrogate(c1)) {
|
||||
@ -5657,7 +5631,6 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
||||
}
|
||||
return c1;
|
||||
}
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* Cover the JDK 1.5 API, for convenience. Return the code point at index.
|
||||
@ -5716,31 +5689,6 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
||||
* @return the code point before the index
|
||||
* @stable ICU 3.0
|
||||
*/
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## public static final int codePointBefore(String seq, int index) {
|
||||
//## char c2 = seq.charAt(--index);
|
||||
//## if (isLowSurrogate(c2)) {
|
||||
//## if (index > 0) {
|
||||
//## char c1 = seq.charAt(--index);
|
||||
//## if (isHighSurrogate(c1)) {
|
||||
//## return toCodePoint(c1, c2);
|
||||
//## }
|
||||
//## }
|
||||
//## }
|
||||
//## return c2;
|
||||
//## }
|
||||
//## public static final int codePointBefore(StringBuffer seq, int index) {
|
||||
//## return codePointBefore(seq.toString(), index);
|
||||
//## }
|
||||
//#else
|
||||
//#if defined(ECLIPSE_FRAGMENT)
|
||||
//## public static final int codePointBefore(String seq, int index) {
|
||||
//## return codePointBefore((CharSequence)seq, index);
|
||||
//## }
|
||||
//## public static final int codePointBefore(StringBuffer seq, int index) {
|
||||
//## return codePointBefore((CharSequence)seq, index);
|
||||
//## }
|
||||
//#endif
|
||||
public static final int codePointBefore(CharSequence seq, int index) {
|
||||
char c2 = seq.charAt(--index);
|
||||
if (isLowSurrogate(c2)) {
|
||||
@ -5753,7 +5701,6 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
||||
}
|
||||
return c2;
|
||||
}
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* Cover the JDK 1.5 API, for convenience. Return the code point before index.
|
||||
@ -5876,39 +5823,6 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
||||
* @return the number of code points in the range
|
||||
* @stable ICU 3.0
|
||||
*/
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## public static int codePointCount(String text, int start, int limit) {
|
||||
//## if (start < 0 || limit < start || limit > text.length()) {
|
||||
//## throw new IndexOutOfBoundsException("start (" + start +
|
||||
//## ") or limit (" + limit +
|
||||
//## ") invalid or out of range 0, " + text.length());
|
||||
//## }
|
||||
//##
|
||||
//## int len = limit - start;
|
||||
//## while (limit > start) {
|
||||
//## char ch = text.charAt(--limit);
|
||||
//## while (ch >= MIN_LOW_SURROGATE && ch <= MAX_LOW_SURROGATE && limit > start) {
|
||||
//## ch = text.charAt(--limit);
|
||||
//## if (ch >= MIN_HIGH_SURROGATE && ch <= MAX_HIGH_SURROGATE) {
|
||||
//## --len;
|
||||
//## break;
|
||||
//## }
|
||||
//## }
|
||||
//## }
|
||||
//## return len;
|
||||
//## }
|
||||
//## public static int codePointCount(StringBuffer text, int start, int limit) {
|
||||
//## return codePointCount(text.toString(), start, limit);
|
||||
//## }
|
||||
//#else
|
||||
//#if defined(ECLIPSE_FRAGMENT)
|
||||
//## public static int codePointCount(String text, int start, int limit) {
|
||||
//## return codePointCount((CharSequence)text, start, limit);
|
||||
//## }
|
||||
//## public static int codePointCount(StringBuffer text, int start, int limit) {
|
||||
//## return codePointCount((CharSequence)text, start, limit);
|
||||
//## }
|
||||
//#endif
|
||||
public static int codePointCount(CharSequence text, int start, int limit) {
|
||||
if (start < 0 || limit < start || limit > text.length()) {
|
||||
throw new IndexOutOfBoundsException("start (" + start +
|
||||
@ -5929,7 +5843,6 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
||||
}
|
||||
return len;
|
||||
}
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* Cover the JDK API, for convenience. Count the number of code points in the range of text.
|
||||
@ -5968,54 +5881,6 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
||||
* @return the adjusted index
|
||||
* @stable ICU 3.0
|
||||
*/
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## public static int offsetByCodePoints(String text, int index, int codePointOffset) {
|
||||
//## if (index < 0 || index > text.length()) {
|
||||
//## throw new IndexOutOfBoundsException("index ( " + index +
|
||||
//## ") out of range 0, " + text.length());
|
||||
//## }
|
||||
//##
|
||||
//## if (codePointOffset < 0) {
|
||||
//## while (++codePointOffset <= 0) {
|
||||
//## char ch = text.charAt(--index);
|
||||
//## while (ch >= MIN_LOW_SURROGATE && ch <= MAX_LOW_SURROGATE && index > 0) {
|
||||
//## ch = text.charAt(--index);
|
||||
//## if (ch < MIN_HIGH_SURROGATE || ch > MAX_HIGH_SURROGATE) {
|
||||
//## if (++codePointOffset > 0) {
|
||||
//## return index+1;
|
||||
//## }
|
||||
//## }
|
||||
//## }
|
||||
//## }
|
||||
//## } else {
|
||||
//## int limit = text.length();
|
||||
//## while (--codePointOffset >= 0) {
|
||||
//## char ch = text.charAt(index++);
|
||||
//## while (ch >= MIN_HIGH_SURROGATE && ch <= MAX_HIGH_SURROGATE && index < limit) {
|
||||
//## ch = text.charAt(index++);
|
||||
//## if (ch < MIN_LOW_SURROGATE || ch > MAX_LOW_SURROGATE) {
|
||||
//## if (--codePointOffset < 0) {
|
||||
//## return index-1;
|
||||
//## }
|
||||
//## }
|
||||
//## }
|
||||
//## }
|
||||
//## }
|
||||
//##
|
||||
//## return index;
|
||||
//## }
|
||||
//## public static int offsetByCodePoints(StringBuffer text, int index, int codePointOffset) {
|
||||
//## return offsetByCodePoints(text.toString(), index, codePointOffset);
|
||||
//## }
|
||||
//#else
|
||||
//#if defined(ECLIPSE_FRAGMENT)
|
||||
//## public static int offsetByCodePoints(String text, int index, int codePointOffset) {
|
||||
//## return offsetByCodePoints((CharSequence)text, index, codePointOffset);
|
||||
//## }
|
||||
//## public static int offsetByCodePoints(StringBuffer text, int index, int codePointOffset) {
|
||||
//## return offsetByCodePoints((CharSequence)text, index, codePointOffset);
|
||||
//## }
|
||||
//#endif
|
||||
public static int offsetByCodePoints(CharSequence text, int index, int codePointOffset) {
|
||||
if (index < 0 || index > text.length()) {
|
||||
throw new IndexOutOfBoundsException("index ( " + index +
|
||||
@ -6051,7 +5916,6 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
|
||||
|
||||
return index;
|
||||
}
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* Cover the JDK API, for convenience. Adjust the char index by a code point offset.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2001-2009, International Business Machines
|
||||
@ -26,19 +25,13 @@
|
||||
|
||||
package com.ibm.icu.text;
|
||||
|
||||
//#if defined(FOUNDATION10)
|
||||
//#else
|
||||
import java.awt.font.TextAttribute;
|
||||
import java.text.AttributedCharacterIterator;
|
||||
//#endif
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
import java.awt.font.NumericShaper;
|
||||
//#endif
|
||||
import java.awt.font.TextAttribute;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.MissingResourceException;
|
||||
import java.text.AttributedCharacterIterator;
|
||||
import java.util.Arrays;
|
||||
import java.util.MissingResourceException;
|
||||
|
||||
import com.ibm.icu.impl.UBiDiProps;
|
||||
import com.ibm.icu.lang.UCharacter;
|
||||
@ -3312,8 +3305,6 @@ public class Bidi {
|
||||
paraBidi = this; /* mark successful setPara */
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10)
|
||||
//#else
|
||||
/**
|
||||
* Perform the Unicode Bidi algorithm on a given paragraph, as defined in the
|
||||
* <a href="http://www.unicode.org/unicode/reports/tr9/">Unicode Standard Annex #9</a>,
|
||||
@ -3390,16 +3381,12 @@ public class Bidi {
|
||||
++i;
|
||||
}
|
||||
|
||||
//#if defined(J2SE13)
|
||||
//#else
|
||||
NumericShaper shaper = (NumericShaper) paragraph.getAttribute(TextAttribute.NUMERIC_SHAPING);
|
||||
if (shaper != null) {
|
||||
shaper.shape(txt, 0, len);
|
||||
}
|
||||
//#endif
|
||||
setPara(txt, paraLvl, lvls);
|
||||
}
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* Specify whether block separators must be allocated level zero,
|
||||
@ -4344,8 +4331,6 @@ public class Bidi {
|
||||
this(paragraph.toCharArray(), 0, null, 0, paragraph.length(), flags);
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10)
|
||||
//#else
|
||||
/**
|
||||
* Create Bidi from the given paragraph of text.<p>
|
||||
*
|
||||
@ -4377,7 +4362,6 @@ public class Bidi {
|
||||
this();
|
||||
setPara(paragraph);
|
||||
}
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* Create Bidi from the given text, embedding, and direction information.
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
****************************************************************************
|
||||
* Copyright (C) 2005-2009, International Business Machines Corporation and *
|
||||
@ -9,11 +8,7 @@
|
||||
|
||||
package com.ibm.icu.text;
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13) || defined(ECLIPSE_FRAGMENT)
|
||||
//##import com.ibm.icu.impl.ByteBuffer;
|
||||
//#else
|
||||
import java.nio.ByteBuffer;
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* This class recognizes single-byte encodings. Because the encoding scheme is so
|
||||
|
@ -1,20 +1,20 @@
|
||||
//##header
|
||||
/*********************************************************************
|
||||
* Copyright (C) 2000-2009, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
*********************************************************************
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
import com.ibm.icu.util.*;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
|
||||
import java.io.InvalidObjectException;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Locale;
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
import java.io.InvalidObjectException;
|
||||
//#endif
|
||||
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.util.Calendar;
|
||||
import com.ibm.icu.util.ChineseCalendar;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
/**
|
||||
* A concrete {@link DateFormat} for {@link com.ibm.icu.util.ChineseCalendar}.
|
||||
@ -189,8 +189,6 @@ public class ChineseDateFormat extends SimpleDateFormat {
|
||||
}
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
@ -274,5 +272,4 @@ public class ChineseDateFormat extends SimpleDateFormat {
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
@ -6,11 +6,6 @@
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
|
||||
import com.ibm.icu.impl.ICUResourceBundle;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.util.UResourceBundle;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@ -20,6 +15,10 @@ import java.util.Map;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.Set;
|
||||
|
||||
import com.ibm.icu.impl.ICUResourceBundle;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.util.UResourceBundle;
|
||||
|
||||
/**
|
||||
* This class represents the information needed by
|
||||
* DecimalFormat to format currency plural,
|
||||
@ -295,12 +294,12 @@ public class CurrencyPluralInfo implements Cloneable, Serializable {
|
||||
String pattern = currencyRes.get(index).getString();
|
||||
// replace {0} with numberStylePattern
|
||||
// and {1} with triple currency sign
|
||||
String patternWithNumber = Utility.replace(pattern, "{0}", numberStylePattern);
|
||||
String patternWithCurrencySign = Utility.replace(patternWithNumber, "{1}", tripleCurrencyStr);
|
||||
String patternWithNumber = pattern.replace("{0}", numberStylePattern);
|
||||
String patternWithCurrencySign = patternWithNumber.replace("{1}", tripleCurrencyStr);
|
||||
if (separatorIndex != -1) {
|
||||
String negPattern = pattern;
|
||||
String negWithNumber = Utility.replace(negPattern, "{0}", negNumberPattern);
|
||||
String negWithCurrSign = Utility.replace(negWithNumber, "{1}", tripleCurrencyStr);
|
||||
String negWithNumber = negPattern.replace("{0}", negNumberPattern);
|
||||
String negWithCurrSign = negWithNumber.replace("{1}", tripleCurrencyStr);
|
||||
StringBuffer posNegPatterns = new StringBuffer(patternWithCurrencySign);
|
||||
posNegPatterns.append(";");
|
||||
posNegPatterns.append(negWithCurrSign);
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
* Copyright (C) 1996-2009, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
@ -6,25 +5,21 @@
|
||||
|
||||
package com.ibm.icu.text;
|
||||
|
||||
import java.io.InvalidObjectException;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.Format;
|
||||
import java.text.ParseException;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.MissingResourceException;
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
import java.io.InvalidObjectException;
|
||||
import java.text.Format;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import com.ibm.icu.util.GregorianCalendar;
|
||||
//#endif
|
||||
import java.util.MissingResourceException;
|
||||
|
||||
import com.ibm.icu.impl.ICUResourceBundle;
|
||||
import com.ibm.icu.impl.RelativeDateFormat;
|
||||
import com.ibm.icu.util.Calendar;
|
||||
import com.ibm.icu.util.GregorianCalendar;
|
||||
import com.ibm.icu.util.TimeZone;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
@ -1537,8 +1532,6 @@ public abstract class DateFormat extends UFormat {
|
||||
return format;
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/**
|
||||
* The instances of this inner class are used as attribute keys and values
|
||||
* in AttributedCharacterIterator that
|
||||
@ -1806,6 +1799,4 @@ public abstract class DateFormat extends UFormat {
|
||||
return o;
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
}
|
||||
|
@ -1508,7 +1508,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
|
||||
String fullName = calendarClass.getName();
|
||||
int lastDot = fullName.lastIndexOf('.');
|
||||
String className = fullName.substring(lastDot+1);
|
||||
String calType = Utility.replaceAll(className, "Calendar", "").toLowerCase();
|
||||
String calType = className.replaceAll("Calendar", "").toLowerCase();
|
||||
|
||||
initializeData(locale, calType);
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
********************************************************************************
|
||||
* Copyright (C) 2006-2009, Google, International Business Machines Corporation *
|
||||
@ -7,6 +6,19 @@
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.BitSet;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import com.ibm.icu.impl.ICUCache;
|
||||
import com.ibm.icu.impl.ICUResourceBundle;
|
||||
import com.ibm.icu.impl.PatternTokenizer;
|
||||
@ -17,25 +29,6 @@ import com.ibm.icu.util.Freezable;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.util.UResourceBundle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.BitSet;
|
||||
import java.util.Collection;
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//##import java.util.HashMap;
|
||||
//#endif
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
//import java.util.LinkedHashMap;
|
||||
//import java.util.LinkedHashSet;
|
||||
//#endif
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
|
||||
/**
|
||||
* This class provides flexible generation of date format patterns, like
|
||||
* "yy-MM-dd". The user can build up the generator by adding successive
|
||||
@ -348,28 +341,11 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
|
||||
public String getBestPattern(String skeleton) {
|
||||
//if (!isComplete) complete();
|
||||
if (chineseMonthHack) {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## int monidx = skeleton.indexOf("MMM");
|
||||
//## if (monidx >= 0) {
|
||||
//## StringBuffer tmp = new StringBuffer(skeleton.substring(0, monidx));
|
||||
//## tmp.append("MM");
|
||||
//## monidx += 3;
|
||||
//## while (monidx < skeleton.length()) {
|
||||
//## if (skeleton.charAt(monidx) != 'M') {
|
||||
//## break;
|
||||
//## }
|
||||
//## monidx++;
|
||||
//## }
|
||||
//## tmp.append(skeleton.substring(monidx));
|
||||
//## skeleton = tmp.toString();
|
||||
//## }
|
||||
//#else
|
||||
skeleton = skeleton.replaceAll("MMM+", "MM");
|
||||
//#endif
|
||||
}
|
||||
// if skeleton contains meta hour field 'j', then
|
||||
// replace it with the default hour format char
|
||||
skeleton = Utility.replaceAll(skeleton, "j", String.valueOf(defaultHourFormatChar));
|
||||
skeleton = skeleton.replaceAll("j", String.valueOf(defaultHourFormatChar));
|
||||
|
||||
current.set(skeleton, fp);
|
||||
String best = getBestRaw(current, -1, _distanceInfo);
|
||||
@ -518,11 +494,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
|
||||
*/
|
||||
public Map getSkeletons(Map result) {
|
||||
if (result == null) {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## result = new HashMap();
|
||||
//#else
|
||||
// result = new LinkedHashMap();
|
||||
//#endif
|
||||
result = new LinkedHashMap();
|
||||
}
|
||||
for (Iterator it = skeleton2pattern.keySet().iterator(); it.hasNext();) {
|
||||
DateTimeMatcher item = (DateTimeMatcher) it.next();
|
||||
@ -638,11 +610,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
|
||||
public Collection getRedundants(Collection output) {
|
||||
synchronized (this) { // synchronized since a getter must be thread-safe
|
||||
if (output == null) {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## output = new HashSet();
|
||||
//#else
|
||||
// output = new LinkedHashSet();
|
||||
//#endif
|
||||
output = new LinkedHashSet();
|
||||
}
|
||||
for (Iterator it = skeleton2pattern.keySet().iterator(); it.hasNext();) {
|
||||
DateTimeMatcher cur = (DateTimeMatcher) it.next();
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -228,8 +227,6 @@ final class DigitList {
|
||||
return stringRep.toString();
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10)
|
||||
//#else
|
||||
/**
|
||||
* Return a <code>BigDecimal</code> representing the value stored in this
|
||||
* <code>DigitList</code>.
|
||||
@ -274,7 +271,6 @@ final class DigitList {
|
||||
return new java.math.BigDecimal(getStringRep(isPositive));
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* Return an <code>ICU BigDecimal</code> representing the value stored in this
|
||||
@ -724,8 +720,6 @@ final class DigitList {
|
||||
round(fixedPoint ? (maximumDigits + decimalAt) : maximumDigits == 0 ? -1 : maximumDigits);
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10)
|
||||
//#else
|
||||
/**
|
||||
* Set the digit list to a representation of the given BigDecimal value.
|
||||
* [bnf]
|
||||
@ -740,7 +734,6 @@ final class DigitList {
|
||||
int maximumDigits, boolean fixedPoint) {
|
||||
setBigDecimalDigits(source.toString(), maximumDigits, fixedPoint);
|
||||
}
|
||||
//#endif
|
||||
|
||||
/*
|
||||
* Set the digit list to a representation of the given BigDecimal value.
|
||||
|
@ -1,6 +1,3 @@
|
||||
//##header
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008-2009, Google Inc, International Business Machines Corporation
|
||||
@ -21,10 +18,10 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import com.ibm.icu.impl.CollectionUtilities.MultiComparator;
|
||||
import com.ibm.icu.lang.UCharacter;
|
||||
import com.ibm.icu.util.LocaleData;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.impl.CollectionUtilities.MultiComparator;
|
||||
|
||||
/**
|
||||
* A set of characters for use as a UI "index", that is, a
|
||||
@ -271,4 +268,3 @@ public class IndexCharacters {
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
**********************************************************************
|
||||
* Copyright (c) 2004-2009, International Business Machines
|
||||
@ -14,29 +13,25 @@ package com.ibm.icu.text;
|
||||
import java.io.IOException;
|
||||
import java.io.InvalidObjectException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.text.AttributedCharacterIterator;
|
||||
import java.text.AttributedString;
|
||||
import java.text.CharacterIterator;
|
||||
import java.text.ChoiceFormat;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.Format;
|
||||
import java.text.ParseException;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
import java.text.AttributedCharacterIterator;
|
||||
import java.text.AttributedString;
|
||||
import java.util.ArrayList;
|
||||
import java.text.CharacterIterator;
|
||||
//#endif
|
||||
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.text.UnicodeSet;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
/**
|
||||
@ -1177,8 +1172,6 @@ public class MessageFormat extends UFormat {
|
||||
}
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/**
|
||||
* Formats an array of objects and inserts them into the
|
||||
* <code>MessageFormat</code>'s pattern, producing an
|
||||
@ -1234,7 +1227,6 @@ public class MessageFormat extends UFormat {
|
||||
(AttributedCharacterIterator[])iterators.toArray(
|
||||
new AttributedCharacterIterator[iterators.size()]));
|
||||
}
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* Parses the string.
|
||||
@ -1528,8 +1520,6 @@ public class MessageFormat extends UFormat {
|
||||
return pattern.hashCode(); // enough for reasonable distribution
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/**
|
||||
* Defines constants that are used as attribute keys in the
|
||||
* <code>AttributedCharacterIterator</code> returned
|
||||
@ -1583,7 +1573,6 @@ public class MessageFormat extends UFormat {
|
||||
public static final Field ARGUMENT = new Field("message argument field");
|
||||
|
||||
}
|
||||
//#endif
|
||||
|
||||
// ===========================privates============================
|
||||
|
||||
@ -1687,10 +1676,8 @@ public class MessageFormat extends UFormat {
|
||||
// note: this implementation assumes a fast substring & index.
|
||||
// if this is not true, would be better to append chars one by one.
|
||||
int lastOffset = 0;
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
int last = result.length();
|
||||
//#endif
|
||||
|
||||
for (int i = 0; i <= maxOffset; ++i) {
|
||||
result.append(pattern.substring(lastOffset, offsets[i]));
|
||||
lastOffset = offsets[i];
|
||||
@ -1741,12 +1728,6 @@ public class MessageFormat extends UFormat {
|
||||
// is non-null indicating we should format obj using it,
|
||||
// or arg is non-null and we should use it as the value.
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//## if (subFormatter != null) {
|
||||
//## arg = subFormatter.format(obj);
|
||||
//## }
|
||||
//## result.append(arg);
|
||||
//#else
|
||||
if (characterIterators != null) {
|
||||
// If characterIterators is non-null, it indicates we need
|
||||
// to get the CharacterIterator from the child formatter.
|
||||
@ -1791,22 +1772,16 @@ public class MessageFormat extends UFormat {
|
||||
}
|
||||
last = result.length();
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
result.append(pattern.substring(lastOffset, pattern.length()));
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
if (characterIterators != null && last != result.length()) {
|
||||
characterIterators.add(_createAttributedCharacterIterator(
|
||||
result.substring(last)));
|
||||
}
|
||||
//#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/**
|
||||
* Convenience method to append all the characters in
|
||||
* <code>iterator</code> to the StringBuffer <code>result</code>.
|
||||
@ -1821,7 +1796,6 @@ public class MessageFormat extends UFormat {
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
private static final String[] typeList =
|
||||
{"", "number", "date", "time", "choice", "spellout", "ordinal",
|
||||
@ -2267,8 +2241,6 @@ public class MessageFormat extends UFormat {
|
||||
return new String(buf);
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
//
|
||||
// private methods for AttributedCharacterIterator support
|
||||
//
|
||||
@ -2340,5 +2312,4 @@ public class MessageFormat extends UFormat {
|
||||
as.addAttribute(key, value);
|
||||
return as.getIterator();
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -14,19 +13,15 @@ import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.math.BigInteger;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.Format;
|
||||
import java.text.ParseException;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Collections;
|
||||
import java.util.Locale;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.Set;
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
import java.text.Format;
|
||||
//#endif
|
||||
|
||||
import com.ibm.icu.impl.ICUResourceBundle;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.util.Currency;
|
||||
import com.ibm.icu.util.CurrencyAmount;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
@ -247,11 +242,8 @@ public abstract class NumberFormat extends UFormat {
|
||||
return format(((Long)number).longValue(), toAppendTo, pos);
|
||||
} else if (number instanceof BigInteger) {
|
||||
return format((BigInteger) number, toAppendTo, pos);
|
||||
//#if defined(FOUNDATION10)
|
||||
//#else
|
||||
} else if (number instanceof java.math.BigDecimal) {
|
||||
return format((java.math.BigDecimal) number, toAppendTo, pos);
|
||||
//#endif
|
||||
} else if (number instanceof com.ibm.icu.math.BigDecimal) {
|
||||
return format((com.ibm.icu.math.BigDecimal) number, toAppendTo, pos);
|
||||
} else if (number instanceof CurrencyAmount) {
|
||||
@ -294,7 +286,6 @@ public abstract class NumberFormat extends UFormat {
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
// [NEW]
|
||||
/**
|
||||
* Convenience method to format a BigInteger.
|
||||
* @stable ICU 2.0
|
||||
@ -304,9 +295,6 @@ public abstract class NumberFormat extends UFormat {
|
||||
new FieldPosition(0)).toString();
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10)
|
||||
//#else
|
||||
// [NEW]
|
||||
/**
|
||||
* Convenience method to format a BigDecimal.
|
||||
* @stable ICU 2.0
|
||||
@ -315,9 +303,7 @@ public abstract class NumberFormat extends UFormat {
|
||||
return format(number, new StringBuffer(),
|
||||
new FieldPosition(0)).toString();
|
||||
}
|
||||
//#endif
|
||||
|
||||
// [NEW]
|
||||
/**
|
||||
* Convenience method to format an ICU BigDecimal.
|
||||
* @stable ICU 2.0
|
||||
@ -327,7 +313,6 @@ public abstract class NumberFormat extends UFormat {
|
||||
new FieldPosition(0)).toString();
|
||||
}
|
||||
|
||||
// [NEW]
|
||||
/**
|
||||
* Convenience method to format a CurrencyAmount.
|
||||
* @stable ICU 3.0
|
||||
@ -354,7 +339,6 @@ public abstract class NumberFormat extends UFormat {
|
||||
public abstract StringBuffer format(long number,
|
||||
StringBuffer toAppendTo,
|
||||
FieldPosition pos);
|
||||
// [NEW]
|
||||
/**
|
||||
* Format a BigInteger.
|
||||
* @see java.text.Format#format(Object, StringBuffer, FieldPosition)
|
||||
@ -363,10 +347,6 @@ public abstract class NumberFormat extends UFormat {
|
||||
public abstract StringBuffer format(BigInteger number,
|
||||
StringBuffer toAppendTo,
|
||||
FieldPosition pos);
|
||||
//#if defined(FOUNDATION10)
|
||||
//#else
|
||||
|
||||
// [NEW]
|
||||
/**
|
||||
* Format a BigDecimal.
|
||||
* @see java.text.Format#format(Object, StringBuffer, FieldPosition)
|
||||
@ -375,9 +355,6 @@ public abstract class NumberFormat extends UFormat {
|
||||
public abstract StringBuffer format(java.math.BigDecimal number,
|
||||
StringBuffer toAppendTo,
|
||||
FieldPosition pos);
|
||||
//#endif
|
||||
|
||||
// [NEW]
|
||||
/**
|
||||
* Format a BigDecimal.
|
||||
* @see java.text.Format#format(Object, StringBuffer, FieldPosition)
|
||||
@ -386,7 +363,6 @@ public abstract class NumberFormat extends UFormat {
|
||||
public abstract StringBuffer format(com.ibm.icu.math.BigDecimal number,
|
||||
StringBuffer toAppendTo,
|
||||
FieldPosition pos);
|
||||
// [NEW]
|
||||
/**
|
||||
* Format a CurrencyAmount.
|
||||
* @see java.text.Format#format(Object, StringBuffer, FieldPosition)
|
||||
@ -440,7 +416,6 @@ public abstract class NumberFormat extends UFormat {
|
||||
return result;
|
||||
}
|
||||
|
||||
// [NEW]
|
||||
/**
|
||||
* Parses text from the given string as a CurrencyAmount. Unlike
|
||||
* the parse() method, this method will attempt to parse a generic
|
||||
@ -708,7 +683,6 @@ public abstract class NumberFormat extends UFormat {
|
||||
return getInstance(inLocale, PERCENTSTYLE);
|
||||
}
|
||||
|
||||
// [NEW]
|
||||
/**
|
||||
* Returns a scientific format for the current default locale.
|
||||
* @return a scientific number format
|
||||
@ -718,7 +692,6 @@ public abstract class NumberFormat extends UFormat {
|
||||
return getInstance(ULocale.getDefault(), SCIENTIFICSTYLE);
|
||||
}
|
||||
|
||||
// [NEW]
|
||||
/**
|
||||
* Returns a scientific format for the specified locale.
|
||||
* @return a scientific number format
|
||||
@ -728,7 +701,6 @@ public abstract class NumberFormat extends UFormat {
|
||||
return getInstance(ULocale.forLocale(inLocale), SCIENTIFICSTYLE);
|
||||
}
|
||||
|
||||
// [NEW]
|
||||
/**
|
||||
* Returns a scientific format for the specified locale.
|
||||
* @return a scientific number format
|
||||
@ -1290,7 +1262,6 @@ public abstract class NumberFormat extends UFormat {
|
||||
|
||||
// =======================privates===============================
|
||||
// Hook for service
|
||||
// [NEW]
|
||||
static NumberFormat createInstance(ULocale desiredLocale, int choice) {
|
||||
// If the choice is PLURALCURRENCYSTYLE, the pattern is not a single
|
||||
// pattern, it is a pattern set, so we do not need to get them here.
|
||||
@ -1315,7 +1286,7 @@ public abstract class NumberFormat extends UFormat {
|
||||
// replace single currency sign in the pattern with double currency sign
|
||||
// if the choice is ISOCURRENCYSTYLE.
|
||||
if (choice == ISOCURRENCYSTYLE) {
|
||||
pattern = Utility.replace(pattern, "\u00A4", doubleCurrencyStr);
|
||||
pattern = pattern.replace("\u00A4", doubleCurrencyStr);
|
||||
}
|
||||
|
||||
NumberingSystem ns = NumberingSystem.getInstance(desiredLocale);
|
||||
@ -1715,8 +1686,6 @@ public abstract class NumberFormat extends UFormat {
|
||||
// new in ICU4J 3.6
|
||||
private boolean parseStrict;
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/**
|
||||
* The instances of this inner class are used as attribute keys and values
|
||||
* in AttributedCharacterIterator that
|
||||
@ -1826,5 +1795,4 @@ public abstract class NumberFormat extends UFormat {
|
||||
throw new InvalidObjectException("An invalid object.");
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2004-2006, International Business Machines Corporation and *
|
||||
* Copyright (C) 2004-2009, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
package com.ibm.icu.text;
|
||||
|
||||
import com.ibm.icu.impl.Utility;
|
||||
|
||||
/**
|
||||
* A post-processor for Chinese text.
|
||||
*/
|
||||
@ -47,7 +45,7 @@ final class RBNFChinesePostProcessor implements RBNFPostProcessor {
|
||||
}
|
||||
|
||||
if (longForm) {
|
||||
for (int i = Utility.indexOf(buf,"*"); i != -1; i = Utility.indexOf(buf, "*", i)) {
|
||||
for (int i = buf.indexOf("*"); i != -1; i = buf.indexOf("*", i)) {
|
||||
buf.delete(i, i+1);
|
||||
}
|
||||
return;
|
||||
@ -81,14 +79,14 @@ final class RBNFChinesePostProcessor implements RBNFPostProcessor {
|
||||
{
|
||||
String[] m = markers[format];
|
||||
for (int i = 0; i < m.length-1; ++i) {
|
||||
int n = Utility.indexOf(buf, m[i]);
|
||||
int n = buf.indexOf(m[i]);
|
||||
if (n != -1) {
|
||||
buf.insert(n+m[i].length(), '|');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int x = Utility.indexOf(buf, DIAN);
|
||||
int x = buf.indexOf(DIAN);
|
||||
if (x == -1) {
|
||||
x = buf.length();
|
||||
}
|
||||
@ -96,8 +94,8 @@ final class RBNFChinesePostProcessor implements RBNFPostProcessor {
|
||||
int n = -1; // previous optional ling
|
||||
String ling = markers[format][3];
|
||||
while (x >= 0) {
|
||||
int m = Utility.lastIndexOf(buf, "|", x);
|
||||
int nn = Utility.lastIndexOf(buf, ling, x);
|
||||
int m = buf.lastIndexOf("|", x);
|
||||
int nn = buf.lastIndexOf(ling, x);
|
||||
int ns = 0;
|
||||
if (nn > m) {
|
||||
ns = (nn > 0 && buf.charAt(nn-1) != '*') ? 2 : 1;
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -8,17 +7,12 @@
|
||||
package com.ibm.icu.text;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.text.CharacterIterator;
|
||||
import java.text.ParseException;
|
||||
import java.util.Arrays;
|
||||
import java.util.MissingResourceException;
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13) || defined(ECLIPSE_FRAGMENT)
|
||||
//##import com.ibm.icu.impl.ByteBuffer;
|
||||
//#else
|
||||
import java.nio.ByteBuffer;
|
||||
//#endif
|
||||
|
||||
import com.ibm.icu.impl.BOCU;
|
||||
import com.ibm.icu.impl.ICUDebug;
|
||||
import com.ibm.icu.impl.ICUResourceBundle;
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -8,14 +7,6 @@
|
||||
|
||||
package com.ibm.icu.text;
|
||||
|
||||
import com.ibm.icu.impl.ICUDebug;
|
||||
import com.ibm.icu.impl.ICUResourceBundle;
|
||||
import com.ibm.icu.impl.UCharacterProperty;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.util.UResourceBundle;
|
||||
import com.ibm.icu.util.UResourceBundleIterator;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParsePosition;
|
||||
@ -26,6 +17,13 @@ import java.util.Map;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.Set;
|
||||
|
||||
import com.ibm.icu.impl.ICUDebug;
|
||||
import com.ibm.icu.impl.ICUResourceBundle;
|
||||
import com.ibm.icu.impl.UCharacterProperty;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.util.UResourceBundle;
|
||||
import com.ibm.icu.util.UResourceBundleIterator;
|
||||
|
||||
|
||||
/**
|
||||
* <p>A class that formats numbers according to a set of rules. This number formatter is
|
||||
@ -1131,8 +1129,6 @@ public class RuleBasedNumberFormat extends NumberFormat {
|
||||
return format(new com.ibm.icu.math.BigDecimal(number), toAppendTo, pos);
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10)
|
||||
//#else
|
||||
/**
|
||||
* <strong><font face=helvetica color=red>NEW</font></strong>
|
||||
* Implement com.ibm.icu.text.NumberFormat:
|
||||
@ -1144,7 +1140,6 @@ public class RuleBasedNumberFormat extends NumberFormat {
|
||||
FieldPosition pos) {
|
||||
return format(new com.ibm.icu.math.BigDecimal(number), toAppendTo, pos);
|
||||
}
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* <strong><font face=helvetica color=red>NEW</font></strong>
|
||||
@ -1432,7 +1427,7 @@ public class RuleBasedNumberFormat extends NumberFormat {
|
||||
*/
|
||||
private String extractSpecial(StringBuffer description, String specialName) {
|
||||
String result = null;
|
||||
int lp = Utility.indexOf(description, specialName);
|
||||
int lp = description.indexOf(specialName);
|
||||
if (lp != -1) {
|
||||
// we've got to make sure we're not in the middle of a rule
|
||||
// (where specialName would actually get treated as
|
||||
@ -1441,7 +1436,7 @@ public class RuleBasedNumberFormat extends NumberFormat {
|
||||
// locate the beginning and end of the actual special
|
||||
// rules (there may be whitespace between the name and
|
||||
// the first token in the description)
|
||||
int lpEnd = Utility.indexOf(description, ";%", lp);
|
||||
int lpEnd = description.indexOf(";%", lp);
|
||||
|
||||
if (lpEnd == -1) {
|
||||
lpEnd = description.length() - 1; // later we add 1 back to get the '%'
|
||||
@ -1492,7 +1487,7 @@ public class RuleBasedNumberFormat extends NumberFormat {
|
||||
// rule sets (";%" marks the end of one rule set and the beginning
|
||||
// of the next)
|
||||
int numRuleSets = 0;
|
||||
for (int p = Utility.indexOf(descBuf, ";%"); p != -1; p = Utility.indexOf(descBuf, ";%", p)) {
|
||||
for (int p = descBuf.indexOf(";%"); p != -1; p = descBuf.indexOf(";%", p)) {
|
||||
++numRuleSets;
|
||||
++p;
|
||||
}
|
||||
@ -1512,7 +1507,7 @@ public class RuleBasedNumberFormat extends NumberFormat {
|
||||
|
||||
int curRuleSet = 0;
|
||||
int start = 0;
|
||||
for (int p = Utility.indexOf(descBuf, ";%"); p != -1; p = Utility.indexOf(descBuf, ";%", start)) {
|
||||
for (int p = descBuf.indexOf(";%"); p != -1; p = descBuf.indexOf(";%", start)) {
|
||||
ruleSetDescriptions[curRuleSet] = descBuf.substring(start, p + 1);
|
||||
ruleSets[curRuleSet] = new NFRuleSet(ruleSetDescriptions, curRuleSet);
|
||||
++curRuleSet;
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -12,22 +11,18 @@ import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.lang.Character;
|
||||
import java.text.AttributedCharacterIterator;
|
||||
import java.text.AttributedString;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.Format;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.MissingResourceException;
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
import java.text.AttributedCharacterIterator;
|
||||
import java.text.AttributedString;
|
||||
import java.text.Format;
|
||||
import java.util.LinkedList;
|
||||
//#endif
|
||||
|
||||
import com.ibm.icu.impl.CalendarData;
|
||||
import com.ibm.icu.impl.DateNumberFormat;
|
||||
@ -676,21 +671,16 @@ public class SimpleDateFormat extends DateFormat {
|
||||
toAppendTo.append((String)items[i]);
|
||||
} else {
|
||||
PatternItem item = (PatternItem)items[i];
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
int start = 0;
|
||||
if (attributes != null) {
|
||||
// Save the current length
|
||||
start = toAppendTo.length();
|
||||
}
|
||||
//#endif
|
||||
if (useFastFormat) {
|
||||
subFormat(toAppendTo, item.type, item.length, toAppendTo.length(), pos, cal);
|
||||
} else {
|
||||
toAppendTo.append(subFormat(item.type, item.length, toAppendTo.length(), pos, formatData, cal));
|
||||
}
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
if (attributes != null) {
|
||||
// Check the sub format length
|
||||
int end = toAppendTo.length();
|
||||
@ -703,7 +693,6 @@ public class SimpleDateFormat extends DateFormat {
|
||||
attributes.add(fp);
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
return toAppendTo;
|
||||
@ -759,8 +748,6 @@ public class SimpleDateFormat extends DateFormat {
|
||||
/*V*/ DateFormat.TIMEZONE_SPECIAL_FIELD,
|
||||
};
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
// Map pattern character index to DateFormat.Field
|
||||
private static final DateFormat.Field[] PATTERN_INDEX_TO_DATE_FORMAT_ATTRIBUTE = {
|
||||
/*GyM*/ DateFormat.Field.ERA, DateFormat.Field.YEAR, DateFormat.Field.MONTH,
|
||||
@ -797,7 +784,6 @@ public class SimpleDateFormat extends DateFormat {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* Format a single field, given its pattern character. Subclasses may
|
||||
@ -879,10 +865,11 @@ public class SimpleDateFormat extends DateFormat {
|
||||
* patterns with 4 or more than 4 'y' characters in the same way.
|
||||
* So I change the codes to meet the specification. [Richard/GCl]
|
||||
*/
|
||||
if (count == 2)
|
||||
if (count == 2) {
|
||||
zeroPaddingNumber(currentNumberFormat,buf, value, 2, 2); // clip 1996 to 96
|
||||
else //count = 1 or count > 2
|
||||
} else { //count = 1 or count > 2
|
||||
zeroPaddingNumber(currentNumberFormat,buf, value, count, maxIntCount);
|
||||
}
|
||||
break;
|
||||
case 2: // 'M' - MONTH
|
||||
if (count == 5) {
|
||||
@ -896,12 +883,13 @@ public class SimpleDateFormat extends DateFormat {
|
||||
}
|
||||
break;
|
||||
case 4: // 'k' - HOUR_OF_DAY (1..24)
|
||||
if (value == 0)
|
||||
if (value == 0) {
|
||||
zeroPaddingNumber(currentNumberFormat,buf,
|
||||
cal.getMaximum(Calendar.HOUR_OF_DAY)+1,
|
||||
count, maxIntCount);
|
||||
else
|
||||
} else {
|
||||
zeroPaddingNumber(currentNumberFormat,buf, value, count, maxIntCount);
|
||||
}
|
||||
break;
|
||||
case 8: // 'S' - FRACTIONAL_SECOND
|
||||
// Fractional seconds left-justify
|
||||
@ -943,12 +931,13 @@ public class SimpleDateFormat extends DateFormat {
|
||||
safeAppend(formatData.ampms, value, buf);
|
||||
break;
|
||||
case 15: // 'h' - HOUR (1..12)
|
||||
if (value == 0)
|
||||
if (value == 0) {
|
||||
zeroPaddingNumber(currentNumberFormat,buf,
|
||||
cal.getLeastMaximum(Calendar.HOUR)+1,
|
||||
count, maxIntCount);
|
||||
else
|
||||
} else {
|
||||
zeroPaddingNumber(currentNumberFormat,buf, value, count, maxIntCount);
|
||||
}
|
||||
break;
|
||||
case 17: // 'z' - ZONE_OFFSET
|
||||
if (count < 4) {
|
||||
@ -1101,14 +1090,10 @@ public class SimpleDateFormat extends DateFormat {
|
||||
if (pos.getField() == PATTERN_INDEX_TO_DATE_FORMAT_FIELD[patternCharIndex]) {
|
||||
pos.setBeginIndex(beginOffset);
|
||||
pos.setEndIndex(beginOffset + buf.length() - bufstart);
|
||||
}
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
else if (pos.getFieldAttribute() == PATTERN_INDEX_TO_DATE_FORMAT_ATTRIBUTE[patternCharIndex]) {
|
||||
} else if (pos.getFieldAttribute() == PATTERN_INDEX_TO_DATE_FORMAT_ATTRIBUTE[patternCharIndex]) {
|
||||
pos.setBeginIndex(beginOffset);
|
||||
pos.setEndIndex(beginOffset + buf.length() - bufstart);
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -2107,14 +2092,15 @@ public class SimpleDateFormat extends DateFormat {
|
||||
{
|
||||
// It would be good to unify this with the obeyCount logic below,
|
||||
// but that's going to be difficult.
|
||||
if (obeyCount)
|
||||
{
|
||||
if (obeyCount) {
|
||||
if ((start+count) > text.length()) return -start;
|
||||
number = parseInt(text, count, pos, allowNegative,currentNumberFormat);
|
||||
}
|
||||
else number = parseInt(text, pos, allowNegative,currentNumberFormat);
|
||||
if (number == null)
|
||||
} else {
|
||||
number = parseInt(text, pos, allowNegative,currentNumberFormat);
|
||||
}
|
||||
if (number == null) {
|
||||
return -start;
|
||||
}
|
||||
value = number.intValue();
|
||||
}
|
||||
|
||||
@ -2154,54 +2140,50 @@ public class SimpleDateFormat extends DateFormat {
|
||||
cal.set(Calendar.YEAR, value);
|
||||
return pos.getIndex();
|
||||
case 2: // 'M' - MONTH
|
||||
if (count <= 2) // i.e., M or MM.
|
||||
{
|
||||
// Don't want to parse the month if it is a string
|
||||
// while pattern uses numeric style: M or MM.
|
||||
// [We computed 'value' above.]
|
||||
cal.set(Calendar.MONTH, value - 1);
|
||||
return pos.getIndex();
|
||||
}
|
||||
else
|
||||
{
|
||||
// count >= 3 // i.e., MMM or MMMM
|
||||
// Want to be able to parse both short and long forms.
|
||||
// Try count == 4 first:
|
||||
int newStart = matchString(text, start, Calendar.MONTH,
|
||||
formatData.months, cal);
|
||||
if (newStart > 0) {
|
||||
return newStart;
|
||||
} else { // count == 4 failed, now try count == 3
|
||||
return matchString(text, start, Calendar.MONTH,
|
||||
formatData.shortMonths, cal);
|
||||
}
|
||||
if (count <= 2) { // i.e., M or MM.
|
||||
// Don't want to parse the month if it is a string
|
||||
// while pattern uses numeric style: M or MM.
|
||||
// [We computed 'value' above.]
|
||||
cal.set(Calendar.MONTH, value - 1);
|
||||
return pos.getIndex();
|
||||
} else {
|
||||
// count >= 3 // i.e., MMM or MMMM
|
||||
// Want to be able to parse both short and long forms.
|
||||
// Try count == 4 first:
|
||||
int newStart = matchString(text, start, Calendar.MONTH,
|
||||
formatData.months, cal);
|
||||
if (newStart > 0) {
|
||||
return newStart;
|
||||
} else { // count == 4 failed, now try count == 3
|
||||
return matchString(text, start, Calendar.MONTH,
|
||||
formatData.shortMonths, cal);
|
||||
}
|
||||
}
|
||||
case 26: // 'L' - STAND_ALONE_MONTH
|
||||
if (count <= 2) // i.e., M or MM.
|
||||
{
|
||||
// Don't want to parse the month if it is a string
|
||||
// while pattern uses numeric style: M or MM.
|
||||
// [We computed 'value' above.]
|
||||
cal.set(Calendar.MONTH, value - 1);
|
||||
return pos.getIndex();
|
||||
}
|
||||
else
|
||||
{
|
||||
// count >= 3 // i.e., MMM or MMMM
|
||||
// Want to be able to parse both short and long forms.
|
||||
// Try count == 4 first:
|
||||
int newStart = matchString(text, start, Calendar.MONTH,
|
||||
formatData.standaloneMonths, cal);
|
||||
if (newStart > 0) {
|
||||
return newStart;
|
||||
} else { // count == 4 failed, now try count == 3
|
||||
return matchString(text, start, Calendar.MONTH,
|
||||
formatData.standaloneShortMonths, cal);
|
||||
}
|
||||
if (count <= 2) { // i.e., M or MM.
|
||||
// Don't want to parse the month if it is a string
|
||||
// while pattern uses numeric style: M or MM.
|
||||
// [We computed 'value' above.]
|
||||
cal.set(Calendar.MONTH, value - 1);
|
||||
return pos.getIndex();
|
||||
} else {
|
||||
// count >= 3 // i.e., MMM or MMMM
|
||||
// Want to be able to parse both short and long forms.
|
||||
// Try count == 4 first:
|
||||
int newStart = matchString(text, start, Calendar.MONTH,
|
||||
formatData.standaloneMonths, cal);
|
||||
if (newStart > 0) {
|
||||
return newStart;
|
||||
} else { // count == 4 failed, now try count == 3
|
||||
return matchString(text, start, Calendar.MONTH,
|
||||
formatData.standaloneShortMonths, cal);
|
||||
}
|
||||
}
|
||||
case 4: // 'k' - HOUR_OF_DAY (1..24)
|
||||
// [We computed 'value' above.]
|
||||
if (value == cal.getMaximum(Calendar.HOUR_OF_DAY)+1) value = 0;
|
||||
if (value == cal.getMaximum(Calendar.HOUR_OF_DAY)+1) {
|
||||
value = 0;
|
||||
}
|
||||
cal.set(Calendar.HOUR_OF_DAY, value);
|
||||
return pos.getIndex();
|
||||
case 8: // 'S' - FRACTIONAL_SECOND
|
||||
@ -2250,171 +2232,170 @@ public class SimpleDateFormat extends DateFormat {
|
||||
return matchString(text, start, Calendar.AM_PM, formatData.ampms, cal);
|
||||
case 15: // 'h' - HOUR (1..12)
|
||||
// [We computed 'value' above.]
|
||||
if (value == cal.getLeastMaximum(Calendar.HOUR)+1) value = 0;
|
||||
if (value == cal.getLeastMaximum(Calendar.HOUR)+1) {
|
||||
value = 0;
|
||||
}
|
||||
cal.set(Calendar.HOUR, value);
|
||||
return pos.getIndex();
|
||||
case 17: // 'z' - ZONE_OFFSET
|
||||
case 23: // 'Z' - TIMEZONE_RFC
|
||||
case 24: // 'v' - TIMEZONE_GENERIC
|
||||
case 29: // 'V' - TIMEZONE_SPECIAL
|
||||
{
|
||||
TimeZone tz = null;
|
||||
int offset = 0;
|
||||
boolean parsed = false;
|
||||
{
|
||||
TimeZone tz = null;
|
||||
int offset = 0;
|
||||
boolean parsed = false;
|
||||
|
||||
// Step 1
|
||||
// Check if this is a long GMT offset string (either localized or default)
|
||||
Integer gmtoff = parseGMT(text, pos, currentNumberFormat);
|
||||
if (gmtoff != null) {
|
||||
offset = gmtoff.intValue();
|
||||
parsed = true;
|
||||
}
|
||||
|
||||
if (!parsed) {
|
||||
// Step 2
|
||||
// Check if this is an RFC822 time zone offset.
|
||||
// ICU supports the standard RFC822 format [+|-]HHmm
|
||||
// and its extended form [+|-]HHmmSS.
|
||||
|
||||
do {
|
||||
int sign = 0;
|
||||
char signChar = text.charAt(start);
|
||||
if (signChar == '+') {
|
||||
sign = 1;
|
||||
} else if (signChar == '-') {
|
||||
sign = -1;
|
||||
} else {
|
||||
// Not an RFC822 offset string
|
||||
break;
|
||||
}
|
||||
|
||||
// Parse digits
|
||||
int orgPos = start + 1;
|
||||
pos.setIndex(orgPos);
|
||||
number = parseInt(text, 6, pos, false,currentNumberFormat);
|
||||
int numLen = pos.getIndex() - orgPos;
|
||||
if (numLen <= 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
// Followings are possible format (excluding sign char)
|
||||
// HHmmSS
|
||||
// HmmSS
|
||||
// HHmm
|
||||
// Hmm
|
||||
// HH
|
||||
// H
|
||||
int val = number.intValue();
|
||||
int hour = 0, min = 0, sec = 0;
|
||||
switch(numLen) {
|
||||
case 1: // H
|
||||
case 2: // HH
|
||||
hour = val;
|
||||
break;
|
||||
case 3: // Hmm
|
||||
case 4: // HHmm
|
||||
hour = val / 100;
|
||||
min = val % 100;
|
||||
break;
|
||||
case 5: // Hmmss
|
||||
case 6: // HHmmss
|
||||
hour = val / 10000;
|
||||
min = (val % 10000) / 100;
|
||||
sec = val % 100;
|
||||
break;
|
||||
}
|
||||
if (hour > 23 || min > 59 || sec > 59) {
|
||||
// Invalid value range
|
||||
break;
|
||||
}
|
||||
offset = (((hour * 60) + min) * 60 + sec) * 1000 * sign;
|
||||
parsed = true;
|
||||
} while (false);
|
||||
|
||||
if (!parsed) {
|
||||
// Failed to parse. Reset the position.
|
||||
pos.setIndex(start);
|
||||
}
|
||||
}
|
||||
|
||||
if (parsed) {
|
||||
// offset was successfully parsed as either a long GMT string or RFC822 zone offset
|
||||
// string. Create normalized zone ID for the offset.
|
||||
tz = ZoneMeta.getCustomTimeZone(offset);
|
||||
cal.setTimeZone(tz);
|
||||
return pos.getIndex();
|
||||
}
|
||||
|
||||
// Step 3
|
||||
// At this point, check for named time zones by looking through
|
||||
// the locale data from the DateFormatZoneData strings.
|
||||
// Want to be able to parse both short and long forms.
|
||||
// optimize for calendar's current time zone
|
||||
ZoneStringInfo zsinfo = null;
|
||||
switch (patternCharIndex) {
|
||||
case 17: // 'z' - ZONE_OFFSET
|
||||
if (count < 4) {
|
||||
zsinfo = formatData.getZoneStringFormat().findSpecificShort(text, start);
|
||||
} else {
|
||||
zsinfo = formatData.getZoneStringFormat().findSpecificLong(text, start);
|
||||
}
|
||||
break;
|
||||
case 24: // 'v' - TIMEZONE_GENERIC
|
||||
if (count == 1) {
|
||||
zsinfo = formatData.getZoneStringFormat().findGenericShort(text, start);
|
||||
} else if (count == 4) {
|
||||
zsinfo = formatData.getZoneStringFormat().findGenericLong(text, start);
|
||||
}
|
||||
break;
|
||||
case 29: // 'V' - TIMEZONE_SPECIAL
|
||||
if (count == 1) {
|
||||
zsinfo = formatData.getZoneStringFormat().findSpecificShort(text, start);
|
||||
} else if (count == 4) {
|
||||
zsinfo = formatData.getZoneStringFormat().findGenericLocation(text, start);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (zsinfo != null) {
|
||||
if (zsinfo.isStandard()) {
|
||||
tztype = TZTYPE_STD;
|
||||
} else if (zsinfo.isDaylight()) {
|
||||
tztype = TZTYPE_DST;
|
||||
}
|
||||
tz = TimeZone.getTimeZone(zsinfo.getID());
|
||||
cal.setTimeZone(tz);
|
||||
return start + zsinfo.getString().length();
|
||||
}
|
||||
// Step 4
|
||||
// Final attempt - is this standalone GMT/UT/UTC?
|
||||
int gmtLen = 0;
|
||||
if (text.regionMatches(true, start, STR_GMT, 0, STR_GMT_LEN)) {
|
||||
gmtLen = STR_GMT_LEN;
|
||||
} else if (text.regionMatches(true, start, STR_UTC, 0, STR_UTC_LEN)) {
|
||||
gmtLen = STR_UTC_LEN;
|
||||
} else if (text.regionMatches(true, start, STR_UT, 0, STR_UT_LEN)) {
|
||||
gmtLen = STR_UT_LEN;
|
||||
}
|
||||
if (gmtLen > 0) {
|
||||
tz = TimeZone.getTimeZone("Etc/GMT");
|
||||
cal.setTimeZone(tz);
|
||||
return start + gmtLen;
|
||||
}
|
||||
|
||||
// complete failure
|
||||
return -start;
|
||||
// Step 1
|
||||
// Check if this is a long GMT offset string (either localized or default)
|
||||
Integer gmtoff = parseGMT(text, pos, currentNumberFormat);
|
||||
if (gmtoff != null) {
|
||||
offset = gmtoff.intValue();
|
||||
parsed = true;
|
||||
}
|
||||
|
||||
if (!parsed) {
|
||||
// Step 2
|
||||
// Check if this is an RFC822 time zone offset.
|
||||
// ICU supports the standard RFC822 format [+|-]HHmm
|
||||
// and its extended form [+|-]HHmmSS.
|
||||
|
||||
do {
|
||||
int sign = 0;
|
||||
char signChar = text.charAt(start);
|
||||
if (signChar == '+') {
|
||||
sign = 1;
|
||||
} else if (signChar == '-') {
|
||||
sign = -1;
|
||||
} else {
|
||||
// Not an RFC822 offset string
|
||||
break;
|
||||
}
|
||||
|
||||
// Parse digits
|
||||
int orgPos = start + 1;
|
||||
pos.setIndex(orgPos);
|
||||
number = parseInt(text, 6, pos, false,currentNumberFormat);
|
||||
int numLen = pos.getIndex() - orgPos;
|
||||
if (numLen <= 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
// Followings are possible format (excluding sign char)
|
||||
// HHmmSS
|
||||
// HmmSS
|
||||
// HHmm
|
||||
// Hmm
|
||||
// HH
|
||||
// H
|
||||
int val = number.intValue();
|
||||
int hour = 0, min = 0, sec = 0;
|
||||
switch(numLen) {
|
||||
case 1: // H
|
||||
case 2: // HH
|
||||
hour = val;
|
||||
break;
|
||||
case 3: // Hmm
|
||||
case 4: // HHmm
|
||||
hour = val / 100;
|
||||
min = val % 100;
|
||||
break;
|
||||
case 5: // Hmmss
|
||||
case 6: // HHmmss
|
||||
hour = val / 10000;
|
||||
min = (val % 10000) / 100;
|
||||
sec = val % 100;
|
||||
break;
|
||||
}
|
||||
if (hour > 23 || min > 59 || sec > 59) {
|
||||
// Invalid value range
|
||||
break;
|
||||
}
|
||||
offset = (((hour * 60) + min) * 60 + sec) * 1000 * sign;
|
||||
parsed = true;
|
||||
} while (false);
|
||||
|
||||
if (!parsed) {
|
||||
// Failed to parse. Reset the position.
|
||||
pos.setIndex(start);
|
||||
}
|
||||
}
|
||||
|
||||
if (parsed) {
|
||||
// offset was successfully parsed as either a long GMT string or RFC822 zone offset
|
||||
// string. Create normalized zone ID for the offset.
|
||||
tz = ZoneMeta.getCustomTimeZone(offset);
|
||||
cal.setTimeZone(tz);
|
||||
return pos.getIndex();
|
||||
}
|
||||
|
||||
// Step 3
|
||||
// At this point, check for named time zones by looking through
|
||||
// the locale data from the DateFormatZoneData strings.
|
||||
// Want to be able to parse both short and long forms.
|
||||
// optimize for calendar's current time zone
|
||||
ZoneStringInfo zsinfo = null;
|
||||
switch (patternCharIndex) {
|
||||
case 17: // 'z' - ZONE_OFFSET
|
||||
if (count < 4) {
|
||||
zsinfo = formatData.getZoneStringFormat().findSpecificShort(text, start);
|
||||
} else {
|
||||
zsinfo = formatData.getZoneStringFormat().findSpecificLong(text, start);
|
||||
}
|
||||
break;
|
||||
case 24: // 'v' - TIMEZONE_GENERIC
|
||||
if (count == 1) {
|
||||
zsinfo = formatData.getZoneStringFormat().findGenericShort(text, start);
|
||||
} else if (count == 4) {
|
||||
zsinfo = formatData.getZoneStringFormat().findGenericLong(text, start);
|
||||
}
|
||||
break;
|
||||
case 29: // 'V' - TIMEZONE_SPECIAL
|
||||
if (count == 1) {
|
||||
zsinfo = formatData.getZoneStringFormat().findSpecificShort(text, start);
|
||||
} else if (count == 4) {
|
||||
zsinfo = formatData.getZoneStringFormat().findGenericLocation(text, start);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (zsinfo != null) {
|
||||
if (zsinfo.isStandard()) {
|
||||
tztype = TZTYPE_STD;
|
||||
} else if (zsinfo.isDaylight()) {
|
||||
tztype = TZTYPE_DST;
|
||||
}
|
||||
tz = TimeZone.getTimeZone(zsinfo.getID());
|
||||
cal.setTimeZone(tz);
|
||||
return start + zsinfo.getString().length();
|
||||
}
|
||||
// Step 4
|
||||
// Final attempt - is this standalone GMT/UT/UTC?
|
||||
int gmtLen = 0;
|
||||
if (text.regionMatches(true, start, STR_GMT, 0, STR_GMT_LEN)) {
|
||||
gmtLen = STR_GMT_LEN;
|
||||
} else if (text.regionMatches(true, start, STR_UTC, 0, STR_UTC_LEN)) {
|
||||
gmtLen = STR_UTC_LEN;
|
||||
} else if (text.regionMatches(true, start, STR_UT, 0, STR_UT_LEN)) {
|
||||
gmtLen = STR_UT_LEN;
|
||||
}
|
||||
if (gmtLen > 0) {
|
||||
tz = TimeZone.getTimeZone("Etc/GMT");
|
||||
cal.setTimeZone(tz);
|
||||
return start + gmtLen;
|
||||
}
|
||||
|
||||
// complete failure
|
||||
return -start;
|
||||
}
|
||||
|
||||
case 27: // 'Q' - QUARTER
|
||||
if (count <= 2) // i.e., Q or QQ.
|
||||
{
|
||||
if (count <= 2) { // i.e., Q or QQ.
|
||||
// Don't want to parse the quarter if it is a string
|
||||
// while pattern uses numeric style: Q or QQ.
|
||||
// [We computed 'value' above.]
|
||||
cal.set(Calendar.MONTH, (value - 1) * 3);
|
||||
return pos.getIndex();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// count >= 3 // i.e., QQQ or QQQQ
|
||||
// Want to be able to parse both short and long forms.
|
||||
// Try count == 4 first:
|
||||
@ -2427,18 +2408,15 @@ public class SimpleDateFormat extends DateFormat {
|
||||
formatData.shortQuarters, cal);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 28: // 'q' - STANDALONE QUARTER
|
||||
if (count <= 2) // i.e., q or qq.
|
||||
{
|
||||
if (count <= 2) { // i.e., q or qq.
|
||||
// Don't want to parse the quarter if it is a string
|
||||
// while pattern uses numeric style: q or qq.
|
||||
// [We computed 'value' above.]
|
||||
cal.set(Calendar.MONTH, (value - 1) * 3);
|
||||
return pos.getIndex();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// count >= 3 // i.e., qqq or qqqq
|
||||
// Want to be able to parse both short and long forms.
|
||||
// Try count == 4 first:
|
||||
@ -2469,12 +2447,12 @@ public class SimpleDateFormat extends DateFormat {
|
||||
// case 22: // 'A' - MILLISECONDS_IN_DAY
|
||||
|
||||
// Handle "generic" fields
|
||||
if (obeyCount)
|
||||
{
|
||||
if ((start+count) > text.length()) return -start;
|
||||
number = parseInt(text, count, pos, allowNegative,currentNumberFormat);
|
||||
}
|
||||
else number = parseInt(text, pos, allowNegative,currentNumberFormat);
|
||||
if (obeyCount) {
|
||||
if ((start+count) > text.length()) return -start;
|
||||
number = parseInt(text, count, pos, allowNegative,currentNumberFormat);
|
||||
} else {
|
||||
number = parseInt(text, pos, allowNegative,currentNumberFormat);
|
||||
}
|
||||
if (number != null) {
|
||||
cal.set(field, number.intValue());
|
||||
return pos.getIndex();
|
||||
@ -2555,11 +2533,10 @@ public class SimpleDateFormat extends DateFormat {
|
||||
if (inQuote) {
|
||||
if (c == '\'')
|
||||
inQuote = false;
|
||||
}
|
||||
else {
|
||||
if (c == '\'')
|
||||
} else {
|
||||
if (c == '\'') {
|
||||
inQuote = true;
|
||||
else if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
|
||||
} else if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
|
||||
int ci = from.indexOf(c);
|
||||
if (ci != -1) {
|
||||
c = to.charAt(ci);
|
||||
@ -2570,8 +2547,9 @@ public class SimpleDateFormat extends DateFormat {
|
||||
}
|
||||
result.append(c);
|
||||
}
|
||||
if (inQuote)
|
||||
if (inQuote) {
|
||||
throw new IllegalArgumentException("Unfinished quote in pattern");
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
@ -2714,8 +2692,6 @@ public class SimpleDateFormat extends DateFormat {
|
||||
initLocalZeroPaddingNumberFormat();
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/**
|
||||
* Format the object to an attributed string, and return the corresponding iterator
|
||||
* Overrides superclass method.
|
||||
@ -2752,8 +2728,6 @@ public class SimpleDateFormat extends DateFormat {
|
||||
// return the CharacterIterator from AttributedString
|
||||
return as.getIterator();
|
||||
}
|
||||
//#endif
|
||||
|
||||
|
||||
/**
|
||||
* Get the locale of this simple date formatter.
|
||||
@ -2817,19 +2791,18 @@ public class SimpleDateFormat extends DateFormat {
|
||||
} else {
|
||||
inQuote = ! inQuote;
|
||||
}
|
||||
}
|
||||
else if ( ! inQuote && ((ch >= 0x0061 /*'a'*/ && ch <= 0x007A /*'z'*/)
|
||||
} else if ( ! inQuote && ((ch >= 0x0061 /*'a'*/ && ch <= 0x007A /*'z'*/)
|
||||
|| (ch >= 0x0041 /*'A'*/ && ch <= 0x005A /*'Z'*/))) {
|
||||
prevCh = ch;
|
||||
++count;
|
||||
}
|
||||
}
|
||||
if ( count > 0 ) {
|
||||
if (count > 0) {
|
||||
// last item
|
||||
level = PATTERN_CHAR_TO_LEVEL[prevCh - PATTERN_CHAR_BASE];
|
||||
if ( fieldLevel <= level ) {
|
||||
return false;
|
||||
}
|
||||
if ( fieldLevel <= level ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -3149,7 +3122,6 @@ public class SimpleDateFormat extends DateFormat {
|
||||
}
|
||||
|
||||
start = delimiterPosition + 1;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1353,7 +1353,7 @@ public abstract class Transliterator implements StringTransform {
|
||||
|
||||
// assert(list.size() > 0);
|
||||
Transliterator t = null;
|
||||
if (list.size() > 1 || Utility.indexOf(canonID, ";") >= 0) {
|
||||
if (list.size() > 1 || canonID.indexOf(";") >= 0) {
|
||||
// [NOTE: If it's a compoundID, we instantiate a CompoundTransliterator even if it only
|
||||
// has one child transliterator. This is so that toRules() will return the right thing
|
||||
// (without any inactive ID), but our main ID still comes out correct. That is, if we
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
**********************************************************************
|
||||
* Copyright (c) 2001-2009, International Business Machines
|
||||
@ -7,16 +6,16 @@
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
|
||||
import com.ibm.icu.impl.IllegalIcuArgumentException;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
|
||||
import java.text.ParsePosition;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Hashtable;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
import java.util.Hashtable;
|
||||
import java.text.ParsePosition;
|
||||
import com.ibm.icu.lang.*;
|
||||
|
||||
import com.ibm.icu.impl.IllegalIcuArgumentException;
|
||||
import com.ibm.icu.impl.UCharacterProperty;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.lang.UCharacter;
|
||||
|
||||
class TransliteratorParser {
|
||||
|
||||
@ -711,12 +710,7 @@ class TransliteratorParser {
|
||||
final String postContext = limit-pos <= 50 ? rule.substring(pos, limit) : rule.substring(pos, pos+50) + "...";
|
||||
throw (RuntimeException)
|
||||
new IllegalIcuArgumentException("Failure in rule: " + precontext + "$$$"
|
||||
+ postContext)
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
.initCause(e)
|
||||
//#endif
|
||||
;
|
||||
+ postContext).initCause(e);
|
||||
}
|
||||
int min = 0;
|
||||
int max = Quantifier.MAX;
|
||||
@ -1044,12 +1038,7 @@ class TransliteratorParser {
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
if (errorCount == 30) {
|
||||
errors.add(new IllegalIcuArgumentException("\nMore than 30 errors; further messages squelched")
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
.initCause(e)
|
||||
//#endif
|
||||
);
|
||||
errors.add(new IllegalIcuArgumentException("\nMore than 30 errors; further messages squelched").initCause(e));
|
||||
break main;
|
||||
}
|
||||
e.fillInStackTrace();
|
||||
@ -1107,8 +1096,6 @@ class TransliteratorParser {
|
||||
}
|
||||
|
||||
if (errors.size() != 0) {
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
for (int i = errors.size()-1; i > 0; --i) {
|
||||
RuntimeException previous = (RuntimeException) errors.get(i-1);
|
||||
while (previous.getCause() != null) {
|
||||
@ -1116,7 +1103,6 @@ class TransliteratorParser {
|
||||
}
|
||||
previous.initCause((RuntimeException) errors.get(i));
|
||||
}
|
||||
//#endif
|
||||
throw (RuntimeException) errors.get(0);
|
||||
// if initCause not supported: throw new IllegalArgumentException(errors.toString());
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -258,8 +257,6 @@ public final class UTF16 {
|
||||
return single; // return unmatched surrogate
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/**
|
||||
* Extract a single UTF-32 value from a string. Used when iterating forwards or backwards (with
|
||||
* <code>UTF16.getCharCount()</code>, as well as random access. If a validity check is
|
||||
@ -319,8 +316,6 @@ public final class UTF16 {
|
||||
return single; // return unmatched surrogate
|
||||
}
|
||||
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* Extract a single UTF-32 value from a string. Used when iterating forwards or backwards (with
|
||||
* <code>UTF16.getCharCount()</code>, as well as random access. If a validity check is
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -7,31 +6,27 @@
|
||||
*/
|
||||
package com.ibm.icu.text;
|
||||
|
||||
import java.text.*;
|
||||
import com.ibm.icu.lang.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import com.ibm.icu.impl.NormalizerImpl;
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.impl.UCharacterProperty;
|
||||
import com.ibm.icu.impl.RuleCharacterIterator;
|
||||
import com.ibm.icu.impl.SortedSetRelation;
|
||||
import com.ibm.icu.impl.UBiDiProps;
|
||||
import com.ibm.icu.impl.UCaseProps;
|
||||
import com.ibm.icu.impl.UCharacterProperty;
|
||||
import com.ibm.icu.impl.UPropertyAliases;
|
||||
import com.ibm.icu.impl.SortedSetRelation;
|
||||
import com.ibm.icu.impl.RuleCharacterIterator;
|
||||
|
||||
import com.ibm.icu.impl.Utility;
|
||||
import com.ibm.icu.lang.UCharacter;
|
||||
import com.ibm.icu.lang.UProperty;
|
||||
import com.ibm.icu.util.Freezable;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.util.VersionInfo;
|
||||
|
||||
import com.ibm.icu.text.BreakIterator;
|
||||
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.TreeSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* A mutable set of Unicode characters and multicharacter strings. Objects of this class
|
||||
* represent <em>character classes</em> used in regular expressions.
|
||||
@ -914,8 +909,6 @@ public class UnicodeSet extends UnicodeFilter implements Freezable {
|
||||
return maxLen;
|
||||
}
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//#else
|
||||
/**
|
||||
* Tests whether the text matches at the offset. If so, returns the end of the longest substring that it matches. If not, returns -1.
|
||||
* @internal
|
||||
@ -972,7 +965,6 @@ public class UnicodeSet extends UnicodeFilter implements Freezable {
|
||||
}
|
||||
return i;
|
||||
}
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* Implementation of UnicodeMatcher API. Union the set of all
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2009, International Business Machines Corporation and *
|
||||
@ -8,11 +7,8 @@
|
||||
|
||||
package com.ibm.icu.util;
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13)
|
||||
//##import com.ibm.icu.impl.ByteBuffer;
|
||||
//#else
|
||||
import java.nio.ByteBuffer;
|
||||
//#endif
|
||||
|
||||
import com.ibm.icu.impl.Utility;
|
||||
|
||||
/**
|
||||
|
@ -4452,7 +4452,7 @@ public final class ULocale implements Serializable {
|
||||
String bcpType = null;
|
||||
try {
|
||||
UResourceBundle typeMaps = bcp47Mappings.get(key);
|
||||
String tmp = key.equals("timezone") ? Utility.replaceAll(type, "/", ":") : type;
|
||||
String tmp = key.equals("timezone") ? type.replaceAll("/", ":") : type;
|
||||
bcpType = typeMaps.getString(tmp);
|
||||
} catch (MissingResourceException mre) {
|
||||
// fall through
|
||||
@ -4493,7 +4493,7 @@ public final class ULocale implements Serializable {
|
||||
if (bcpType.equals(typeMap.getString())) {
|
||||
type = typeMap.getKey();
|
||||
if (key.equals("timezone")) {
|
||||
type = Utility.replaceAll(type, ":", "/");
|
||||
type = type.replaceAll(":", "/");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2004-2009, International Business Machines Corporation and *
|
||||
@ -9,6 +8,7 @@
|
||||
package com.ibm.icu.util;
|
||||
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
@ -22,13 +22,6 @@ import com.ibm.icu.impl.ICUResourceBundle;
|
||||
import com.ibm.icu.impl.ICUResourceBundleReader;
|
||||
import com.ibm.icu.impl.ResourceBundleWrapper;
|
||||
import com.ibm.icu.impl.SimpleCache;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
//#if defined(FOUNDATION10) || defined(J2SE13) || defined(ECLIPSE_FRAGMENT)
|
||||
//##import com.ibm.icu.impl.ByteBuffer;
|
||||
//#else
|
||||
import java.nio.ByteBuffer;
|
||||
//#endif
|
||||
|
||||
/**
|
||||
* A class representing a collection of resource information pertaining to a given
|
||||
|
Loading…
Reference in New Issue
Block a user