diff --git a/.github/workflows/broken_links_checker.json b/.github/workflows/broken_links_checker.json new file mode 100644 index 00000000..26cd6011 --- /dev/null +++ b/.github/workflows/broken_links_checker.json @@ -0,0 +1,3 @@ +{ + "aliveStatusCodes": [429, 200] +} \ No newline at end of file diff --git a/.github/workflows/broken_links_checker.yml b/.github/workflows/broken_links_checker.yml index 6a69306a..0eff5303 100644 --- a/.github/workflows/broken_links_checker.yml +++ b/.github/workflows/broken_links_checker.yml @@ -4,6 +4,7 @@ on: schedule: - cron: "0 5 * * *" push: + pull_request: jobs: linkChecker: @@ -13,4 +14,5 @@ jobs: - uses: gaurav-nelson/github-action-markdown-link-check@v1 with: use-quiet-mode: 'yes' - use-verbose-mode: 'yes' \ No newline at end of file + use-verbose-mode: 'yes' + config-file: .github/workflows/broken_links_checker.json \ No newline at end of file diff --git a/.github/workflows/ci-build-next-java.yml b/.github/workflows/ci-build-next-java.yml new file mode 100644 index 00000000..e38a1a12 --- /dev/null +++ b/.github/workflows/ci-build-next-java.yml @@ -0,0 +1,35 @@ +name: CI Build next Java + +on: + - push + - pull_request + +jobs: + java-17-compatibility: + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: 17 + - name: Cache local Maven repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Run tests and build with Maven + run: | + mvn --batch-mode --update-snapshots clean package -DtrimStackTrace=false \ + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn + - name: Publish Test Report + uses: scacap/action-surefire-report@v1 + if: ${{ always() && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/dependencies_check.yml b/.github/workflows/dependencies_check.yml index 2cb0303c..d28c0b47 100644 --- a/.github/workflows/dependencies_check.yml +++ b/.github/workflows/dependencies_check.yml @@ -11,8 +11,9 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: + distribution: 'temurin' java-version: 11 - name: Cache local Maven repository uses: actions/cache@v2 diff --git a/.github/workflows/release_droid_prepare_original_checksum.yml b/.github/workflows/release_droid_prepare_original_checksum.yml index 5133083e..650b120a 100644 --- a/.github/workflows/release_droid_prepare_original_checksum.yml +++ b/.github/workflows/release_droid_prepare_original_checksum.yml @@ -12,8 +12,9 @@ jobs: with: fetch-depth: 0 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: + distribution: 'temurin' java-version: 11 - name: Cache local Maven repository uses: actions/cache@v2 @@ -23,7 +24,7 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - name: Run tests and build with Maven - run: mvn -B clean verify --file pom.xml + run: mvn --batch-mode clean verify --file pom.xml - name: Prepare checksum run: find target -maxdepth 1 -name *.jar -exec sha256sum "{}" + > original_checksum - name: Upload checksum to the artifactory diff --git a/.github/workflows/release_droid_print_quick_checksum.yml b/.github/workflows/release_droid_print_quick_checksum.yml index f5f938fb..746fc438 100644 --- a/.github/workflows/release_droid_print_quick_checksum.yml +++ b/.github/workflows/release_droid_print_quick_checksum.yml @@ -12,8 +12,9 @@ jobs: with: fetch-depth: 0 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: + distribution: 'temurin' java-version: 11 - name: Cache local Maven repository uses: actions/cache@v2 @@ -23,7 +24,7 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - name: Build with Maven skipping tests - run: mvn -B clean verify -DskipTests + run: mvn --batch-mode clean verify -DskipTests - name: Print checksum run: echo 'checksum_start==';find target -maxdepth 1 -name *.jar -exec sha256sum "{}" + | xargs;echo '==checksum_end' diff --git a/.github/workflows/release_droid_release_on_maven_central.yml b/.github/workflows/release_droid_release_on_maven_central.yml index e768946d..5758ecf2 100644 --- a/.github/workflows/release_droid_release_on_maven_central.yml +++ b/.github/workflows/release_droid_release_on_maven_central.yml @@ -12,8 +12,9 @@ jobs: with: fetch-depth: 0 - name: Set up Maven Central Repository - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: + distribution: 'temurin' java-version: 11 server-id: ossrh server-username: MAVEN_USERNAME diff --git a/.github/workflows/release_droid_upload_github_release_assets.yml b/.github/workflows/release_droid_upload_github_release_assets.yml index 97f99141..e2c761be 100644 --- a/.github/workflows/release_droid_upload_github_release_assets.yml +++ b/.github/workflows/release_droid_upload_github_release_assets.yml @@ -16,8 +16,9 @@ jobs: with: fetch-depth: 0 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: + distribution: 'temurin' java-version: 11 - name: Cache local Maven repository uses: actions/cache@v2 @@ -27,7 +28,7 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - name: Build with Maven skipping tests - run: mvn clean verify -DskipTests + run: mvn --batch-mode clean verify -DskipTests - name: Generate sha256sum files run: find target -maxdepth 1 -name *.jar -exec bash -c 'sha256sum {} > {}.sha256' \; - name: Upload assets to the GitHub release draft diff --git a/.gitignore b/.gitignore index 00a62ad4..cd6749ef 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,25 @@ /.DS_Store .dbeaver -.settings/org.sonarlint.eclipse.core.prefs \ No newline at end of file +.settings/org.sonarlint.eclipse.core.prefs +.DS_Store +*.swp +local +.dbeaver* +**/*.log +.directory +venv/ +target +.cache +dependency-reduced-pom.xml +.project +.classpath +pom.xml.versionsBackup +~* +*.lock +*.bak +*.orig +*.old +*.md.html +/.apt_generated/ +/.apt_generated_tests/ diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index e3a85800..8b5a9aaa 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -111,6 +111,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=enabled org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false @@ -119,12 +120,20 @@ 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 @@ -142,6 +151,7 @@ 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_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 @@ -149,14 +159,18 @@ 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_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 @@ -165,6 +179,7 @@ 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=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line @@ -176,6 +191,8 @@ 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_lambda_body=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_record_constructor=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_record_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.align_tags_descriptions_grouped=true @@ -193,6 +210,7 @@ org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false org.eclipse.jdt.core.formatter.comment.indent_root_tags=false 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=do not insert org.eclipse.jdt.core.formatter.comment.line_length=120 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true @@ -208,6 +226,7 @@ org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=fals 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 @@ -234,6 +253,8 @@ org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=d org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not 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 @@ -263,13 +284,16 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arg 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_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 @@ -286,6 +310,7 @@ org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not ins 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 @@ -302,6 +327,8 @@ 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 @@ -321,6 +348,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not in 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 @@ -347,7 +375,9 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_ar 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_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 @@ -365,6 +395,8 @@ org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_ 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_record_constructor=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_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 @@ -380,6 +412,7 @@ 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 @@ -419,6 +452,8 @@ 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_never org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line=one_line_never 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 @@ -428,7 +463,12 @@ org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never 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 @@ -438,14 +478,17 @@ org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=commo 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=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true 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 diff --git a/.settings/org.eclipse.jdt.ui.prefs b/.settings/org.eclipse.jdt.ui.prefs index e7e7880e..1add06a7 100644 --- a/.settings/org.eclipse.jdt.ui.prefs +++ b/.settings/org.eclipse.jdt.ui.prefs @@ -61,11 +61,12 @@ cleanup_settings_version=2 eclipse.preferences.version=1 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_Exasol -formatter_settings_version=16 +formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true org.eclipse.jdt.ui.importorder=java;javax;org;com; org.eclipse.jdt.ui.ondemandthreshold=3 org.eclipse.jdt.ui.staticondemandthreshold=3 +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -79,26 +80,73 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=true sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=false +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=true sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=false +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false sp_cleanup.remove_redundant_semicolons=true @@ -106,6 +154,7 @@ sp_cleanup.remove_redundant_type_arguments=true sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -114,14 +163,43 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=false sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=false +sp_cleanup.useless_return=false +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/dependencies.md b/dependencies.md index 50a21c51..7838e4bd 100644 --- a/dependencies.md +++ b/dependencies.md @@ -11,90 +11,88 @@ | [SLF4J JDK14 Binding][6] | [MIT License][7] | | [database-cleaner][8] | [MIT][9] | | [BucketFS Java][10] | [MIT][9] | -| [JUnit][12] | [Eclipse Public License 1.0][13] | ## Test Dependencies | Dependency | License | | ---------------------------------------------- | --------------------------------- | | [Testcontainers :: JUnit Jupiter Extension][2] | [MIT][3] | -| [JUnit Jupiter Engine][16] | [Eclipse Public License v2.0][17] | -| [JUnit Jupiter Params][16] | [Eclipse Public License v2.0][17] | -| [Hamcrest][20] | [BSD License 3][21] | -| [mockito-junit-jupiter][22] | [The MIT License][23] | +| [JUnit Jupiter Engine][14] | [Eclipse Public License v2.0][15] | +| [JUnit Jupiter Params][14] | [Eclipse Public License v2.0][15] | +| [Hamcrest][18] | [BSD License 3][19] | +| [mockito-junit-jupiter][20] | [The MIT License][21] | ## Runtime Dependencies | Dependency | License | | ----------------------------- | ----------------------- | -| [EXASolution JDBC Driver][24] | [EXAClient License][25] | +| [EXASolution JDBC Driver][22] | [EXAClient License][23] | ## Plugin Dependencies | Dependency | License | | ------------------------------------------------------- | ---------------------------------------------- | -| [Project keeper maven plugin][26] | [MIT][9] | -| [Maven Surefire Plugin][28] | [Apache License, Version 2.0][1] | -| [Maven Failsafe Plugin][30] | [Apache License, Version 2.0][1] | -| [JaCoCo :: Maven Plugin][32] | [Eclipse Public License 2.0][33] | -| [Apache Maven Compiler Plugin][34] | [Apache License, Version 2.0][1] | -| [OpenFastTrace Maven Plugin][36] | [GNU General Public License v3.0][37] | -| [Apache Maven Source Plugin][38] | [Apache License, Version 2.0][1] | -| [Apache Maven Javadoc Plugin][40] | [Apache License, Version 2.0][1] | -| [Apache Maven GPG Plugin][42] | [Apache License, Version 2.0][1] | -| [org.sonatype.ossindex.maven:ossindex-maven-plugin][44] | [ASL2][45] | -| [Versions Maven Plugin][46] | [Apache License, Version 2.0][1] | -| [Apache Maven Enforcer Plugin][48] | [Apache License, Version 2.0][1] | -| [Apache Maven Deploy Plugin][50] | [Apache License, Version 2.0][1] | -| [Nexus Staging Maven Plugin][52] | [Eclipse Public License][13] | -| [error-code-crawler-maven-plugin][54] | [MIT][9] | -| [Reproducible Build Maven Plugin][56] | [Apache 2.0][45] | -| [Maven Clean Plugin][58] | [The Apache Software License, Version 2.0][45] | -| [Maven Resources Plugin][60] | [The Apache Software License, Version 2.0][45] | -| [Maven JAR Plugin][62] | [The Apache Software License, Version 2.0][45] | -| [Maven Install Plugin][64] | [The Apache Software License, Version 2.0][45] | -| [Maven Site Plugin 3][66] | [The Apache Software License, Version 2.0][45] | +| [Project keeper maven plugin][24] | [MIT][9] | +| [Maven Surefire Plugin][26] | [Apache License, Version 2.0][1] | +| [Maven Failsafe Plugin][28] | [Apache License, Version 2.0][1] | +| [JaCoCo :: Maven Plugin][30] | [Eclipse Public License 2.0][31] | +| [Apache Maven Compiler Plugin][32] | [Apache License, Version 2.0][1] | +| [OpenFastTrace Maven Plugin][34] | [GNU General Public License v3.0][35] | +| [Apache Maven Source Plugin][36] | [Apache License, Version 2.0][1] | +| [Apache Maven Javadoc Plugin][38] | [Apache License, Version 2.0][1] | +| [Apache Maven GPG Plugin][40] | [Apache License, Version 2.0][1] | +| [org.sonatype.ossindex.maven:ossindex-maven-plugin][42] | [ASL2][43] | +| [Versions Maven Plugin][44] | [Apache License, Version 2.0][1] | +| [Apache Maven Enforcer Plugin][46] | [Apache License, Version 2.0][1] | +| [Apache Maven Deploy Plugin][48] | [Apache License, Version 2.0][1] | +| [Nexus Staging Maven Plugin][50] | [Eclipse Public License][51] | +| [error-code-crawler-maven-plugin][52] | [MIT][9] | +| [Reproducible Build Maven Plugin][54] | [Apache 2.0][43] | +| [Maven Clean Plugin][56] | [The Apache Software License, Version 2.0][43] | +| [Maven Resources Plugin][58] | [The Apache Software License, Version 2.0][43] | +| [Maven JAR Plugin][60] | [The Apache Software License, Version 2.0][43] | +| [Maven Install Plugin][62] | [The Apache Software License, Version 2.0][43] | +| [Maven Site Plugin 3][64] | [The Apache Software License, Version 2.0][43] | -[26]: https://github.com/exasol/project-keeper-maven-plugin +[24]: https://github.com/exasol/project-keeper-maven-plugin [10]: https://github.com/exasol/bucketfs-java -[45]: http://www.apache.org/licenses/LICENSE-2.0.txt -[28]: https://maven.apache.org/surefire/maven-surefire-plugin/ -[52]: http://www.sonatype.com/public-parent/nexus-maven-plugins/nexus-staging/nexus-staging-maven-plugin/ -[58]: http://maven.apache.org/plugins/maven-clean-plugin/ -[25]: https://docs.exasol.com/connect_exasol/drivers/jdbc.htm +[43]: http://www.apache.org/licenses/LICENSE-2.0.txt +[26]: https://maven.apache.org/surefire/maven-surefire-plugin/ +[50]: http://www.sonatype.com/public-parent/nexus-maven-plugins/nexus-staging/nexus-staging-maven-plugin/ +[56]: http://maven.apache.org/plugins/maven-clean-plugin/ +[23]: https://docs.exasol.com/connect_exasol/drivers/jdbc.htm [9]: https://opensource.org/licenses/MIT -[22]: https://github.com/mockito/mockito -[30]: https://maven.apache.org/surefire/maven-failsafe-plugin/ +[20]: https://github.com/mockito/mockito +[28]: https://maven.apache.org/surefire/maven-failsafe-plugin/ [0]: https://commons.apache.org/proper/commons-compress/ -[46]: http://www.mojohaus.org/versions-maven-plugin/ -[21]: http://opensource.org/licenses/BSD-3-Clause -[34]: https://maven.apache.org/plugins/maven-compiler-plugin/ +[44]: http://www.mojohaus.org/versions-maven-plugin/ +[19]: http://opensource.org/licenses/BSD-3-Clause +[32]: https://maven.apache.org/plugins/maven-compiler-plugin/ [3]: http://opensource.org/licenses/MIT -[36]: https://github.com/itsallcode/openfasttrace-maven-plugin -[12]: http://junit.org -[33]: https://www.eclipse.org/legal/epl-2.0/ -[50]: https://maven.apache.org/plugins/maven-deploy-plugin/ -[13]: http://www.eclipse.org/legal/epl-v10.html -[32]: https://www.jacoco.org/jacoco/trunk/doc/maven.html -[23]: https://github.com/mockito/mockito/blob/main/LICENSE -[56]: http://zlika.github.io/reproducible-build-maven-plugin -[37]: https://www.gnu.org/licenses/gpl-3.0.html -[62]: http://maven.apache.org/plugins/maven-jar-plugin/ +[34]: https://github.com/itsallcode/openfasttrace-maven-plugin +[31]: https://www.eclipse.org/legal/epl-2.0/ +[48]: https://maven.apache.org/plugins/maven-deploy-plugin/ +[51]: http://www.eclipse.org/legal/epl-v10.html +[30]: https://www.jacoco.org/jacoco/trunk/doc/maven.html +[21]: https://github.com/mockito/mockito/blob/main/LICENSE +[54]: http://zlika.github.io/reproducible-build-maven-plugin +[35]: https://www.gnu.org/licenses/gpl-3.0.html +[60]: http://maven.apache.org/plugins/maven-jar-plugin/ [7]: http://www.opensource.org/licenses/mit-license.php [1]: https://www.apache.org/licenses/LICENSE-2.0.txt -[48]: https://maven.apache.org/enforcer/maven-enforcer-plugin/ -[24]: http://www.exasol.com -[17]: https://www.eclipse.org/legal/epl-v20.html -[64]: http://maven.apache.org/plugins/maven-install-plugin/ -[16]: https://junit.org/junit5/ -[44]: https://sonatype.github.io/ossindex-maven/maven-plugin/ -[42]: https://maven.apache.org/plugins/maven-gpg-plugin/ +[46]: https://maven.apache.org/enforcer/maven-enforcer-plugin/ +[22]: http://www.exasol.com +[15]: https://www.eclipse.org/legal/epl-v20.html +[62]: http://maven.apache.org/plugins/maven-install-plugin/ +[14]: https://junit.org/junit5/ +[42]: https://sonatype.github.io/ossindex-maven/maven-plugin/ +[40]: https://maven.apache.org/plugins/maven-gpg-plugin/ [2]: https://testcontainers.org -[38]: https://maven.apache.org/plugins/maven-source-plugin/ -[20]: http://hamcrest.org/JavaHamcrest/ +[36]: https://maven.apache.org/plugins/maven-source-plugin/ +[18]: http://hamcrest.org/JavaHamcrest/ [6]: http://www.slf4j.org -[66]: http://maven.apache.org/plugins/maven-site-plugin/ -[60]: http://maven.apache.org/plugins/maven-resources-plugin/ -[40]: https://maven.apache.org/plugins/maven-javadoc-plugin/ +[64]: http://maven.apache.org/plugins/maven-site-plugin/ +[58]: http://maven.apache.org/plugins/maven-resources-plugin/ +[38]: https://maven.apache.org/plugins/maven-javadoc-plugin/ [8]: https://github.com/exasol/database-cleaner -[54]: https://github.com/exasol/error-code-crawler-maven-plugin +[52]: https://github.com/exasol/error-code-crawler-maven-plugin diff --git a/doc/changes/changelog.md b/doc/changes/changelog.md index 95f8cb63..7490eef1 100644 --- a/doc/changes/changelog.md +++ b/doc/changes/changelog.md @@ -1,5 +1,6 @@ # Changes +* [5.1.2](changes_5.1.2.md) * [5.1.1](changes_5.1.1.md) * [5.1.0](changes_5.1.0.md) * [5.0.0](changes_5.0.0.md) diff --git a/doc/changes/changes_5.1.2.md b/doc/changes/changes_5.1.2.md new file mode 100644 index 00000000..95d62482 --- /dev/null +++ b/doc/changes/changes_5.1.2.md @@ -0,0 +1,30 @@ +# Test containers for Exasol on Docker 5.1.2, released 2021-11-26 + +Code name: 5.1.2 -- Dependency updates + +## Features + +* #174: Upgaded `testcontainers` to 1.16.2 to fix security issue. + +## Dependency Updates + +### Compile Dependency Updates + +* Removed `junit:junit:4.13.2` +* Updated `org.testcontainers:jdbc:1.16.0` to `1.16.2` +* Updated `org.testcontainers:testcontainers:1.16.0` to `1.16.2` + +### Runtime Dependency Updates + +* Updated `com.exasol:exasol-jdbc:7.1.1` to `7.1.2` + +### Test Dependency Updates + +* Updated `org.junit.jupiter:junit-jupiter-engine:5.7.2` to `5.8.1` +* Updated `org.junit.jupiter:junit-jupiter-params:5.7.2` to `5.8.1` +* Updated `org.mockito:mockito-junit-jupiter:4.0.0` to `4.1.0` +* Updated `org.testcontainers:junit-jupiter:1.16.0` to `1.16.2` + +### Plugin Dependency Updates + +* Updated `com.exasol:project-keeper-maven-plugin:1.2.0` to `1.3.3` diff --git a/pom.xml b/pom.xml index 6fcc50ff..317ae9c7 100644 --- a/pom.xml +++ b/pom.xml @@ -1,8 +1,9 @@ - + + 4.0.0 com.exasol exasol-testcontainers - 5.1.1 + 5.1.2 Test containers for Exasol on Docker This module provides abstraction for generation, startup, shutdown and use of an Exasol database running on Docker. @@ -12,9 +13,9 @@ UTF-8 UTF-8 11 - 5.7.2 + 5.8.1 3.0.0-M3 - 1.16.0 + 1.16.2 true target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml @@ -84,7 +85,7 @@ expensive - + @@ -125,15 +126,9 @@ com.exasol exasol-jdbc - 7.1.1 + 7.1.2 runtime - - - junit - junit - 4.13.2 - org.testcontainers junit-jupiter @@ -161,7 +156,7 @@ org.mockito mockito-junit-jupiter - 4.0.0 + 4.1.0 test @@ -170,7 +165,7 @@ com.exasol project-keeper-maven-plugin - 1.2.0 + 1.3.3 @@ -316,7 +311,7 @@ UTF-8 - + true true true @@ -354,13 +349,6 @@ - - - - 7ea56ad4-8a8b-4e51-8ed9-5aad83d8efb1 - - org.codehaus.mojo @@ -392,7 +380,7 @@ - 3.3.9 + 3.6.3 diff --git a/src/main/java/com/exasol/clusterlogs/LogPatternDetector.java b/src/main/java/com/exasol/clusterlogs/LogPatternDetector.java index 58598ff6..b7f11b85 100644 --- a/src/main/java/com/exasol/clusterlogs/LogPatternDetector.java +++ b/src/main/java/com/exasol/clusterlogs/LogPatternDetector.java @@ -43,7 +43,9 @@ public class LogPatternDetector { /** * Check whether a certain pattern appears in a log message. - *

Implementation notes

+ *

+ * Implementation notes + *

*

* We use {@code find} to locate the log file(s) matching the filename search pattern. This {@code find} command * then executes a command that searches the files. diff --git a/src/main/java/com/exasol/containers/ContainerFileOperations.java b/src/main/java/com/exasol/containers/ContainerFileOperations.java index 685aa6bd..ffcc5003 100644 --- a/src/main/java/com/exasol/containers/ContainerFileOperations.java +++ b/src/main/java/com/exasol/containers/ContainerFileOperations.java @@ -15,6 +15,11 @@ public class ContainerFileOperations { private final ExasolContainer> container; + /** + * Create a new instance of the {@link ContainerFileOperations}. + * + * @param container Container reference required for executing commands inside the container. + */ public ContainerFileOperations(final ExasolContainer> container) { this.container = container; } diff --git a/src/main/java/com/exasol/containers/ExasolContainer.java b/src/main/java/com/exasol/containers/ExasolContainer.java index 4e280f8c..be76d310 100644 --- a/src/main/java/com/exasol/containers/ExasolContainer.java +++ b/src/main/java/com/exasol/containers/ExasolContainer.java @@ -51,9 +51,17 @@ import com.github.dockerjava.api.command.InspectContainerResponse.ContainerState; import com.github.dockerjava.api.model.ContainerNetwork; +/** + * Exasol-specific extension of the {@link JdbcDatabaseContainer} concept. + *

+ * Adds fine-grained service readiness checks, BucketFS access, driver management and a lot more Exasol-specific + * functions on top of basic JDBC connection support. + *

+ * + * @param container type self reference + */ // [external->dsn~testcontainer-framework-controls-docker-image-download~1] // [impl->dsn~exasol-container-controls-docker-container~1] - @SuppressWarnings("squid:S2160") // Superclass adds state but does not override equals() and hashCode(). public class ExasolContainer> extends JdbcDatabaseContainer { private static final Logger LOGGER = LoggerFactory.getLogger(ExasolContainer.class); @@ -219,15 +227,6 @@ public int getDefaultInternalDatabasePort() { } } - public static class PortDetectionException extends UnsupportedOperationException { - private static final long serialVersionUID = -1871794026177194823L; - - public PortDetectionException(final String service) { - super("Could not detect internal " + service + " port for custom image. " - + "Please specify the port explicitly using withExposedPorts()."); - } - } - @Override public Set getLivenessCheckPortNumbers() { return Set.of(getFirstMappedDatabasePort()); @@ -495,6 +494,9 @@ protected void waitUntilContainerStarted() { } } + /** + * Wait for BucketFS to become operational. + */ protected void waitForBucketFs() { if (isServiceReady(BUCKETFS)) { LOGGER.debug("BucketFS marked running in container status cache. Skipping startup monitoring."); @@ -509,6 +511,9 @@ protected void waitForBucketFs() { } } + /** + * Wait until the UDF container is available. + */ protected void waitForUdfContainer() { if (isServiceReady(UDF)) { LOGGER.debug("UDF Containter marked running in container status cache. Skipping startup monitoring."); @@ -570,6 +575,9 @@ private void cacheContainerStatus() { this.statusCache.write(this.getContainerId(), this.status); } + /** + * Wait until we can read from the Exasol cluster configuration. + */ protected void waitUntilClusterConfigurationAvailable() { if (!this.reused) { LOGGER.debug("Waiting for cluster configuration to become available."); diff --git a/src/main/java/com/exasol/containers/ExasolContainerConstants.java b/src/main/java/com/exasol/containers/ExasolContainerConstants.java index aab2d4bb..f63424d5 100644 --- a/src/main/java/com/exasol/containers/ExasolContainerConstants.java +++ b/src/main/java/com/exasol/containers/ExasolContainerConstants.java @@ -6,29 +6,64 @@ * Constants for the Exasol Docker containers (like image ID and version). */ public final class ExasolContainerConstants { - public static final String EXASOL_DOCKER_IMAGE_VERSION = "7.1.1"; + /** Version of the Exasol Docker image */ + public static final String EXASOL_DOCKER_IMAGE_VERSION = "7.1.2"; + + /** Reference name of the Exasol Docker image */ public static final String EXASOL_DOCKER_IMAGE_ID = "exasol/docker-db"; + + /** Complete Docker image reference */ public static final String EXASOL_DOCKER_IMAGE_REFERENCE = EXASOL_DOCKER_IMAGE_ID + ":" + EXASOL_DOCKER_IMAGE_VERSION; + + /** Exasol initial administrator username */ public static final String DEFAULT_ADMIN_USER = "SYS"; + // The following assignment intentionally contains the initial password for the database administrator. // Keep in mind that this project deals with disposable containers that should only be used in integration tests. + /** Initial administrator password */ @SuppressWarnings("squid:S2068") public static final String DEFAULT_SYS_USER_PASSWORD = "exasol"; - @SuppressWarnings("squid:S1075") // This is the default URI where EXAConf is supposed to be located. + + /** Default path of the central EXAConf configuration file. */ + @SuppressWarnings("squid:S1075") public static final String CLUSTER_CONFIGURATION_PATH = "/exa/etc/EXAConf"; + + /** Default path of all Exasol logs */ @SuppressWarnings("squid:S1075") // This is the parent directory of all logs in the Docker version of Exasol public static final String EXASOL_LOGS_PATH = "/exa/logs"; + + /** Path to core daemon logs */ public static final String EXASOL_CORE_DAEMON_LOGS_PATH = EXASOL_LOGS_PATH + "/cored"; + + /** Reference name for the service used in the container factory */ public static final String NAME = "exasol"; + + /** JDBC main class */ public static final String JDBC_DRIVER_CLASS = "com.exasol.jdbc.EXADriver"; + + /** BucketFS log filename pattern */ public static final String BUCKETFS_DAEMON_LOG_FILENAME_PATTERN = "bucketfsd.*.log"; + + /** File extensions of supported (i.e. auto-expanded) archive formats in BucketFS */ public static final Set SUPPORTED_ARCHIVE_EXTENSIONS = Set.of(".tar", ".tgz", ".tar.gz", ".zip"); + + /** Name of the property with which the docker image name can be overridden */ public static final String DOCKER_IMAGE_OVERRIDE_PROPERTY = "com.exasol.dockerdb.image"; + + /** Default database port for Exasol versions in Docker before 7.0 */ static final int DEFAULT_CONTAINER_INTERNAL_DATABASE_PORT = 8888; + + /** Default database port for Exasol versions in Docker from 7.0 on */ static final int DEFAULT_CONTAINER_INTERNAL_DATABASE_PORT_V7_AND_ABOVE = 8563; + + /** Default BucketFS port for Exasol versions in Docker before 7.0 */ static final int DEFAULT_CONTAINER_INTERNAL_BUCKETFS_PORT = 6583; + + /** Default BucketFS port for Exasol versions in Docker from 7.0 on */ static final int DEFAULT_CONTAINER_INTERNAL_BUCKETFS_PORT_V7_AND_ABOVE = 2580; + + /** Default RPC port for Exasol versions in Docker */ static final int DEFAULT_CONTAINER_INTERNAL_RPC_PORT = 443; private ExasolContainerConstants() { diff --git a/src/main/java/com/exasol/containers/PortDetectionException.java b/src/main/java/com/exasol/containers/PortDetectionException.java new file mode 100644 index 00000000..776d8494 --- /dev/null +++ b/src/main/java/com/exasol/containers/PortDetectionException.java @@ -0,0 +1,18 @@ +package com.exasol.containers; + +/** + * Exception for failed detection of service ports. + */ +public class PortDetectionException extends UnsupportedOperationException { + private static final long serialVersionUID = -1871794026177194823L; + + /** + * Create a new instance of a {@link PortDetectionException}. + * + * @param service service for which the port could not be detected. + */ + public PortDetectionException(final String service) { + super("Could not detect internal " + service + " port for custom image. " + + "Please specify the port explicitly using withExposedPorts()."); + } +} \ No newline at end of file diff --git a/src/main/java/com/exasol/containers/exec/ExitCode.java b/src/main/java/com/exasol/containers/exec/ExitCode.java index 99f70837..4ff90723 100644 --- a/src/main/java/com/exasol/containers/exec/ExitCode.java +++ b/src/main/java/com/exasol/containers/exec/ExitCode.java @@ -4,6 +4,7 @@ * Exit codes for in-container command execution. */ public final class ExitCode { + /** Exit code to signal successful completion */ public static final int OK = 0; private ExitCode() { diff --git a/src/main/java/com/exasol/containers/status/ServiceStatus.java b/src/main/java/com/exasol/containers/status/ServiceStatus.java index 7d7031d6..5e3b9ddb 100644 --- a/src/main/java/com/exasol/containers/status/ServiceStatus.java +++ b/src/main/java/com/exasol/containers/status/ServiceStatus.java @@ -6,7 +6,10 @@ * Status of a service (like BucketFs). */ public enum ServiceStatus implements Serializable { - NOT_READY, // service is no available yet - READY, // service can be used - NOT_CHECKED // service state has not yet been determined + /** service is no available yet */ + NOT_READY, + /** service can be used */ + READY, + /** service state has not yet been determined */ + NOT_CHECKED } \ No newline at end of file diff --git a/src/main/java/com/exasol/containers/wait/strategy/LogFileEntryWaitStrategy.java b/src/main/java/com/exasol/containers/wait/strategy/LogFileEntryWaitStrategy.java index 531ce083..6d39ddde 100644 --- a/src/main/java/com/exasol/containers/wait/strategy/LogFileEntryWaitStrategy.java +++ b/src/main/java/com/exasol/containers/wait/strategy/LogFileEntryWaitStrategy.java @@ -63,6 +63,11 @@ protected void waitUntilReady() { + this.detector.getActualLog() + "\""); } + /** + * Get the timeout in milliseconds. + * + * @return timeout in milliseconds + */ protected long getWaitTimeOutMilliseconds() { return WAIT_DURATION_IN_MILLISECONDS; } diff --git a/src/main/java/com/exasol/containers/wait/strategy/UdfContainerWaitStrategy.java b/src/main/java/com/exasol/containers/wait/strategy/UdfContainerWaitStrategy.java index 5a18e165..9f8287b4 100644 --- a/src/main/java/com/exasol/containers/wait/strategy/UdfContainerWaitStrategy.java +++ b/src/main/java/com/exasol/containers/wait/strategy/UdfContainerWaitStrategy.java @@ -14,6 +14,7 @@ * Strategy for waiting until the UDF language container is ready. */ public class UdfContainerWaitStrategy extends LogFileEntryWaitStrategy { + /** Pattern for detecting extraction of script language containers */ public static final String SCRIPT_LANGUAGE_CONTAINER_READY_PATTERN = "ScriptLanguages.*extracted$"; private static final long WAIT_FOR_UDF_CONTAINER_DURATION_IN_MILLISECONDS = TimeUnit.MINUTES.toMillis(10); private static final Logger LOGGER = LoggerFactory.getLogger(UdfContainerWaitStrategy.class); diff --git a/src/main/java/com/exasol/containers/workarounds/WorkaroundManager.java b/src/main/java/com/exasol/containers/workarounds/WorkaroundManager.java index 162460a4..4833f081 100644 --- a/src/main/java/com/exasol/containers/workarounds/WorkaroundManager.java +++ b/src/main/java/com/exasol/containers/workarounds/WorkaroundManager.java @@ -7,6 +7,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * Manager for automatically applied workarounds for container version quirks. + */ public class WorkaroundManager { private static final Logger LOGGER = LoggerFactory.getLogger(WorkaroundManager.class); private final Workaround[] workarounds; diff --git a/src/main/java/com/exasol/database/DatabaseServiceException.java b/src/main/java/com/exasol/database/DatabaseServiceException.java index d81c3779..a1fbdd1e 100644 --- a/src/main/java/com/exasol/database/DatabaseServiceException.java +++ b/src/main/java/com/exasol/database/DatabaseServiceException.java @@ -20,6 +20,12 @@ public DatabaseServiceException(final String databaseName, final String message, this.databaseName = databaseName; } + /** + * Create a new instance of a {@link DatabaseServiceException}. + * + * @param databaseName name of the affected database + * @param message error message + */ public DatabaseServiceException(final String databaseName, final String message) { super(message); this.databaseName = databaseName; diff --git a/src/main/java/com/exasol/drivers/ExasolDriverManager.java b/src/main/java/com/exasol/drivers/ExasolDriverManager.java index 470b74bc..f9845035 100644 --- a/src/main/java/com/exasol/drivers/ExasolDriverManager.java +++ b/src/main/java/com/exasol/drivers/ExasolDriverManager.java @@ -85,6 +85,11 @@ private void uploadManifest(final String manifest) { } } + /** + * Get a list of all installed drivers. + * + * @return list of installed drivers + */ public Collection getDrivers() { return this.installedDrivers.values(); } diff --git a/src/main/java/com/exasol/drivers/JdbcDriver.java b/src/main/java/com/exasol/drivers/JdbcDriver.java index aa8b09d8..8096c7ac 100644 --- a/src/main/java/com/exasol/drivers/JdbcDriver.java +++ b/src/main/java/com/exasol/drivers/JdbcDriver.java @@ -91,6 +91,9 @@ public String getManifest() { + "INSERTSIZE=-1"; } + /** + * Builder for {@link JdbcDriver} instances. + */ public static class Builder { private final String name; private String prefix; diff --git a/src/main/java/com/exasol/exaoperation/plugin/Plugin.java b/src/main/java/com/exasol/exaoperation/plugin/Plugin.java index bf0c4f3f..03791796 100644 --- a/src/main/java/com/exasol/exaoperation/plugin/Plugin.java +++ b/src/main/java/com/exasol/exaoperation/plugin/Plugin.java @@ -23,6 +23,7 @@ *

*/ public class Plugin { + /** Plugin package prefix */ public static final String PLUGIN_PACKAGE_PREFIX = "Plugin."; private static final Logger LOGGER = LoggerFactory.getLogger(Plugin.class); @SuppressWarnings("squid:S4784") // This is a test framework RegEx DoS attacks are unrealistic since this would mean diff --git a/src/main/java/com/exasol/support/SupportInformationRetriever.java b/src/main/java/com/exasol/support/SupportInformationRetriever.java index 814bfbbd..af990c40 100644 --- a/src/main/java/com/exasol/support/SupportInformationRetriever.java +++ b/src/main/java/com/exasol/support/SupportInformationRetriever.java @@ -18,7 +18,9 @@ * Manages getting support information (like cluster logs, configuration settings and core-dumps) from the database. */ public class SupportInformationRetriever { + /** Name of the property that allows overriding the target directory where support information packages will be stored */ public static final String TARGET_DIRECTORY_PROPERTY = "com.exasol.containers.support_information_target_dir"; + /** Name of the property that allows overriding the monitored container exit */ public static final String MONITORED_EXIT_PROPERTY = "com.exasol.containers.monitored_exit"; static final String SUPPORT_ARCHIVE_PREFIX = "exacluster_debuginfo_"; private static final String EXASUPPORT_EXECUTABLE = "exasupport";