From f29b16d6f349ec0feddd6dd0a79be6504e73ab5c Mon Sep 17 00:00:00 2001 From: Andreas Buchen Date: Fri, 3 Jan 2025 11:54:27 +0100 Subject: [PATCH] Refactored PDFBox 1.8 into separate bundle Issue: #4449 --- name.abuchen.portfolio.feature/feature.xml | 6 + name.abuchen.portfolio.pdfbox1/.checkstyle | 10 + name.abuchen.portfolio.pdfbox1/.classpath | 11 + name.abuchen.portfolio.pdfbox1/.gitignore | 1 + name.abuchen.portfolio.pdfbox1/.project | 44 ++ .../org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 411 ++++++++++++++++++ .../.settings/org.eclipse.jdt.ui.prefs | 3 + .../META-INF/MANIFEST.MF | 13 + .../build.properties | 4 + name.abuchen.portfolio.pdfbox1/pom.xml | 42 ++ .../portfolio/pdfbox1/PDFBox1Adapter.java | 38 ++ .../ibflex/IBFlexStatementExtractorTest.java | 231 +++++----- .../META-INF/MANIFEST.MF | 2 - name.abuchen.portfolio/META-INF/MANIFEST.MF | 6 +- portfolio-app/pom.xml | 1 + 16 files changed, 690 insertions(+), 135 deletions(-) create mode 100644 name.abuchen.portfolio.pdfbox1/.checkstyle create mode 100644 name.abuchen.portfolio.pdfbox1/.classpath create mode 100644 name.abuchen.portfolio.pdfbox1/.gitignore create mode 100644 name.abuchen.portfolio.pdfbox1/.project create mode 100644 name.abuchen.portfolio.pdfbox1/.settings/org.eclipse.core.resources.prefs create mode 100644 name.abuchen.portfolio.pdfbox1/.settings/org.eclipse.jdt.core.prefs create mode 100644 name.abuchen.portfolio.pdfbox1/.settings/org.eclipse.jdt.ui.prefs create mode 100644 name.abuchen.portfolio.pdfbox1/META-INF/MANIFEST.MF create mode 100644 name.abuchen.portfolio.pdfbox1/build.properties create mode 100644 name.abuchen.portfolio.pdfbox1/pom.xml create mode 100644 name.abuchen.portfolio.pdfbox1/src/name/abuchen/portfolio/pdfbox1/PDFBox1Adapter.java diff --git a/name.abuchen.portfolio.feature/feature.xml b/name.abuchen.portfolio.feature/feature.xml index fb13c2cf6f..9d909475fa 100644 --- a/name.abuchen.portfolio.feature/feature.xml +++ b/name.abuchen.portfolio.feature/feature.xml @@ -20,6 +20,12 @@ For purposes of the EPL, "Program" will mean the Content. + id="name.abuchen.portfolio" download-size="0" install-size="0" diff --git a/name.abuchen.portfolio.pdfbox1/.checkstyle b/name.abuchen.portfolio.pdfbox1/.checkstyle new file mode 100644 index 0000000000..2476dfa8e3 --- /dev/null +++ b/name.abuchen.portfolio.pdfbox1/.checkstyle @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/name.abuchen.portfolio.pdfbox1/.classpath b/name.abuchen.portfolio.pdfbox1/.classpath new file mode 100644 index 0000000000..6f2bbb6044 --- /dev/null +++ b/name.abuchen.portfolio.pdfbox1/.classpath @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/name.abuchen.portfolio.pdfbox1/.gitignore b/name.abuchen.portfolio.pdfbox1/.gitignore new file mode 100644 index 0000000000..ae3c172604 --- /dev/null +++ b/name.abuchen.portfolio.pdfbox1/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/name.abuchen.portfolio.pdfbox1/.project b/name.abuchen.portfolio.pdfbox1/.project new file mode 100644 index 0000000000..1928366990 --- /dev/null +++ b/name.abuchen.portfolio.pdfbox1/.project @@ -0,0 +1,44 @@ + + + name.abuchen.portfolio.pdfbox1 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + org.sonarlint.eclipse.core.sonarlintBuilder + + + + + org.eclipse.pde.ds.core.builder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/name.abuchen.portfolio.pdfbox1/.settings/org.eclipse.core.resources.prefs b/name.abuchen.portfolio.pdfbox1/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..99f26c0203 --- /dev/null +++ b/name.abuchen.portfolio.pdfbox1/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/name.abuchen.portfolio.pdfbox1/.settings/org.eclipse.jdt.core.prefs b/name.abuchen.portfolio.pdfbox1/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..4c07b82732 --- /dev/null +++ b/name.abuchen.portfolio.pdfbox1/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,411 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=21 +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.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 +org.eclipse.jdt.core.formatter.align_arrows_in_switch_on_columns=false +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line=false +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=0 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=49 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +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_assertion_message=0 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon=0 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +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_permitted_types_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_record_components=16 +org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=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_record_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow=0 +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.alignment_for_type_annotations=0 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=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_statement_group_in_switch=0 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=next_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case_after_arrow=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_record_constructor=next_line +org.eclipse.jdt.core.formatter.brace_position_for_record_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=true +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.indent_tag_description=false +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags=false +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=4 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=true +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +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_record_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=true +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=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_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=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_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=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_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=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=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=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_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not 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_permitted_types=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=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_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not 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_record_declaration=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_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=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_bitwise_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_record_declaration=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_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_permitted_types=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components=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_switch_case_expressions=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_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=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=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration=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_try=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_relational_operator=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_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_line_comments=false +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=true +org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_switch_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_switch_case_with_arrow_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.lineSplit=120 +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_after_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.text_block_indentation=0 +org.eclipse.jdt.core.formatter.use_on_off_tags=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator=true +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true +org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true +org.eclipse.jdt.core.formatter.wrap_before_switch_case_arrow_operator=false +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/name.abuchen.portfolio.pdfbox1/.settings/org.eclipse.jdt.ui.prefs b/name.abuchen.portfolio.pdfbox1/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000..b7ed68eb08 --- /dev/null +++ b/name.abuchen.portfolio.pdfbox1/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +formatter_profile=_portfolio +formatter_settings_version=23 diff --git a/name.abuchen.portfolio.pdfbox1/META-INF/MANIFEST.MF b/name.abuchen.portfolio.pdfbox1/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..93798af68c --- /dev/null +++ b/name.abuchen.portfolio.pdfbox1/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Bundle-SymbolicName: name.abuchen.portfolio.pdfbox1 +Bundle-Version: 0.73.1.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-21 +Export-Package: name.abuchen.portfolio.pdfbox1 +Import-Package: org.osgi.framework +Require-Bundle: org.apache.pdfbox;bundle-version="[1.8.17,2.0.0)" +Bundle-ClassPath: . +Bundle-Vendor: %Bundle-Vendor +Automatic-Module-Name: name.abuchen.portfolio.pdfbox1 +Bundle-ActivationPolicy: lazy diff --git a/name.abuchen.portfolio.pdfbox1/build.properties b/name.abuchen.portfolio.pdfbox1/build.properties new file mode 100644 index 0000000000..56d7765555 --- /dev/null +++ b/name.abuchen.portfolio.pdfbox1/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = target/classes/ +bin.includes = META-INF/,\ + . diff --git a/name.abuchen.portfolio.pdfbox1/pom.xml b/name.abuchen.portfolio.pdfbox1/pom.xml new file mode 100644 index 0000000000..7debb7cf0f --- /dev/null +++ b/name.abuchen.portfolio.pdfbox1/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + + + name.abuchen.portfolio + portfolio-app + 0.73.1-SNAPSHOT + ../portfolio-app + + + name.abuchen.portfolio.pdfbox1 + eclipse-plugin + + + ../name.abuchen.portfolio.tests/target/site/jacoco-aggregate/jacoco.xml + + + + + + maven-enforcer-plugin + + + enforce-versions + none + + + + + org.apache.maven.plugins + maven-jarsigner-plugin + + + org.apache.maven.plugins + maven-checkstyle-plugin + + + + \ No newline at end of file diff --git a/name.abuchen.portfolio.pdfbox1/src/name/abuchen/portfolio/pdfbox1/PDFBox1Adapter.java b/name.abuchen.portfolio.pdfbox1/src/name/abuchen/portfolio/pdfbox1/PDFBox1Adapter.java new file mode 100644 index 0000000000..978825f758 --- /dev/null +++ b/name.abuchen.portfolio.pdfbox1/src/name/abuchen/portfolio/pdfbox1/PDFBox1Adapter.java @@ -0,0 +1,38 @@ +package name.abuchen.portfolio.pdfbox1; + +import java.io.File; +import java.io.IOException; + +import org.apache.pdfbox.exceptions.CryptographyException; +import org.apache.pdfbox.pdmodel.PDDocument; +import org.apache.pdfbox.util.PDFTextStripper; +import org.osgi.framework.FrameworkUtil; + +public class PDFBox1Adapter +{ + public String convertToText(File file) throws IOException + { + try (PDDocument document = PDDocument.load(file)) + { + boolean isProtected = document.isEncrypted(); + if (isProtected) + { + document.decrypt(""); //$NON-NLS-1$ + document.setAllSecurityToBeRemoved(true); + } + + PDFTextStripper textStripper = new PDFTextStripper(); + textStripper.setSortByPosition(true); + return textStripper.getText(document); + } + catch (CryptographyException e) + { + throw new IOException(e); + } + } + + public String getPDFBoxVersion() + { + return FrameworkUtil.getBundle(PDDocument.class).getVersion().toString(); + } +} diff --git a/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/ibflex/IBFlexStatementExtractorTest.java b/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/ibflex/IBFlexStatementExtractorTest.java index a993746f09..a25283f237 100644 --- a/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/ibflex/IBFlexStatementExtractorTest.java +++ b/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/ibflex/IBFlexStatementExtractorTest.java @@ -20,7 +20,6 @@ import java.util.List; import java.util.stream.Collectors; -import org.apache.pdfbox.io.IOUtils; import org.junit.Test; import name.abuchen.portfolio.Messages; @@ -51,8 +50,7 @@ private Extractor.InputFile createTempFile(InputStream input) throws IOException File tempFile = Files.createTempFile("IBFlexStatementExtractorTest", null).toFile(); tempFile.deleteOnExit(); FileOutputStream fos = new FileOutputStream(tempFile); - - IOUtils.copy(input, fos); + input.transferTo(fos); return new Extractor.InputFile(tempFile); } @@ -134,7 +132,8 @@ public void testIBFlexStatementFile01() throws IOException assertThat(security4.getIsin(), is("CA91701P1TN3")); assertThat(security4.getWkn(), is("123720813")); assertThat(security4.getTickerSymbol(), is("UUU.TEN2")); - assertThat(security4.getName(), is("UUU(CA91701P1053) TENDERED TO CA91701P1TN3 1 FOR 1 (UUU.TEN2, URANIUM ONE INC. - TENDER FOR CASH CAD, CA91701P1TN3)")); + assertThat(security4.getName(), is( + "UUU(CA91701P1053) TENDERED TO CA91701P1TN3 1 FOR 1 (UUU.TEN2, URANIUM ONE INC. - TENDER FOR CASH CAD, CA91701P1TN3)")); assertThat(security4.getCurrencyCode(), is("CAD")); assertThat(security4.getFeed(), is(YahooFinanceQuoteFeed.ID)); @@ -143,7 +142,8 @@ public void testIBFlexStatementFile01() throws IOException assertThat(security5.getIsin(), is("CA38501D5010")); assertThat(security5.getWkn(), is("129258970")); assertThat(security5.getTickerSymbol(), is("GCM")); - assertThat(security5.getName(), is("GCM(CA38501D2041) SPLIT 1 FOR 25 (GCM, GRAN COLOMBIA GOLD CORP, CA38501D5010)")); + assertThat(security5.getName(), + is("GCM(CA38501D2041) SPLIT 1 FOR 25 (GCM, GRAN COLOMBIA GOLD CORP, CA38501D5010)")); assertThat(security5.getCurrencyCode(), is("CAD")); assertThat(security5.getFeed(), is(YahooFinanceQuoteFeed.ID)); @@ -223,84 +223,73 @@ public void testIBFlexStatementFile01() throws IOException assertThat(transaction.getNote(), is("NP SECURITIES AND FUTURES VALUE BUNDLE FOR APR 2017")); // check delivery outbound (Auslieferung) transaction - PortfolioTransaction transaction1 = (PortfolioTransaction) results.stream().filter(TransactionItem.class::isInstance) - .skip(7).findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); + PortfolioTransaction transaction1 = (PortfolioTransaction) results.stream() + .filter(TransactionItem.class::isInstance).skip(7).findFirst() + .orElseThrow(IllegalArgumentException::new).getSubject(); assertThat(transaction1.getType(), is(PortfolioTransaction.Type.DELIVERY_OUTBOUND)); assertThat(transaction1.getDateTime(), is(LocalDateTime.parse("2013-03-05T00:00"))); assertThat(transaction1.getShares(), is(Values.Share.factorize(12000))); assertNull(transaction1.getSource()); - assertThat(transaction1.getNote(), is("UUU(CA91701P1053) TENDERED TO CA91701P1TN3 1 FOR 1 (UUU, URANIUM ONE INC., CA91701P1053)")); + assertThat(transaction1.getNote(), + is("UUU(CA91701P1053) TENDERED TO CA91701P1TN3 1 FOR 1 (UUU, URANIUM ONE INC., CA91701P1053)")); - assertThat(transaction1.getMonetaryAmount(), - is(Money.of("CAD", Values.Amount.factorize(0.00)))); - assertThat(transaction1.getGrossValue(), - is(Money.of("CAD", Values.Amount.factorize(0.00)))); - assertThat(transaction1.getUnitSum(Unit.Type.TAX), - is(Money.of("CAD", Values.Amount.factorize(0.00)))); - assertThat(transaction1.getUnitSum(Unit.Type.FEE), - is(Money.of("CAD", Values.Amount.factorize(0.00)))); + assertThat(transaction1.getMonetaryAmount(), is(Money.of("CAD", Values.Amount.factorize(0.00)))); + assertThat(transaction1.getGrossValue(), is(Money.of("CAD", Values.Amount.factorize(0.00)))); + assertThat(transaction1.getUnitSum(Unit.Type.TAX), is(Money.of("CAD", Values.Amount.factorize(0.00)))); + assertThat(transaction1.getUnitSum(Unit.Type.FEE), is(Money.of("CAD", Values.Amount.factorize(0.00)))); // check delivery inbound (Einlieferung) transaction - transaction1 = (PortfolioTransaction) results.stream().filter(TransactionItem.class::isInstance) - .skip(8).findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); + transaction1 = (PortfolioTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(8) + .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); assertThat(transaction1.getType(), is(PortfolioTransaction.Type.DELIVERY_INBOUND)); assertThat(transaction1.getDateTime(), is(LocalDateTime.parse("2013-03-05T00:00"))); assertThat(transaction1.getShares(), is(Values.Share.factorize(12000))); assertNull(transaction1.getSource()); - assertThat(transaction1.getNote(), is("UUU(CA91701P1053) TENDERED TO CA91701P1TN3 1 FOR 1 (UUU.TEN2, URANIUM ONE INC. - TENDER FOR CASH CAD, CA91701P1TN3)")); + assertThat(transaction1.getNote(), is( + "UUU(CA91701P1053) TENDERED TO CA91701P1TN3 1 FOR 1 (UUU.TEN2, URANIUM ONE INC. - TENDER FOR CASH CAD, CA91701P1TN3)")); - assertThat(transaction1.getMonetaryAmount(), - is(Money.of("CAD", Values.Amount.factorize(0.00)))); - assertThat(transaction1.getGrossValue(), - is(Money.of("CAD", Values.Amount.factorize(0.00)))); - assertThat(transaction1.getUnitSum(Unit.Type.TAX), - is(Money.of("CAD", Values.Amount.factorize(0.00)))); - assertThat(transaction1.getUnitSum(Unit.Type.FEE), - is(Money.of("CAD", Values.Amount.factorize(0.00)))); + assertThat(transaction1.getMonetaryAmount(), is(Money.of("CAD", Values.Amount.factorize(0.00)))); + assertThat(transaction1.getGrossValue(), is(Money.of("CAD", Values.Amount.factorize(0.00)))); + assertThat(transaction1.getUnitSum(Unit.Type.TAX), is(Money.of("CAD", Values.Amount.factorize(0.00)))); + assertThat(transaction1.getUnitSum(Unit.Type.FEE), is(Money.of("CAD", Values.Amount.factorize(0.00)))); // check delivery inbound (Einlieferung) transaction - transaction1 = (PortfolioTransaction) results.stream().filter(TransactionItem.class::isInstance) - .skip(9).findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); + transaction1 = (PortfolioTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(9) + .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); assertThat(transaction1.getType(), is(PortfolioTransaction.Type.DELIVERY_INBOUND)); assertThat(transaction1.getDateTime(), is(LocalDateTime.parse("2013-06-18T00:00"))); assertThat(transaction1.getShares(), is(Values.Share.factorize(480))); assertNull(transaction1.getSource()); - assertThat(transaction1.getNote(), is("GCM(CA38501D2041) SPLIT 1 FOR 25 (GCM, GRAN COLOMBIA GOLD CORP, CA38501D5010)")); + assertThat(transaction1.getNote(), + is("GCM(CA38501D2041) SPLIT 1 FOR 25 (GCM, GRAN COLOMBIA GOLD CORP, CA38501D5010)")); - assertThat(transaction1.getMonetaryAmount(), - is(Money.of("CAD", Values.Amount.factorize(0.00)))); - assertThat(transaction1.getGrossValue(), - is(Money.of("CAD", Values.Amount.factorize(0.00)))); - assertThat(transaction1.getUnitSum(Unit.Type.TAX), - is(Money.of("CAD", Values.Amount.factorize(0.00)))); - assertThat(transaction1.getUnitSum(Unit.Type.FEE), - is(Money.of("CAD", Values.Amount.factorize(0.00)))); + assertThat(transaction1.getMonetaryAmount(), is(Money.of("CAD", Values.Amount.factorize(0.00)))); + assertThat(transaction1.getGrossValue(), is(Money.of("CAD", Values.Amount.factorize(0.00)))); + assertThat(transaction1.getUnitSum(Unit.Type.TAX), is(Money.of("CAD", Values.Amount.factorize(0.00)))); + assertThat(transaction1.getUnitSum(Unit.Type.FEE), is(Money.of("CAD", Values.Amount.factorize(0.00)))); // check delivery outbound (Auslieferung) transaction - transaction1 = (PortfolioTransaction) results.stream().filter(TransactionItem.class::isInstance) - .skip(10).findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); + transaction1 = (PortfolioTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(10) + .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); assertThat(transaction1.getType(), is(PortfolioTransaction.Type.DELIVERY_OUTBOUND)); assertThat(transaction1.getDateTime(), is(LocalDateTime.parse("2013-06-18T00:00"))); assertThat(transaction1.getShares(), is(Values.Share.factorize(12000))); assertNull(transaction1.getSource()); - assertThat(transaction1.getNote(), is("GCM(CA38501D2041) SPLIT 1 FOR 25 (GCM.OLD, GRAN COLOMBIA GOLD CORP, CA38501D2041)")); + assertThat(transaction1.getNote(), + is("GCM(CA38501D2041) SPLIT 1 FOR 25 (GCM.OLD, GRAN COLOMBIA GOLD CORP, CA38501D2041)")); - assertThat(transaction1.getMonetaryAmount(), - is(Money.of("CAD", Values.Amount.factorize(0.00)))); - assertThat(transaction1.getGrossValue(), - is(Money.of("CAD", Values.Amount.factorize(0.00)))); - assertThat(transaction1.getUnitSum(Unit.Type.TAX), - is(Money.of("CAD", Values.Amount.factorize(0.00)))); - assertThat(transaction1.getUnitSum(Unit.Type.FEE), - is(Money.of("CAD", Values.Amount.factorize(0.00)))); + assertThat(transaction1.getMonetaryAmount(), is(Money.of("CAD", Values.Amount.factorize(0.00)))); + assertThat(transaction1.getGrossValue(), is(Money.of("CAD", Values.Amount.factorize(0.00)))); + assertThat(transaction1.getUnitSum(Unit.Type.TAX), is(Money.of("CAD", Values.Amount.factorize(0.00)))); + assertThat(transaction1.getUnitSum(Unit.Type.FEE), is(Money.of("CAD", Values.Amount.factorize(0.00)))); // check 1st buy sell transaction BuySellEntry entry = (BuySellEntry) results.stream().filter(BuySellEntryItem.class::isInstance).findFirst() @@ -1018,10 +1007,8 @@ public void testIBFlexStatementFile02() throws IOException assertNull(transaction.getSource()); assertThat(transaction.getNote(), is("ORCL(US68389X1054) CASH DIVIDEND 0.19000000 USD PER SHARE - US TAX")); - assertThat(transaction.getMonetaryAmount(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(13.67)))); - assertThat(transaction.getGrossValue(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(16.08)))); + assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(13.67)))); + assertThat(transaction.getGrossValue(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(16.08)))); assertThat(transaction.getUnitSum(Unit.Type.TAX), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(2.41)))); assertThat(transaction.getUnitSum(Unit.Type.FEE), @@ -1095,7 +1082,8 @@ public void testIBFlexStatementFile03() throws IOException assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-12-05T00:00"))); assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(0.02)))); assertNull(transaction.getSource()); - assertThat(transaction.getNote(), is("Transaction-ID: mytransactionidhere | USD IBKR MANAGED SECURITIES (SYEP) INTEREST FOR NOV-2022")); + assertThat(transaction.getNote(), is( + "Transaction-ID: mytransactionidhere | USD IBKR MANAGED SECURITIES (SYEP) INTEREST FOR NOV-2022")); } @Test @@ -1263,18 +1251,16 @@ public void testIBFlexStatementFile05() throws IOException assertNull(transaction.getSource()); assertThat(transaction.getNote(), is("Transaction-ID: 8765764573")); - assertThat(transaction.getMonetaryAmount(), - is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(9.52)))); - assertThat(transaction.getGrossValue(), - is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(9.52)))); + assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(9.52)))); + assertThat(transaction.getGrossValue(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(9.52)))); assertThat(transaction.getUnitSum(Unit.Type.TAX), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(0.00)))); assertThat(transaction.getUnitSum(Unit.Type.FEE), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(0.00)))); // check 2nd dividends transaction - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance) - .skip(1).findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); + transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(1) + .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); assertThat(transaction.getType(), is(AccountTransaction.Type.DIVIDENDS)); @@ -1283,10 +1269,8 @@ public void testIBFlexStatementFile05() throws IOException assertNull(transaction.getSource()); assertThat(transaction.getNote(), is("Transaction-ID: 13713058125")); - assertThat(transaction.getMonetaryAmount(), - is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(9.50)))); - assertThat(transaction.getGrossValue(), - is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(9.50)))); + assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(9.50)))); + assertThat(transaction.getGrossValue(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(9.50)))); assertThat(transaction.getUnitSum(Unit.Type.TAX), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(0.00)))); assertThat(transaction.getUnitSum(Unit.Type.FEE), @@ -1399,18 +1383,16 @@ public void testIBFlexStatementFile06() throws IOException assertNull(transaction.getSource()); assertThat(transaction.getNote(), is("Transaction-ID: 8765764573")); - assertThat(transaction.getMonetaryAmount(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(7.74)))); - assertThat(transaction.getGrossValue(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(7.74)))); + assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(7.74)))); + assertThat(transaction.getGrossValue(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(7.74)))); assertThat(transaction.getUnitSum(Unit.Type.TAX), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.00)))); assertThat(transaction.getUnitSum(Unit.Type.FEE), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.00)))); // check 2nd dividends transaction - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance) - .skip(1).findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); + transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(1) + .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); assertThat(transaction.getType(), is(AccountTransaction.Type.DIVIDENDS)); @@ -1419,10 +1401,8 @@ public void testIBFlexStatementFile06() throws IOException assertNull(transaction.getSource()); assertThat(transaction.getNote(), is("Transaction-ID: 13713058125")); - assertThat(transaction.getMonetaryAmount(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(8.04)))); - assertThat(transaction.getGrossValue(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(8.04)))); + assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(8.04)))); + assertThat(transaction.getGrossValue(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(8.04)))); assertThat(transaction.getUnitSum(Unit.Type.TAX), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.00)))); assertThat(transaction.getUnitSum(Unit.Type.FEE), @@ -1537,12 +1517,11 @@ public void testIBFlexStatementFile08() throws IOException assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-08-18T00:00"))); assertThat(transaction.getShares(), is(Values.Share.factorize(120))); assertNull(transaction.getSource()); - assertThat(transaction.getNote(), is("Transaction-ID: 13505500800 | Transaction-ID: 13505500801 | SGN(US8688612048) CASH DIVIDEND USD 0.088051 PER SHARE - RU TAX")); + assertThat(transaction.getNote(), is( + "Transaction-ID: 13505500800 | Transaction-ID: 13505500801 | SGN(US8688612048) CASH DIVIDEND USD 0.088051 PER SHARE - RU TAX")); - assertThat(transaction.getMonetaryAmount(), - is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(8.98)))); - assertThat(transaction.getGrossValue(), - is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(10.56)))); + assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(8.98)))); + assertThat(transaction.getGrossValue(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(10.56)))); assertThat(transaction.getUnitSum(Unit.Type.TAX), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(1.58)))); assertThat(transaction.getUnitSum(Unit.Type.FEE), @@ -1561,7 +1540,8 @@ public void testIBFlexStatementFile08() throws IOException assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-08-18T00:00"))); assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(3.67)))); assertNull(transaction.getSource()); - assertThat(transaction.getNote(), is("Transaction-ID: 13505500802 | SGN(US8688612048) CASH DIVIDEND USD 0.088051 PER SHARE - FEE")); + assertThat(transaction.getNote(), is( + "Transaction-ID: 13505500802 | SGN(US8688612048) CASH DIVIDEND USD 0.088051 PER SHARE - FEE")); } @Test @@ -1636,7 +1616,8 @@ public void testIBFlexStatementFile09() throws IOException assertThat(cancellation.getAccountTransaction().getType(), is(AccountTransaction.Type.BUY)); assertThat(cancellation, is(not(nullValue()))); - assertThat(cancellation.getPortfolioTransaction().getDateTime(), is(LocalDateTime.parse("2022-12-02T06:26:11"))); + assertThat(cancellation.getPortfolioTransaction().getDateTime(), + is(LocalDateTime.parse("2022-12-02T06:26:11"))); assertThat(cancellation.getPortfolioTransaction().getShares(), is(Values.Share.factorize(450))); assertNull(cancellation.getSource()); assertThat(cancellation.getNote(), is(Messages.MsgErrorOrderCancellationUnsupported)); @@ -1989,10 +1970,8 @@ public void testIBFlexStatementFile12() throws IOException assertNull(transaction.getSource()); assertThat(transaction.getNote(), is("XXXXXCAD")); - assertThat(transaction.getMonetaryAmount(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(26.95)))); - assertThat(transaction.getGrossValue(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(31.71)))); + assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(26.95)))); + assertThat(transaction.getGrossValue(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(31.71)))); assertThat(transaction.getUnitSum(Unit.Type.TAX), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(4.76)))); assertThat(transaction.getUnitSum(Unit.Type.FEE), @@ -2012,10 +1991,8 @@ public void testIBFlexStatementFile12() throws IOException assertNull(transaction.getSource()); assertThat(transaction.getNote(), is("XXXXXCAD")); - assertThat(transaction.getMonetaryAmount(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(23.24)))); - assertThat(transaction.getGrossValue(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(29.44)))); + assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(23.24)))); + assertThat(transaction.getGrossValue(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(29.44)))); assertThat(transaction.getUnitSum(Unit.Type.TAX), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(6.20)))); assertThat(transaction.getUnitSum(Unit.Type.FEE), @@ -2035,10 +2012,8 @@ public void testIBFlexStatementFile12() throws IOException assertNull(transaction.getSource()); assertThat(transaction.getNote(), is("XXXXXUSD")); - assertThat(transaction.getMonetaryAmount(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(43.51)))); - assertThat(transaction.getGrossValue(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(51.19)))); + assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(43.51)))); + assertThat(transaction.getGrossValue(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(51.19)))); assertThat(transaction.getUnitSum(Unit.Type.TAX), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(7.68)))); assertThat(transaction.getUnitSum(Unit.Type.FEE), @@ -2058,10 +2033,8 @@ public void testIBFlexStatementFile12() throws IOException assertNull(transaction.getSource()); assertNull(transaction.getNote()); - assertThat(transaction.getMonetaryAmount(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(23.72)))); - assertThat(transaction.getGrossValue(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(23.72)))); + assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(23.72)))); + assertThat(transaction.getGrossValue(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(23.72)))); assertThat(transaction.getUnitSum(Unit.Type.TAX), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.00)))); assertThat(transaction.getUnitSum(Unit.Type.FEE), @@ -2319,7 +2292,8 @@ public void testIBFlexStatementFile14() throws IOException assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2023-02-06T00:00"))); assertThat(transaction.getMonetaryAmount(), is(Money.of("CHF", Values.Amount.factorize(1500.00)))); assertNull(transaction.getSource()); - assertThat(transaction.getNote(), is("Transaction-ID: 22952664670 | CASH RECEIPTS / ELECTRONIC FUND TRANSFERS")); + assertThat(transaction.getNote(), + is("Transaction-ID: 22952664670 | CASH RECEIPTS / ELECTRONIC FUND TRANSFERS")); item = iter.next(); @@ -2329,7 +2303,8 @@ public void testIBFlexStatementFile14() throws IOException assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2023-02-27T00:00"))); assertThat(transaction.getMonetaryAmount(), is(Money.of("CHF", Values.Amount.factorize(1500.00)))); assertNull(transaction.getSource()); - assertThat(transaction.getNote(), is("Transaction-ID: 23145951086 | CASH RECEIPTS / ELECTRONIC FUND TRANSFERS")); + assertThat(transaction.getNote(), + is("Transaction-ID: 23145951086 | CASH RECEIPTS / ELECTRONIC FUND TRANSFERS")); } @Test @@ -2364,7 +2339,8 @@ public void testIBFlexStatementFile15() throws IOException assertThat(security.getIsin(), is("LU0090865873")); assertThat(security.getWkn(), is("422810461")); assertThat(security.getTickerSymbol(), is("009086587")); - assertThat(security.getName(), is("ABERDEEN STANDARD INV (LU) ABERDEEN STANDARD LIQUIDITY FUND (LUX) - EUR \"A2\"(EUR) ACC")); + assertThat(security.getName(), + is("ABERDEEN STANDARD INV (LU) ABERDEEN STANDARD LIQUIDITY FUND (LUX) - EUR \"A2\"(EUR) ACC")); assertThat(security.getCurrencyCode(), is(CurrencyUnit.EUR)); assertThat(security.getFeed(), is(YahooFinanceQuoteFeed.ID)); @@ -2539,7 +2515,8 @@ public void testIBFlexStatementFile17() throws IOException assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2023-03-02T00:00"))); assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(1.50)))); assertNull(transaction.getSource()); - assertThat(transaction.getNote(), is("Transaction-ID: 457125101 | R******09:NASDAQ (UTP TAPE C) LEVEL 1 FOR MAR 2023")); + assertThat(transaction.getNote(), + is("Transaction-ID: 457125101 | R******09:NASDAQ (UTP TAPE C) LEVEL 1 FOR MAR 2023")); item = iter.next(); @@ -2549,7 +2526,8 @@ public void testIBFlexStatementFile17() throws IOException assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2023-03-02T00:00"))); assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(1.50)))); assertNull(transaction.getSource()); - assertThat(transaction.getNote(), is("Transaction-ID: 457125105 | R******09:NYSE (CTA TAPE A) LEVEL 1 FOR MAR 2023")); + assertThat(transaction.getNote(), + is("Transaction-ID: 457125105 | R******09:NYSE (CTA TAPE A) LEVEL 1 FOR MAR 2023")); item = iter.next(); @@ -2569,7 +2547,8 @@ public void testIBFlexStatementFile17() throws IOException assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2023-03-02T00:00"))); assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(0.30)))); assertNull(transaction.getSource()); - assertThat(transaction.getNote(), is("Transaction-ID: 457155534 | Tax-Transaction-ID: 457125101 | r******09:NASDAQ (UTP Tape C) Level 1")); + assertThat(transaction.getNote(), is( + "Transaction-ID: 457155534 | Tax-Transaction-ID: 457125101 | r******09:NASDAQ (UTP Tape C) Level 1")); item = iter.next(); @@ -2579,7 +2558,8 @@ public void testIBFlexStatementFile17() throws IOException assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2023-03-02T00:00"))); assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(0.30)))); assertNull(transaction.getSource()); - assertThat(transaction.getNote(), is("Transaction-ID: 457155535 | Tax-Transaction-ID: 457125105 | r******09:NYSE (CTA Tape A) Level 1")); + assertThat(transaction.getNote(), is( + "Transaction-ID: 457155535 | Tax-Transaction-ID: 457125105 | r******09:NYSE (CTA Tape A) Level 1")); item = iter.next(); @@ -2589,7 +2569,8 @@ public void testIBFlexStatementFile17() throws IOException assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2023-03-02T00:00"))); assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(0.30)))); assertNull(transaction.getSource()); - assertThat(transaction.getNote(), is("Transaction-ID: 457155536 | Tax-Transaction-ID: 457125110 | r******09:OPRA NP L1")); + assertThat(transaction.getNote(), + is("Transaction-ID: 457155536 | Tax-Transaction-ID: 457125110 | r******09:OPRA NP L1")); } @Test @@ -2691,12 +2672,11 @@ public void testIBFlexStatementFile18() throws IOException assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-06-24T00:00"))); assertThat(transaction.getShares(), is(Values.Share.factorize(22))); assertNull(transaction.getSource()); - assertThat(transaction.getNote(), is("Transaction-ID: 1216874520 | Transaction-ID: 1216874521 | EXPO(US30214U1025) CASH DIVIDEND USD 0.24 PER SHARE - US TAX")); + assertThat(transaction.getNote(), is( + "Transaction-ID: 1216874520 | Transaction-ID: 1216874521 | EXPO(US30214U1025) CASH DIVIDEND USD 0.24 PER SHARE - US TAX")); - assertThat(transaction.getMonetaryAmount(), - is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(3.70)))); - assertThat(transaction.getGrossValue(), - is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(5.28)))); + assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(3.70)))); + assertThat(transaction.getGrossValue(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(5.28)))); assertThat(transaction.getUnitSum(Unit.Type.TAX), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(1.58)))); assertThat(transaction.getUnitSum(Unit.Type.FEE), @@ -2711,12 +2691,11 @@ public void testIBFlexStatementFile18() throws IOException assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-09-23T00:00"))); assertThat(transaction.getShares(), is(Values.Share.factorize(22))); assertNull(transaction.getSource()); - assertThat(transaction.getNote(), is("Transaction-ID: 1385409476 | Transaction-ID: 1385409478 | EXPO(US30214U1025) CASH DIVIDEND USD 0.24 PER SHARE - US TAX")); + assertThat(transaction.getNote(), is( + "Transaction-ID: 1385409476 | Transaction-ID: 1385409478 | EXPO(US30214U1025) CASH DIVIDEND USD 0.24 PER SHARE - US TAX")); - assertThat(transaction.getMonetaryAmount(), - is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(3.70)))); - assertThat(transaction.getGrossValue(), - is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(5.28)))); + assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(3.70)))); + assertThat(transaction.getGrossValue(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(5.28)))); assertThat(transaction.getUnitSum(Unit.Type.TAX), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(1.58)))); assertThat(transaction.getUnitSum(Unit.Type.FEE), @@ -2956,10 +2935,8 @@ public void testIBFlexStatementFile20() throws IOException assertNull(transaction.getSource()); assertThat(entry.getNote(), is("Trade-ID: 486028469 | Transaction-ID: 1619968617")); - assertThat(transaction.getMonetaryAmount(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(21.02)))); - assertThat(transaction.getGrossValue(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(21.02)))); + assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(21.02)))); + assertThat(transaction.getGrossValue(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(21.02)))); assertThat(transaction.getUnitSum(Unit.Type.TAX), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.00)))); assertThat(transaction.getUnitSum(Unit.Type.FEE), @@ -2969,8 +2946,8 @@ public void testIBFlexStatementFile20() throws IOException assertThat(grossValueUnit.getForex(), is(Money.of("CAD", Values.Amount.factorize(28.50)))); // check 1st tax refund transaction - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance) - .skip(1).findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); + transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(1) + .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); assertThat(transaction.getType(), is(AccountTransaction.Type.TAXES)); @@ -2979,10 +2956,8 @@ public void testIBFlexStatementFile20() throws IOException assertNull(transaction.getSource()); assertThat(entry.getNote(), is("Trade-ID: 486028469 | Transaction-ID: 1619968617")); - assertThat(transaction.getMonetaryAmount(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(21.02)))); - assertThat(transaction.getGrossValue(), - is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(21.02)))); + assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(21.02)))); + assertThat(transaction.getGrossValue(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(21.02)))); assertThat(transaction.getUnitSum(Unit.Type.TAX), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.00)))); assertThat(transaction.getUnitSum(Unit.Type.FEE), @@ -3070,10 +3045,8 @@ public void testIBFlexStatementFile21() throws IOException assertNull(transaction.getSource()); assertThat(entry.getNote(), is("Trade-ID: 543995474 | Transaction-ID: 1872174881")); - assertThat(transaction.getMonetaryAmount(), - is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(1.58)))); - assertThat(transaction.getGrossValue(), - is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(1.58)))); + assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(1.58)))); + assertThat(transaction.getGrossValue(), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(1.58)))); assertThat(transaction.getUnitSum(Unit.Type.TAX), is(Money.of(CurrencyUnit.USD, Values.Amount.factorize(0.00)))); assertThat(transaction.getUnitSum(Unit.Type.FEE), diff --git a/name.abuchen.portfolio.ui/META-INF/MANIFEST.MF b/name.abuchen.portfolio.ui/META-INF/MANIFEST.MF index c4a58c0876..6ea8f7b6d5 100644 --- a/name.abuchen.portfolio.ui/META-INF/MANIFEST.MF +++ b/name.abuchen.portfolio.ui/META-INF/MANIFEST.MF @@ -18,8 +18,6 @@ Import-Package: com.google.common.base, jakarta.annotation, jakarta.inject, org.apache.commons.csv, - org.apache.pdfbox.pdmodel, - org.apache.pdfbox.util, org.eclipse.core.commands, org.eclipse.core.commands.common, org.eclipse.core.databinding, diff --git a/name.abuchen.portfolio/META-INF/MANIFEST.MF b/name.abuchen.portfolio/META-INF/MANIFEST.MF index 1153736a40..d383fbd535 100644 --- a/name.abuchen.portfolio/META-INF/MANIFEST.MF +++ b/name.abuchen.portfolio/META-INF/MANIFEST.MF @@ -50,8 +50,6 @@ Import-Package: com.google.common.annotations, org.apache.commons.math3, org.apache.commons.math3.linear, org.apache.commons.math3.util, - org.apache.pdfbox.pdmodel, - org.apache.pdfbox.util, org.bouncycastle, org.eclipse.e4.core.di.annotations, org.eclipse.e4.core.di.extensions, @@ -71,10 +69,10 @@ Bundle-Vendor: %Bundle-Vendor Require-Bundle: org.eclipse.core.runtime, org.apache.httpcomponents.client5.httpclient5, org.apache.httpcomponents.core5.httpcore5, - org.apache.pdfbox, json-path, com.google.gson, - org.osgi.service.component + org.osgi.service.component, + name.abuchen.portfolio.pdfbox1;bundle-version="0.73.1", Automatic-Module-Name: name.abuchen.portfolio Bundle-ActivationPolicy: lazy Service-Component: OSGI-INF/name.abuchen.portfolio.util.ImageioSpiRegistration.xml diff --git a/portfolio-app/pom.xml b/portfolio-app/pom.xml index 019a81acc6..27169a0c0f 100644 --- a/portfolio-app/pom.xml +++ b/portfolio-app/pom.xml @@ -28,6 +28,7 @@ ../portfolio-target-definition + ../name.abuchen.portfolio.pdfbox1 ../name.abuchen.portfolio ../name.abuchen.portfolio.junit ../name.abuchen.portfolio.tests