From e161b0a1f71ded0d6315588ddaa80632c0c83bcd Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Thu, 21 Dec 2023 09:51:15 +0100 Subject: [PATCH] #51: Upgrade dependencies (#52) --- .github/workflows/broken_links_checker.yml | 2 + .github/workflows/ci-build-next-java.yml | 8 +- .github/workflows/ci-build.yml | 26 ++-- .github/workflows/dependencies_check.yml | 11 +- ...elease_droid_prepare_original_checksum.yml | 11 +- .../release_droid_print_quick_checksum.yml | 11 +- ...release_droid_release_on_maven_central.yml | 9 +- ...ase_droid_upload_github_release_assets.yml | 11 +- .project-keeper.yml | 4 +- .vscode/settings.json | 8 +- dependencies.md | 123 +++++++++--------- doc/changes/changelog.md | 1 + doc/changes/changes_1.6.4.md | 34 +++++ pk_generated_parent.pom | 34 ++++- pom.xml | 29 +++-- .../matcher/ResultSetStructureMatcher.java | 39 +++--- 16 files changed, 223 insertions(+), 138 deletions(-) create mode 100644 doc/changes/changes_1.6.4.md diff --git a/.github/workflows/broken_links_checker.yml b/.github/workflows/broken_links_checker.yml index 82ec1cd..0fbcad5 100644 --- a/.github/workflows/broken_links_checker.yml +++ b/.github/workflows/broken_links_checker.yml @@ -1,3 +1,5 @@ +# Generated by Project Keeper +# https://github.com/exasol/project-keeper/blob/main/project-keeper/src/main/resources/templates/.github/workflows/broken_links_checker.yml name: Broken Links Checker on: diff --git a/.github/workflows/ci-build-next-java.yml b/.github/workflows/ci-build-next-java.yml index 7cbab08..e3acdb7 100644 --- a/.github/workflows/ci-build-next-java.yml +++ b/.github/workflows/ci-build-next-java.yml @@ -1,5 +1,6 @@ +# Generated by Project Keeper +# https://github.com/exasol/project-keeper/blob/main/project-keeper/src/main/resources/templates/.github/workflows/ci-build-next-java.yml name: CI Build next Java - on: push: branches: @@ -18,7 +19,7 @@ jobs: with: fetch-depth: 0 - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "temurin" java-version: 17 @@ -26,8 +27,9 @@ jobs: - name: Run tests and build with Maven run: | mvn --batch-mode --update-snapshots clean package -DtrimStackTrace=false \ + -Djava.version=17 \ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn - - name: Publish Test Report + - name: Publish Test Report for Java 17 uses: scacap/action-surefire-report@v1 if: ${{ always() && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }} with: diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 583fcc4..8f18f3e 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -8,7 +8,7 @@ on: pull_request: jobs: - build: + matrix-build: runs-on: ubuntu-latest concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.exasol_db_version }} @@ -16,9 +16,9 @@ jobs: strategy: fail-fast: false matrix: - exasol_db_version: ["8.23.1", "7.1.24"] + exasol_db_version: ["8.24.0", "7.1.25"] env: - DEFAULT_EXASOL_DB_VERSION: "8.23.1" + DEFAULT_EXASOL_DB_VERSION: "8.24.0" steps: - name: Free Disk Space if: ${{ false }} @@ -29,13 +29,13 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up JDK 11 & 17 - uses: actions/setup-java@v3 + - name: Set up JDKs + uses: actions/setup-java@v4 with: distribution: "temurin" java-version: | - 17 11 + 17 cache: "maven" - name: Cache SonarCloud packages uses: actions/cache@v3 @@ -47,7 +47,7 @@ jobs: run: echo 'testcontainers.reuse.enable=true' > "$HOME/.testcontainers.properties" - name: Run tests and build with Maven run: | - JAVA_HOME=$JAVA_HOME_11_X64 mvn --batch-mode clean verify \ + mvn --batch-mode clean verify \ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ -DtrimStackTrace=false \ -Dcom.exasol.dockerdb.image=${{ matrix.exasol_db_version }} @@ -55,7 +55,7 @@ jobs: # Set additional environment variable as in scala projects the scalatest plugin does not forward # the system property -Dcom.exasol.dockerdb.image to the test's implementation. EXASOL_DB_VERSION: ${{ matrix.exasol_db_version }} - - name: Publish Test Report + - name: Publish Test Report for Exasol ${{ matrix.exasol_db_version }} uses: scacap/action-surefire-report@v1 if: ${{ always() && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }} with: @@ -63,12 +63,16 @@ jobs: - name: Sonar analysis if: ${{ env.SONAR_TOKEN != null && matrix.exasol_db_version == env.DEFAULT_EXASOL_DB_VERSION }} run: | - JAVA_HOME=$JAVA_HOME_17_X64 mvn --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ + mvn --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ -DtrimStackTrace=false \ - -Dsonar.organization=exasol \ - -Dsonar.host.url=https://sonarcloud.io \ -Dsonar.token=$SONAR_TOKEN env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + + build: + needs: matrix-build + runs-on: ubuntu-latest + steps: + - run: echo "Build successful" diff --git a/.github/workflows/dependencies_check.yml b/.github/workflows/dependencies_check.yml index 4b6eadf..87b64ba 100644 --- a/.github/workflows/dependencies_check.yml +++ b/.github/workflows/dependencies_check.yml @@ -1,5 +1,6 @@ +# Generated by Project Keeper +# https://github.com/exasol/project-keeper/blob/main/project-keeper/src/main/resources/templates/.github/workflows/dependencies_check.yml name: Report Security Issues for Repository - on: workflow_dispatch: schedule: @@ -13,11 +14,13 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up JDK 11 - uses: actions/setup-java@v3 + - name: Set up JDKs + uses: actions/setup-java@v4 with: distribution: "temurin" - java-version: 11 + java-version: | + 11 + 17 cache: "maven" - name: Generate ossindex report diff --git a/.github/workflows/release_droid_prepare_original_checksum.yml b/.github/workflows/release_droid_prepare_original_checksum.yml index ba96c12..4f58aab 100644 --- a/.github/workflows/release_droid_prepare_original_checksum.yml +++ b/.github/workflows/release_droid_prepare_original_checksum.yml @@ -1,5 +1,6 @@ +# Generated by Project Keeper +# https://github.com/exasol/project-keeper/blob/main/project-keeper/src/main/resources/templates/.github/workflows/release_droid_prepare_original_checksum.yml name: Release Droid - Prepare Original Checksum - on: workflow_dispatch: @@ -16,11 +17,13 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up JDK 11 - uses: actions/setup-java@v3 + - name: Set up JDKs + uses: actions/setup-java@v4 with: distribution: "temurin" - java-version: 11 + java-version: | + 11 + 17 cache: "maven" - name: Enable testcontainer reuse run: echo 'testcontainers.reuse.enable=true' > "$HOME/.testcontainers.properties" diff --git a/.github/workflows/release_droid_print_quick_checksum.yml b/.github/workflows/release_droid_print_quick_checksum.yml index aed4444..86979cd 100644 --- a/.github/workflows/release_droid_print_quick_checksum.yml +++ b/.github/workflows/release_droid_print_quick_checksum.yml @@ -1,5 +1,6 @@ +# Generated by Project Keeper +# https://github.com/exasol/project-keeper/blob/main/project-keeper/src/main/resources/templates/.github/workflows/release_droid_print_quick_checksum.yml name: Release Droid - Print Quick Checksum - on: workflow_dispatch: @@ -11,11 +12,13 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up JDK 11 - uses: actions/setup-java@v3 + - name: Set up JDKs + uses: actions/setup-java@v4 with: distribution: "temurin" - java-version: 11 + java-version: | + 11 + 17 cache: "maven" - name: Build with Maven skipping tests run: mvn --batch-mode clean verify -DskipTests diff --git a/.github/workflows/release_droid_release_on_maven_central.yml b/.github/workflows/release_droid_release_on_maven_central.yml index dfdbd6a..51d0659 100644 --- a/.github/workflows/release_droid_release_on_maven_central.yml +++ b/.github/workflows/release_droid_release_on_maven_central.yml @@ -1,5 +1,6 @@ +# Generated by Project Keeper +# https://github.com/exasol/project-keeper/blob/main/project-keeper/src/main/resources/templates/.github/workflows/release_droid_release_on_maven_central.yml name: Release Droid - Release On Maven Central - on: workflow_dispatch: @@ -12,10 +13,12 @@ jobs: with: fetch-depth: 0 - name: Set up Maven Central Repository - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "temurin" - java-version: 11 + java-version: | + 11 + 17 cache: "maven" 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 7ae8bbb..b19f7cf 100644 --- a/.github/workflows/release_droid_upload_github_release_assets.yml +++ b/.github/workflows/release_droid_upload_github_release_assets.yml @@ -1,5 +1,6 @@ +# Generated by Project Keeper +# https://github.com/exasol/project-keeper/blob/main/project-keeper/src/main/resources/templates/.github/workflows/release_droid_upload_github_release_assets.yml name: Release Droid - Upload GitHub Release Assets - on: workflow_dispatch: inputs: @@ -15,11 +16,13 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up JDK 11 - uses: actions/setup-java@v3 + - name: Set up JDKs + uses: actions/setup-java@v4 with: distribution: "temurin" - java-version: 11 + java-version: | + 11 + 17 cache: "maven" - name: Build with Maven skipping tests run: mvn --batch-mode clean verify -DskipTests diff --git a/.project-keeper.yml b/.project-keeper.yml index ac00894..e73a32e 100644 --- a/.project-keeper.yml +++ b/.project-keeper.yml @@ -6,5 +6,5 @@ sources: - integration_tests build: exasolDbVersions: - - "8.23.1" - - "7.1.24" + - "8.24.0" + - "7.1.25" diff --git a/.vscode/settings.json b/.vscode/settings.json index 1ad56f4..3299e21 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,10 +1,10 @@ { "editor.formatOnSave": true, "editor.codeActionsOnSave": { - "source.organizeImports": true, - "source.generate.finalModifiers": true, - "source.fixAll": true - }, + "source.organizeImports": "explicit", + "source.generate.finalModifiers": "explicit", + "source.fixAll": "explicit" +}, "java.codeGeneration.useBlocks": true, "java.saveActions.organizeImports": true, "java.sources.organizeImports.starThreshold": 3, diff --git a/dependencies.md b/dependencies.md index 0f416b1..24009e6 100644 --- a/dependencies.md +++ b/dependencies.md @@ -3,79 +3,78 @@ ## Compile Dependencies -| Dependency | License | -| ------------------------- | ------------------ | -| [Hamcrest][0] | [BSD License 3][1] | -| [error-reporting-java][2] | [MIT License][3] | +| Dependency | License | +| ------------- | ------------------ | +| [Hamcrest][0] | [BSD License 3][1] | ## Test Dependencies | Dependency | License | | ---------------------------------------------------------- | -------------------------------- | -| [JUnit Jupiter Engine][4] | [Eclipse Public License v2.0][5] | -| [JUnit Jupiter Params][4] | [Eclipse Public License v2.0][5] | -| [Apache Derby Database Engine and Embedded JDBC Driver][6] | [Apache 2][7] | -| [Test containers for Exasol on Docker][8] | [MIT License][9] | -| [Testcontainers :: JUnit Jupiter Extension][10] | [MIT][11] | -| [Testcontainers :: JDBC][10] | [MIT][11] | +| [JUnit Jupiter Engine][2] | [Eclipse Public License v2.0][3] | +| [JUnit Jupiter Params][2] | [Eclipse Public License v2.0][3] | +| [Apache Derby Database Engine and Embedded JDBC Driver][4] | [Apache 2][5] | +| [Test containers for Exasol on Docker][6] | [MIT License][7] | +| [Testcontainers :: JUnit Jupiter Extension][8] | [MIT][9] | +| [Testcontainers :: JDBC][8] | [MIT][9] | ## Plugin Dependencies | Dependency | License | | ------------------------------------------------------- | --------------------------------- | -| [SonarQube Scanner for Maven][12] | [GNU LGPL 3][13] | -| [Apache Maven Compiler Plugin][14] | [Apache-2.0][15] | -| [Apache Maven Enforcer Plugin][16] | [Apache-2.0][15] | -| [Maven Flatten Plugin][17] | [Apache Software Licenese][15] | -| [org.sonatype.ossindex.maven:ossindex-maven-plugin][18] | [ASL2][7] | -| [Maven Surefire Plugin][19] | [Apache-2.0][15] | -| [Versions Maven Plugin][20] | [Apache License, Version 2.0][15] | -| [duplicate-finder-maven-plugin Maven Mojo][21] | [Apache License 2.0][22] | -| [Apache Maven Deploy Plugin][23] | [Apache-2.0][15] | -| [Apache Maven GPG Plugin][24] | [Apache-2.0][15] | -| [Apache Maven Source Plugin][25] | [Apache License, Version 2.0][15] | -| [Apache Maven Javadoc Plugin][26] | [Apache-2.0][15] | -| [Nexus Staging Maven Plugin][27] | [Eclipse Public License][28] | -| [Maven Failsafe Plugin][29] | [Apache-2.0][15] | -| [JaCoCo :: Maven Plugin][30] | [Eclipse Public License 2.0][31] | -| [error-code-crawler-maven-plugin][32] | [MIT License][33] | -| [Reproducible Build Maven Plugin][34] | [Apache 2.0][7] | -| [Project keeper maven plugin][35] | [The MIT License][36] | +| [SonarQube Scanner for Maven][10] | [GNU LGPL 3][11] | +| [Apache Maven Toolchains Plugin][12] | [Apache License, Version 2.0][13] | +| [Apache Maven Compiler Plugin][14] | [Apache-2.0][13] | +| [Apache Maven Enforcer Plugin][15] | [Apache-2.0][13] | +| [Maven Flatten Plugin][16] | [Apache Software Licenese][13] | +| [Project Keeper Maven plugin][17] | [The MIT License][18] | +| [org.sonatype.ossindex.maven:ossindex-maven-plugin][19] | [ASL2][5] | +| [Maven Surefire Plugin][20] | [Apache-2.0][13] | +| [Versions Maven Plugin][21] | [Apache License, Version 2.0][13] | +| [duplicate-finder-maven-plugin Maven Mojo][22] | [Apache License 2.0][23] | +| [Apache Maven Deploy Plugin][24] | [Apache-2.0][13] | +| [Apache Maven GPG Plugin][25] | [Apache-2.0][13] | +| [Apache Maven Source Plugin][26] | [Apache License, Version 2.0][13] | +| [Apache Maven Javadoc Plugin][27] | [Apache-2.0][13] | +| [Nexus Staging Maven Plugin][28] | [Eclipse Public License][29] | +| [Maven Failsafe Plugin][30] | [Apache-2.0][13] | +| [JaCoCo :: Maven Plugin][31] | [Eclipse Public License 2.0][32] | +| [error-code-crawler-maven-plugin][33] | [MIT License][34] | +| [Reproducible Build Maven Plugin][35] | [Apache 2.0][5] | [0]: http://hamcrest.org/JavaHamcrest/ [1]: http://opensource.org/licenses/BSD-3-Clause -[2]: https://github.com/exasol/error-reporting-java/ -[3]: https://github.com/exasol/error-reporting-java/blob/main/LICENSE -[4]: https://junit.org/junit5/ -[5]: https://www.eclipse.org/legal/epl-v20.html -[6]: http://db.apache.org/derby/ -[7]: http://www.apache.org/licenses/LICENSE-2.0.txt -[8]: https://github.com/exasol/exasol-testcontainers/ -[9]: https://github.com/exasol/exasol-testcontainers/blob/main/LICENSE -[10]: https://java.testcontainers.org -[11]: http://opensource.org/licenses/MIT -[12]: http://sonarsource.github.io/sonar-scanner-maven/ -[13]: http://www.gnu.org/licenses/lgpl.txt +[2]: https://junit.org/junit5/ +[3]: https://www.eclipse.org/legal/epl-v20.html +[4]: http://db.apache.org/derby/ +[5]: http://www.apache.org/licenses/LICENSE-2.0.txt +[6]: https://github.com/exasol/exasol-testcontainers/ +[7]: https://github.com/exasol/exasol-testcontainers/blob/main/LICENSE +[8]: https://java.testcontainers.org +[9]: http://opensource.org/licenses/MIT +[10]: http://sonarsource.github.io/sonar-scanner-maven/ +[11]: http://www.gnu.org/licenses/lgpl.txt +[12]: https://maven.apache.org/plugins/maven-toolchains-plugin/ +[13]: https://www.apache.org/licenses/LICENSE-2.0.txt [14]: https://maven.apache.org/plugins/maven-compiler-plugin/ -[15]: https://www.apache.org/licenses/LICENSE-2.0.txt -[16]: https://maven.apache.org/enforcer/maven-enforcer-plugin/ -[17]: https://www.mojohaus.org/flatten-maven-plugin/ -[18]: https://sonatype.github.io/ossindex-maven/maven-plugin/ -[19]: https://maven.apache.org/surefire/maven-surefire-plugin/ -[20]: https://www.mojohaus.org/versions/versions-maven-plugin/ -[21]: https://basepom.github.io/duplicate-finder-maven-plugin -[22]: http://www.apache.org/licenses/LICENSE-2.0.html -[23]: https://maven.apache.org/plugins/maven-deploy-plugin/ -[24]: https://maven.apache.org/plugins/maven-gpg-plugin/ -[25]: https://maven.apache.org/plugins/maven-source-plugin/ -[26]: https://maven.apache.org/plugins/maven-javadoc-plugin/ -[27]: http://www.sonatype.com/public-parent/nexus-maven-plugins/nexus-staging/nexus-staging-maven-plugin/ -[28]: http://www.eclipse.org/legal/epl-v10.html -[29]: https://maven.apache.org/surefire/maven-failsafe-plugin/ -[30]: https://www.jacoco.org/jacoco/trunk/doc/maven.html -[31]: https://www.eclipse.org/legal/epl-2.0/ -[32]: https://github.com/exasol/error-code-crawler-maven-plugin/ -[33]: https://github.com/exasol/error-code-crawler-maven-plugin/blob/main/LICENSE -[34]: http://zlika.github.io/reproducible-build-maven-plugin -[35]: https://github.com/exasol/project-keeper/ -[36]: https://github.com/exasol/project-keeper/blob/main/LICENSE +[15]: https://maven.apache.org/enforcer/maven-enforcer-plugin/ +[16]: https://www.mojohaus.org/flatten-maven-plugin/ +[17]: https://github.com/exasol/project-keeper/ +[18]: https://github.com/exasol/project-keeper/blob/main/LICENSE +[19]: https://sonatype.github.io/ossindex-maven/maven-plugin/ +[20]: https://maven.apache.org/surefire/maven-surefire-plugin/ +[21]: https://www.mojohaus.org/versions/versions-maven-plugin/ +[22]: https://basepom.github.io/duplicate-finder-maven-plugin +[23]: http://www.apache.org/licenses/LICENSE-2.0.html +[24]: https://maven.apache.org/plugins/maven-deploy-plugin/ +[25]: https://maven.apache.org/plugins/maven-gpg-plugin/ +[26]: https://maven.apache.org/plugins/maven-source-plugin/ +[27]: https://maven.apache.org/plugins/maven-javadoc-plugin/ +[28]: http://www.sonatype.com/public-parent/nexus-maven-plugins/nexus-staging/nexus-staging-maven-plugin/ +[29]: http://www.eclipse.org/legal/epl-v10.html +[30]: https://maven.apache.org/surefire/maven-failsafe-plugin/ +[31]: https://www.jacoco.org/jacoco/trunk/doc/maven.html +[32]: https://www.eclipse.org/legal/epl-2.0/ +[33]: https://github.com/exasol/error-code-crawler-maven-plugin/ +[34]: https://github.com/exasol/error-code-crawler-maven-plugin/blob/main/LICENSE +[35]: http://zlika.github.io/reproducible-build-maven-plugin diff --git a/doc/changes/changelog.md b/doc/changes/changelog.md index 5e18317..fc5a897 100644 --- a/doc/changes/changelog.md +++ b/doc/changes/changelog.md @@ -1,5 +1,6 @@ # Changes +* [1.6.4](changes_1.6.4.md) * [1.6.3](changes_1.6.3.md) * [1.6.2](changes_1.6.2.md) * [1.6.1](changes_1.6.1.md) diff --git a/doc/changes/changes_1.6.4.md b/doc/changes/changes_1.6.4.md new file mode 100644 index 0000000..e19ea83 --- /dev/null +++ b/doc/changes/changes_1.6.4.md @@ -0,0 +1,34 @@ +# Matcher for SQL Result Sets 1.6.4, released 2023-12-21 + +Code name: Upgrade dependencies on top of 1.6.3 + +## Summary + +This release updates dependencies compared to version 1.6.3. + +Please note that vulnerability CVE-2022-46337 in test dependency `org.apache.derby:derby` is ignored because fixed versions are not available for Java 11. + +## Security + +* #51: Updated dependencies + +## Dependency Updates + +### Compile Dependency Updates + +* Removed `com.exasol:error-reporting-java:1.0.1` + +### Test Dependency Updates + +* Updated `com.exasol:exasol-testcontainers:6.6.3` to `7.0.0` +* Updated `org.testcontainers:jdbc:1.19.2` to `1.19.3` +* Updated `org.testcontainers:junit-jupiter:1.19.2` to `1.19.3` + +### Plugin Dependency Updates + +* Updated `com.exasol:project-keeper-maven-plugin:2.9.16` to `3.0.0` +* Updated `org.apache.maven.plugins:maven-failsafe-plugin:3.2.2` to `3.2.3` +* Updated `org.apache.maven.plugins:maven-javadoc-plugin:3.6.2` to `3.6.3` +* Updated `org.apache.maven.plugins:maven-surefire-plugin:3.2.2` to `3.2.3` +* Added `org.apache.maven.plugins:maven-toolchains-plugin:3.1.0` +* Updated `org.codehaus.mojo:versions-maven-plugin:2.16.1` to `2.16.2` diff --git a/pk_generated_parent.pom b/pk_generated_parent.pom index 84ffa5e..51e6a2f 100644 --- a/pk_generated_parent.pom +++ b/pk_generated_parent.pom @@ -3,12 +3,14 @@ 4.0.0 com.exasol hamcrest-resultset-matcher-generated-parent - 1.6.3 + 1.6.4 pom UTF-8 UTF-8 11 + exasol + https://sonarcloud.io true @@ -50,6 +52,25 @@ sonar-maven-plugin 3.10.0.2594 + + org.apache.maven.plugins + maven-toolchains-plugin + 3.1.0 + + + + toolchain + + + + + + + ${java.version} + + + + org.apache.maven.plugins maven-compiler-plugin @@ -80,6 +101,9 @@ 3.6.3 + + 17 + @@ -127,7 +151,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.2.2 + 3.2.3 @@ -138,7 +162,7 @@ org.codehaus.mojo versions-maven-plugin - 2.16.1 + 2.16.2 display-updates @@ -225,7 +249,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.6.2 + 3.6.3 attach-javadocs @@ -267,7 +291,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.2.2 + 3.2.3 -Djava.util.logging.config.file=src/test/resources/logging.properties ${argLine} diff --git a/pom.xml b/pom.xml index 35b27a4..6c97ea9 100644 --- a/pom.xml +++ b/pom.xml @@ -2,12 +2,13 @@ 4.0.0 hamcrest-resultset-matcher - 1.6.3 + 1.6.4 Matcher for SQL Result Sets This project provides hamcrest matcher that compares java.sql.ResultSet objects. https://github.com/exasol/hamcrest-resultset-matcher/ 5.10.1 + 1.19.3 @@ -37,24 +38,19 @@ com.exasol exasol-testcontainers - 6.6.3 + 7.0.0 test org.testcontainers junit-jupiter - 1.19.2 + ${testcontainers.version} test - - com.exasol - error-reporting-java - 1.0.1 - org.testcontainers jdbc - 1.19.2 + ${testcontainers.version} test @@ -63,7 +59,7 @@ com.exasol project-keeper-maven-plugin - 2.9.16 + 3.0.0 @@ -72,12 +68,23 @@ + + org.sonatype.ossindex.maven + ossindex-maven-plugin + + ${ossindex.skip} + + + CVE-2022-46337 + + + hamcrest-resultset-matcher-generated-parent com.exasol - 1.6.3 + 1.6.4 pk_generated_parent.pom diff --git a/src/main/java/com/exasol/matcher/ResultSetStructureMatcher.java b/src/main/java/com/exasol/matcher/ResultSetStructureMatcher.java index 0da9ee1..7efd0f5 100644 --- a/src/main/java/com/exasol/matcher/ResultSetStructureMatcher.java +++ b/src/main/java/com/exasol/matcher/ResultSetStructureMatcher.java @@ -7,8 +7,6 @@ import org.hamcrest.*; -import com.exasol.errorreporting.ExaError; - /** * Hamcrest matcher that compares JDBC result sets against Java object structures. *

@@ -105,11 +103,11 @@ protected void describeMismatchSafely(final ResultSet item, final Description mi mismatchDescription // .appendList(" (", ", ", ")", this.actualColumns); } - if(this.ambiguousRowMatch) { + if (this.ambiguousRowMatch) { mismatchDescription.appendText(" where at least one expected row matched multiple result rows. " + "Please narrow down the matching criteria to avoid ambiguity."); } else if (this.contentDeviates) { - if(this.requireSameOrder) { + if (this.requireSameOrder) { mismatchDescription.appendText(" where content deviates starting row ") // .appendValue(this.deviationStartRow) // .appendText(", column ") // @@ -128,8 +126,8 @@ protected void describeMismatchSafely(final ResultSet item, final Description mi @Override protected boolean matchesSafely(final ResultSet resultSet) { - boolean columnsOk = matchColumns(resultSet); - boolean rowsOk = this.requireSameOrder ? matchRowsInOrder(resultSet) : matchRowsInAnyOrder(resultSet); + final boolean columnsOk = matchColumns(resultSet); + final boolean rowsOk = this.requireSameOrder ? matchRowsInOrder(resultSet) : matchRowsInAnyOrder(resultSet); return columnsOk && rowsOk; } @@ -162,7 +160,7 @@ private boolean matchRowsInAnyOrder(final ResultSet resultSet) { boolean ok = true; try { final int numberOfRowMatchers = this.cellMatcherTable.size(); - int[] matchesForRowMatcher = new int[numberOfRowMatchers]; + final int[] matchesForRowMatcher = new int[numberOfRowMatchers]; int rowIndex = 0; int matcherRowIndex = 0; while (resultSet.next()) { @@ -192,14 +190,14 @@ private boolean matchRowsInAnyOrder(final ResultSet resultSet) { } private void recordRowMatchResult(final int rowIndex, final boolean anyMatchForThisResultRow) { - if (!anyMatchForThisResultRow && !this.contentDeviates) - { + if (!anyMatchForThisResultRow && !this.contentDeviates) { this.contentDeviates = true; this.deviationStartRow = rowIndex; } } - private boolean validateAllMatchersMatchedExactlyOnce(final int numberOfRowMatchers, final int[] matchesForRowMatcher) { + private boolean validateAllMatchersMatchedExactlyOnce(final int numberOfRowMatchers, + final int[] matchesForRowMatcher) { for (int matcherIndex = 0; matcherIndex < numberOfRowMatchers; ++matcherIndex) { if (matchesForRowMatcher[matcherIndex] == 0) { return false; @@ -252,8 +250,8 @@ private int getExpectedColumnCount() { * @param recordFirstDeviation record the first mismatch when set to {@code true} * @return {@code true} if the given matchers match all cells in this row */ - private boolean matchValuesInRow(final ResultSet resultSet, final int rowIndex, int matcherRowIndex, - final List> cellMatcherRow, final boolean recordFirstDeviation) { + private boolean matchValuesInRow(final ResultSet resultSet, final int rowIndex, final int matcherRowIndex, + final List> cellMatcherRow, final boolean recordFirstDeviation) { int columnIndex = 0; try { for (final Matcher cellMatcher : cellMatcherRow) { @@ -267,9 +265,9 @@ private boolean matchValuesInRow(final ResultSet resultSet, final int rowIndex, } } } catch (final SQLException exception) { - throw new AssertionError("Row expectation definition " + matcherRowIndex + - " tries to validate the value of row " + rowIndex + ", column " - + columnIndex + " but that value can't be read from the result set. " + throw new AssertionError("Row expectation definition " + matcherRowIndex + + " tries to validate the value of row " + rowIndex + ", column " + columnIndex + + " but that value can't be read from the result set. " + "This usually means the column does not exist. \nCaused by SQL error: " + exception.getMessage()); } return true; @@ -303,15 +301,14 @@ private void displayCalendarWarningIfRequired() { } private void displayCalendarWarning() { - LOGGER.warning(() -> ExaError.messageBuilder("W-HRM-1").message( - "Reading a timestamp or date value without configured calendar. That's dangerous since the JDBC driver is using the time-zone of the test system in that case.") - .mitigation( - "You can fix this by providing a calendar using 'withCalendar(Calendar)'. For example 'Calendar.getInstance(TimeZone.getTimeZone(\"UTC\"))'.") - .toString()); + LOGGER.warning( + () -> "Reading a timestamp or date value without configured calendar. That's dangerous since the JDBC driver is using the time-zone of the test system in that case. " + + "You can fix this by providing a calendar using 'withCalendar(Calendar)'. For example 'Calendar.getInstance(TimeZone.getTimeZone(\"UTC\"))'."); this.isCalendarWarningDisplayed = true; } - private void recordFirstDeviation(final Object value, final Matcher cellMatcher, final int rowIndex, final int columnIndex) { + private void recordFirstDeviation(final Object value, final Matcher cellMatcher, final int rowIndex, + final int columnIndex) { this.contentDeviates = true; this.deviationStartRow = rowIndex; this.deviationStartColumn = columnIndex;