From d62892f5aac18d5e1efee69b90433efe96ebbf60 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 19 Jan 2021 07:59:36 +0100 Subject: [PATCH 001/200] Migrate to gh-actions (#720) --- .github/workflows/master.yml | 38 +++++++++++++++++++++++++++++++ .github/workflows/pr.yml | 29 ++++++++++++++++++++++++ .travis.yml | 43 ------------------------------------ README.md | 2 +- compile-and-test.sh | 2 +- deploy-snapshot.sh | 9 ++++---- 6 files changed, 74 insertions(+), 49 deletions(-) create mode 100644 .github/workflows/master.yml create mode 100644 .github/workflows/pr.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml new file mode 100644 index 000000000..86c4801af --- /dev/null +++ b/.github/workflows/master.yml @@ -0,0 +1,38 @@ +name: master + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-20.04 + + strategy: + matrix: + jdk: [3-jdk-14, 3-jdk-8-slim] + influxdb: [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8] + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Build project + env: + MAVEN_JAVA_VERSION: ${{ matrix.jdk }} + INFLUXDB_VERSION: ${{ matrix.influxdb }} + run: ./compile-and-test.sh + + - name: codecov + run: bash <(curl -s https://codecov.io/bash) + + + deploy: + runs-on: ubuntu-20.04 + + steps: + - name: deploy snapshot + env: + secure: dAJK41xM2dN3q3xJMqAOP6uvrOvpjjUzmHr8mYNyepER8Lpms9/GqVUxqJv12wzCBqv1XZk/CXxrv3iBc2XjlxlrzIJGQChTinwDEigv0BMl/Gh0821ja7gwzMEUmg9f79m5tJxIFQ306cWz1gyRDqM3fLzskvM2ayzvynsNc/w= + run: ./deploy-snapshot.sh diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 000000000..a75b56eb5 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,29 @@ +name: Build from pull request + +on: + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-20.04 + + strategy: + matrix: + jdk: [3-jdk-14, 3-jdk-8-slim] + influxdb: [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8] + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Figure out if running fork PR + id: fork + run: '["${{ secrets.DOCKER_REGISTRY_TOKEN }}" == ""] && echo "::set-output name=is_fork_pr::true" || echo "::set-output name=is_fork_pr::false"' + + - name: Build project + run: ./compile-and-test.sh + + - name: codecov + run: bash <(curl -s https://codecov.io/bash) diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ee46082b1..000000000 --- a/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -sudo: required - -services: - - docker - -before_install: - - sudo apt-get update -qq - - sudo apt-get install -qq libxml2-utils - -# We test against all influxdb versions with the most actual JDK. -# Test only the most recent influxdb version with JDK8 which will be legacy soon. -env: - global: - - secure: aCFuNNixYILZZfcOp0jI66om4w8Cbr+qtz1FUOVgbxeipFA93y7KLoXtFajkE1qmbHOdz8SvPcloY5q6HKIOYuqv4/6at+OaTogXELfrR+oKfxf2t5PfB1D+1RxM90+wjsEPGQh+HmFOEnGCnJ8ZUfcx76Afs+mPzbpjzKeNz7w= - - secure: dAJK41xM2dN3q3xJMqAOP6uvrOvpjjUzmHr8mYNyepER8Lpms9/GqVUxqJv12wzCBqv1XZk/CXxrv3iBc2XjlxlrzIJGQChTinwDEigv0BMl/Gh0821ja7gwzMEUmg9f79m5tJxIFQ306cWz1gyRDqM3fLzskvM2ayzvynsNc/w= - - matrix: - - MAVEN_JAVA_VERSION=3-jdk-14 INFLUXDB_VERSION=1.8 - - MAVEN_JAVA_VERSION=3-jdk-14 INFLUXDB_VERSION=1.7 - - MAVEN_JAVA_VERSION=3-jdk-14 INFLUXDB_VERSION=1.6 - - MAVEN_JAVA_VERSION=3-jdk-14 INFLUXDB_VERSION=1.5 - - MAVEN_JAVA_VERSION=3-jdk-14 INFLUXDB_VERSION=1.4 - - MAVEN_JAVA_VERSION=3-jdk-14 INFLUXDB_VERSION=1.3 - - MAVEN_JAVA_VERSION=3-jdk-14 INFLUXDB_VERSION=1.2 - - MAVEN_JAVA_VERSION=3-jdk-14 INFLUXDB_VERSION=1.1 - - MAVEN_JAVA_VERSION=3-jdk-8-slim INFLUXDB_VERSION=1.8 SNAPSHOT=Y - -script: "./compile-and-test.sh" - -deploy: - provider: script - script: "./deploy-snapshot.sh" - skip_cleanup: true - on: - repo: influxdata/influxdb-java - condition: $SNAPSHOT == "Y" && $DEPLOY_SNAPSHOT == "Y" - branch: master - -after_success: - - bash <(curl -s https://codecov.io/bash) - -after_failure: - - cat target/surefire-reports/*.txt diff --git a/README.md b/README.md index 81bb748cc..d96c23bbf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # influxdb-java -[![Build Status](https://travis-ci.org/influxdata/influxdb-java.svg?branch=master)](https://travis-ci.org/influxdata/influxdb-java) +[![Build Status](https://github.com/influxdata/influxdb-java/workflows/master/badge.svg)](https://github.com/influxdata/influxdb-java/actions) [![codecov.io](http://codecov.io/github/influxdata/influxdb-java/coverage.svg?branch=master)](http://codecov.io/github/influxdata/influxdb-java?branch=master) [![Issue Count](https://codeclimate.com/github/influxdata/influxdb-java/badges/issue_count.svg)](https://codeclimate.com/github/influxdata/influxdb-java) diff --git a/compile-and-test.sh b/compile-and-test.sh index 3ab581954..4828fdffa 100755 --- a/compile-and-test.sh +++ b/compile-and-test.sh @@ -39,7 +39,7 @@ echo "Running tests" PROXY_API_URL=http://nginx:8080/influx-api/ PROXY_UDP_PORT=8080 -docker run -it --rm \ +docker run --rm \ --volume ${PWD}:/usr/src/mymaven \ --volume ${PWD}/.m2:/root/.m2 \ --workdir /usr/src/mymaven \ diff --git a/deploy-snapshot.sh b/deploy-snapshot.sh index f413424d8..60a454ec2 100755 --- a/deploy-snapshot.sh +++ b/deploy-snapshot.sh @@ -2,11 +2,12 @@ set -e -#Parse project version from pom.xml -export PROJECT_VERSION=`xmllint --xpath "//*[local-name()='project']/*[local-name()='version']/text()" pom.xml` +# Parse project version from pom.xml +PROJECT_VERSION=$(xmllint --xpath "//*[local-name()='project']/*[local-name()='version']/text()" pom.xml) +export PROJECT_VERSION echo "Project version: $PROJECT_VERSION" -#Skip if not *SNAPSHOT +# Skip if not *SNAPSHOT if [[ $PROJECT_VERSION != *SNAPSHOT ]]; then echo "$PROJECT_VERSION is not SNAPSHOT - skip deploy."; exit; @@ -17,7 +18,7 @@ DEFAULT_MAVEN_JAVA_VERSION="3-jdk-8-slim" MAVEN_JAVA_VERSION="${MAVEN_JAVA_VERSION:-$DEFAULT_MAVEN_JAVA_VERSION}" echo "Deploy snapshot with maven:${MAVEN_JAVA_VERSION}" -docker run -it --rm \ +docker run --rm \ --volume ${PWD}:/usr/src/mymaven \ --volume ${PWD}/.m2:/root/.m2 \ --workdir /usr/src/mymaven \ From 8f585c606994c6dd0cf526002cc83bdf164fd484 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 19 Jan 2021 08:16:26 +0100 Subject: [PATCH 002/200] disable deploy for now --- .github/workflows/master.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 86c4801af..4acfb8015 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -28,11 +28,11 @@ jobs: run: bash <(curl -s https://codecov.io/bash) - deploy: - runs-on: ubuntu-20.04 - - steps: - - name: deploy snapshot - env: - secure: dAJK41xM2dN3q3xJMqAOP6uvrOvpjjUzmHr8mYNyepER8Lpms9/GqVUxqJv12wzCBqv1XZk/CXxrv3iBc2XjlxlrzIJGQChTinwDEigv0BMl/Gh0821ja7gwzMEUmg9f79m5tJxIFQ306cWz1gyRDqM3fLzskvM2ayzvynsNc/w= - run: ./deploy-snapshot.sh + # deploy: + # runs-on: ubuntu-20.04 + + # steps: + # - name: deploy snapshot + # env: + # secure: dAJK41xM2dN3q3xJMqAOP6uvrOvpjjUzmHr8mYNyepER8Lpms9/GqVUxqJv12wzCBqv1XZk/CXxrv3iBc2XjlxlrzIJGQChTinwDEigv0BMl/Gh0821ja7gwzMEUmg9f79m5tJxIFQ306cWz1gyRDqM3fLzskvM2ayzvynsNc/w= + # run: ./deploy-snapshot.sh From 0e7176f6b3abcd045f12093bfefef3e52cdc4fff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Feb 2021 07:36:55 +0100 Subject: [PATCH 003/200] Bump maven-checkstyle-plugin from 3.1.1 to 3.1.2 (#724) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 06bd41bfb..384bc4d92 100644 --- a/pom.xml +++ b/pom.xml @@ -211,7 +211,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.1.1 + 3.1.2 com.puppycrawl.tools From 583de1e1a499f5c7738fa041d5f973a735e2169a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Feb 2021 07:37:58 +0100 Subject: [PATCH 004/200] Bump checkstyle from 8.39 to 8.40 (#723) Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 8.39 to 8.40. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-8.39...checkstyle-8.40) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 384bc4d92..fb6bcae5b 100644 --- a/pom.xml +++ b/pom.xml @@ -216,7 +216,7 @@ com.puppycrawl.tools checkstyle - 8.39 + 8.40 From e3d7fd3863cacb6e0d13afd51c94bd0672ee9a28 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 07:21:11 +0100 Subject: [PATCH 005/200] Bump logging-interceptor from 4.9.0 to 4.9.1 (#725) Bumps [logging-interceptor](https://github.com/square/okhttp) from 4.9.0 to 4.9.1. - [Release notes](https://github.com/square/okhttp/releases) - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](https://github.com/square/okhttp/compare/parent-4.9.0...parent-4.9.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fb6bcae5b..3bcf1c16b 100644 --- a/pom.xml +++ b/pom.xml @@ -313,7 +313,7 @@ com.squareup.okhttp3 logging-interceptor - 4.9.0 + 4.9.1 From ed2ae13a3a6d632ccc91beec41c9af29ecd1ac30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 07:21:25 +0100 Subject: [PATCH 006/200] Bump okhttp from 4.9.0 to 4.9.1 (#726) Bumps [okhttp](https://github.com/square/okhttp) from 4.9.0 to 4.9.1. - [Release notes](https://github.com/square/okhttp/releases) - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](https://github.com/square/okhttp/compare/parent-4.9.0...parent-4.9.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3bcf1c16b..3ef7bbc52 100644 --- a/pom.xml +++ b/pom.xml @@ -308,7 +308,7 @@ com.squareup.okhttp3 okhttp - 4.9.0 + 4.9.1 com.squareup.okhttp3 From 7a0f2c42096af6a8022d4b3e82c3dc87226e7a41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Feb 2021 07:33:25 +0100 Subject: [PATCH 007/200] Bump junit-jupiter-engine from 5.7.0 to 5.7.1 (#729) Bumps [junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.7.0 to 5.7.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.7.0...r5.7.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3ef7bbc52..2edf12f22 100644 --- a/pom.xml +++ b/pom.xml @@ -249,7 +249,7 @@ org.junit.jupiter junit-jupiter-engine - 5.7.0 + 5.7.1 test From dfd1919bc4eca6ec7a0f7af50741ad69418cb03a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Feb 2021 07:33:50 +0100 Subject: [PATCH 008/200] Bump junit-platform-runner from 1.7.0 to 1.7.1 (#728) Bumps [junit-platform-runner](https://github.com/junit-team/junit5) from 1.7.0 to 1.7.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/commits) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2edf12f22..3998c1c93 100644 --- a/pom.xml +++ b/pom.xml @@ -255,7 +255,7 @@ org.junit.platform junit-platform-runner - 1.7.0 + 1.7.1 test From d49c20a2ffb0a8819d3c9aaef7870109fbd422b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 07:33:45 +0100 Subject: [PATCH 009/200] Bump checkstyle from 8.40 to 8.41 (#730) Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 8.40 to 8.41. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-8.40...checkstyle-8.41) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3998c1c93..1e1815176 100644 --- a/pom.xml +++ b/pom.xml @@ -216,7 +216,7 @@ com.puppycrawl.tools checkstyle - 8.40 + 8.41 From 828298022b1a53c45ce84ccb2e03cb983469c38b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 07:43:41 +0100 Subject: [PATCH 010/200] Bump mockito-core from 3.7.0 to 3.8.0 (#731) Bumps [mockito-core](https://github.com/mockito/mockito) from 3.7.0 to 3.8.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.7.0...v3.8.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1e1815176..ef9ccf6f3 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.mockito mockito-core - 3.7.0 + 3.8.0 test From edf39eeb528df731c2bab9aabfb960f39b38d7aa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Apr 2021 08:51:14 +0200 Subject: [PATCH 011/200] Bump mockito-core from 3.8.0 to 3.9.0 (#734) Bumps [mockito-core](https://github.com/mockito/mockito) from 3.8.0 to 3.9.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.8.0...v3.9.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ef9ccf6f3..749730428 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.mockito mockito-core - 3.8.0 + 3.9.0 test From cc102cdfeaf9f6ee60193b32470bc66745cc2c63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Apr 2021 08:13:46 +0200 Subject: [PATCH 012/200] Bump maven-release-plugin from 3.0.0-M1 to 3.0.0-M4 (#735) Bumps [maven-release-plugin](https://github.com/apache/maven-release) from 3.0.0-M1 to 3.0.0-M4. - [Release notes](https://github.com/apache/maven-release/releases) - [Commits](https://github.com/apache/maven-release/compare/maven-release-3.0.0-M1...maven-release-3.0.0-M4) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 749730428..1d23062a9 100644 --- a/pom.xml +++ b/pom.xml @@ -124,7 +124,7 @@ org.apache.maven.plugins maven-release-plugin - 3.0.0-M1 + 3.0.0-M4 From 43abb1d4b65d58c097de2ebb7ec8ca2d3bffd4ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 08:49:30 +0200 Subject: [PATCH 013/200] Bump jacoco-maven-plugin from 0.8.6 to 0.8.7 (#739) Bumps [jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.6 to 0.8.7. - [Release notes](https://github.com/jacoco/jacoco/releases) - [Commits](https://github.com/jacoco/jacoco/compare/v0.8.6...v0.8.7) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1d23062a9..ab31de4b8 100644 --- a/pom.xml +++ b/pom.xml @@ -192,7 +192,7 @@ org.jacoco jacoco-maven-plugin - 0.8.6 + 0.8.7 From f2ce298a61058cd2e7c2caa9fd5f40e96d6a31d8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 08:50:03 +0200 Subject: [PATCH 014/200] Bump maven-gpg-plugin from 1.6 to 3.0.1 (#738) Bumps [maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 1.6 to 3.0.1. - [Release notes](https://github.com/apache/maven-gpg-plugin/releases) - [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-1.6...maven-gpg-plugin-3.0.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ab31de4b8..81805ea29 100644 --- a/pom.xml +++ b/pom.xml @@ -383,7 +383,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.6 + 3.0.1 sign-artifacts From 498a200fbf6daf8b64c800d9b365f866855845be Mon Sep 17 00:00:00 2001 From: Strakar Date: Mon, 10 May 2021 17:10:48 +0200 Subject: [PATCH 015/200] Create Android.java (#737) --- .../java/org/influxdb/example/Android.java | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 src/main/java/org/influxdb/example/Android.java diff --git a/src/main/java/org/influxdb/example/Android.java b/src/main/java/org/influxdb/example/Android.java new file mode 100644 index 000000000..f26495cd2 --- /dev/null +++ b/src/main/java/org/influxdb/example/Android.java @@ -0,0 +1,98 @@ +package org.influxdb.example; + +import org.influxdb.InfluxDB; +import org.influxdb.InfluxDBFactory; +import org.influxdb.dto.QueryResult; +import org.influxdb.dto.Query; + +import java.util.LinkedList; +import java.util.List; + +/** + * @author StrakarCe + * @since 07/05/2021 + * @version 1 + */ +public class Android { + // put the address IP of your database + String address = "http://192.168.1.75:8000/"; + String dbName = "myDatabase"; + String table = "SERIES"; + QueryResult actual; + Boolean flag = false; + InfluxDB con; + + public Android() { + super(); + } + public void queryExecute(final Query query) { + Thread thread = new Thread(new Runnable() { + + @Override + public void run() { + try { + //InfluxDB connector = InfluxDBFactory.connect(address); + // if you want to open every time + System.out.println("Send the query to the database ..."); + // FOR A REAL APP CREATE A LOGGER ; + List results = new LinkedList<>(); + actual = con.query(query); + } catch (Exception e) { + e.printStackTrace(); + } + flag = true; // For simplicity, I use a simple flag to know when the thread have finished + } + }); + + thread.start(); + } + + /** + * It's to open the connexion with the database. + * In my case I decide to open once, do many query and close. + */ + public void connexion() { + con = InfluxDBFactory.connect(address); + } + /** + * It's to close after my list of query. + */ + public void close() { + con.close(); + } + /* + * simple example of how you can create a query + */ + private void queryLauncher(final String query) { + queryExecute(new Query(query, dbName)); + while (!flag) { // ugly method to wait the thread + System.out.println("Wait the thread"); + } + flag = false; + } + public String getEtat() { + queryLauncher("select last(value) from PTEC"); + return actual.getResults().get(0).getSeries().get(0).getValues().get(0).get(1).toString(); + } + public String getHC() { + queryLauncher("SELECT last(value) FROM HCHC"); + return actual.getResults().get(0).getSeries().get(0).getValues().get(0).get(1).toString(); + } + // ------------------------- Example when you want to use it ------------ + /* + Android test = new Android(); + refresh.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + test.connexion(); + etat2.setText(test.getEtat()); + hc2.setText(test.getHC()); + hp2.setText(test.getHP()); + prix2.setText(test.getDepense()); + percMens2.setText(test.getPercentageMensuel()); + percTotal2.setText(test.getPercentageTotal()); + test.close(); + } + }); + */ +} From 955c08f08162aa61b3a60050c642b41c6ca3d9fe Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 11 May 2021 07:40:13 +0200 Subject: [PATCH 016/200] test 3 jdks but less influxdb versions (#740) --- .github/workflows/master.yml | 4 ++-- .github/workflows/pr.yml | 4 ++-- compile-and-test.sh | 2 +- mvn.sh | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 4acfb8015..dc54718a5 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -11,8 +11,8 @@ jobs: strategy: matrix: - jdk: [3-jdk-14, 3-jdk-8-slim] - influxdb: [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8] + jdk: [3-openjdk-16-slim, 3-jdk-14, 3-jdk-8-slim] + influxdb: [1.1, 1.6, 1.8] steps: - name: Checkout diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a75b56eb5..b333480da 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -11,8 +11,8 @@ jobs: strategy: matrix: - jdk: [3-jdk-14, 3-jdk-8-slim] - influxdb: [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8] + jdk: [3-openjdk-16-slim, 3-jdk-14, 3-jdk-8-slim] + influxdb: [1.1, 1.6, 1.8] steps: - name: Checkout diff --git a/compile-and-test.sh b/compile-and-test.sh index 4828fdffa..4af51a8c1 100755 --- a/compile-and-test.sh +++ b/compile-and-test.sh @@ -5,7 +5,7 @@ set -e DEFAULT_INFLUXDB_VERSION="1.8" -DEFAULT_MAVEN_JAVA_VERSION="3-jdk-14" +DEFAULT_MAVEN_JAVA_VERSION="3-openjdk-16-slim" INFLUXDB_VERSION="${INFLUXDB_VERSION:-$DEFAULT_INFLUXDB_VERSION}" MAVEN_JAVA_VERSION="${MAVEN_JAVA_VERSION:-$DEFAULT_MAVEN_JAVA_VERSION}" diff --git a/mvn.sh b/mvn.sh index 01413b449..938c3dfbf 100755 --- a/mvn.sh +++ b/mvn.sh @@ -8,4 +8,4 @@ docker run -it --rm \ -v $PWD:/usr/src/mymaven \ -v $PWD/.m2:/root/.m2 \ -w /usr/src/mymaven \ - maven:3-jdk-14 mvn clean "$@" + maven:3-openjdk-16-slim mvn clean "$@" From ccbf8b2c5a563e6a7c4e10bd31123d13bbdbdc12 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 07:55:18 +0200 Subject: [PATCH 017/200] Bump msgpack-core from 0.8.22 to 0.8.23 (#742) Bumps [msgpack-core](https://github.com/msgpack/msgpack-java) from 0.8.22 to 0.8.23. - [Release notes](https://github.com/msgpack/msgpack-java/releases) - [Changelog](https://github.com/msgpack/msgpack-java/blob/develop/RELEASE_NOTES.md) - [Commits](https://github.com/msgpack/msgpack-java/compare/0.8.22...v0.8.23) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 81805ea29..016735a92 100644 --- a/pom.xml +++ b/pom.xml @@ -301,7 +301,7 @@ org.msgpack msgpack-core - 0.8.22 + 0.8.23 From 4502c596509ac9bc337badceef0ee9b75e01e463 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 07:55:40 +0200 Subject: [PATCH 018/200] Bump junit-jupiter-engine from 5.7.1 to 5.7.2 (#744) Bumps [junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.7.1 to 5.7.2. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.7.1...r5.7.2) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 016735a92..f37820efe 100644 --- a/pom.xml +++ b/pom.xml @@ -249,7 +249,7 @@ org.junit.jupiter junit-jupiter-engine - 5.7.1 + 5.7.2 test From ddca897962b1d3020755d4578013e8200f45bf04 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 07:56:26 +0200 Subject: [PATCH 019/200] Bump mockito-core from 3.9.0 to 3.10.0 (#743) Bumps [mockito-core](https://github.com/mockito/mockito) from 3.9.0 to 3.10.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.9.0...v3.10.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f37820efe..bcc0b8719 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.mockito mockito-core - 3.9.0 + 3.10.0 test From 58cfbb2741a9ed7640ec4e190635ce1871564019 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 07:57:24 +0200 Subject: [PATCH 020/200] Bump checkstyle from 8.41 to 8.42 (#736) Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 8.41 to 8.42. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-8.41...checkstyle-8.42) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bcc0b8719..af85796ef 100644 --- a/pom.xml +++ b/pom.xml @@ -216,7 +216,7 @@ com.puppycrawl.tools checkstyle - 8.41 + 8.42 From 7e67b459c92edbfec307e5727c72703d13b700e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 08:01:51 +0200 Subject: [PATCH 021/200] Bump junit-platform-runner from 1.7.1 to 1.7.2 (#741) Bumps [junit-platform-runner](https://github.com/junit-team/junit5) from 1.7.1 to 1.7.2. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/commits) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index af85796ef..1820fd6df 100644 --- a/pom.xml +++ b/pom.xml @@ -255,7 +255,7 @@ org.junit.platform junit-platform-runner - 1.7.1 + 1.7.2 test From 93be6021e21b7f4044949f1f36edef5e495ccbd1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 May 2021 14:59:03 +0200 Subject: [PATCH 022/200] Bump msgpack-core from 0.8.23 to 0.8.24 (#746) Bumps [msgpack-core](https://github.com/msgpack/msgpack-java) from 0.8.23 to 0.8.24. - [Release notes](https://github.com/msgpack/msgpack-java/releases) - [Changelog](https://github.com/msgpack/msgpack-java/blob/develop/RELEASE_NOTES.md) - [Commits](https://github.com/msgpack/msgpack-java/compare/v0.8.23...v0.8.24) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1820fd6df..936ca6744 100644 --- a/pom.xml +++ b/pom.xml @@ -301,7 +301,7 @@ org.msgpack msgpack-core - 0.8.23 + 0.8.24 From b952a387a790f6fe6fa5a8c77acb03db4e01319a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 May 2021 14:59:25 +0200 Subject: [PATCH 023/200] Bump maven-javadoc-plugin from 3.2.0 to 3.3.0 (#745) Bumps [maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.2.0...maven-javadoc-plugin-3.3.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 936ca6744..48a9b2f15 100644 --- a/pom.xml +++ b/pom.xml @@ -176,7 +176,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.2.0 + 3.3.0 8 From ab65b0bcba2ece9916788311615bf3a4b5398c96 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 May 2021 08:20:38 +0200 Subject: [PATCH 024/200] Bump checkstyle from 8.42 to 8.43 (#747) Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 8.42 to 8.43. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-8.42...checkstyle-8.43) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 48a9b2f15..16e01e97e 100644 --- a/pom.xml +++ b/pom.xml @@ -216,7 +216,7 @@ com.puppycrawl.tools checkstyle - 8.42 + 8.43 From 75e0f16e31a91c8f8455c7db67797ff5a4fe02b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Jun 2021 08:04:23 +0200 Subject: [PATCH 025/200] Bump mockito-core from 3.10.0 to 3.11.0 (#750) Bumps [mockito-core](https://github.com/mockito/mockito) from 3.10.0 to 3.11.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.10.0...v3.11.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 16e01e97e..cfa3a2879 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.mockito mockito-core - 3.10.0 + 3.11.0 test From 13f0981281f83508dbe4908225678ec114e7e364 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Jun 2021 08:00:56 +0200 Subject: [PATCH 026/200] Bump mockito-core from 3.11.0 to 3.11.1 (#751) Bumps [mockito-core](https://github.com/mockito/mockito) from 3.11.0 to 3.11.1. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.11.0...v3.11.1) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cfa3a2879..5e1904424 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.mockito mockito-core - 3.11.0 + 3.11.1 test From afee952eadd280a1c344770306da6a4bc70d9b04 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Jun 2021 08:01:35 +0200 Subject: [PATCH 027/200] Bump msgpack-core from 0.8.24 to 0.9.0 (#752) Bumps [msgpack-core](https://github.com/msgpack/msgpack-java) from 0.8.24 to 0.9.0. - [Release notes](https://github.com/msgpack/msgpack-java/releases) - [Changelog](https://github.com/msgpack/msgpack-java/blob/develop/RELEASE_NOTES.md) - [Commits](https://github.com/msgpack/msgpack-java/compare/v0.8.24...v0.9.0) --- updated-dependencies: - dependency-name: org.msgpack:msgpack-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5e1904424..b30f42c47 100644 --- a/pom.xml +++ b/pom.xml @@ -301,7 +301,7 @@ org.msgpack msgpack-core - 0.8.24 + 0.9.0 From cd8cfeee185aad4ffe8fef877883e955bbc412bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Jun 2021 07:11:30 +0200 Subject: [PATCH 028/200] Bump assertj-core from 3.18.0 to 3.20.2 (#754) Bumps [assertj-core](https://github.com/assertj/assertj-core) from 3.18.0 to 3.20.2. - [Release notes](https://github.com/assertj/assertj-core/releases) - [Commits](https://github.com/assertj/assertj-core/compare/assertj-core-3.18.0...assertj-core-3.20.2) --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b30f42c47..12d0211fe 100644 --- a/pom.xml +++ b/pom.xml @@ -267,7 +267,7 @@ org.assertj assertj-core - 3.18.0 + 3.20.2 test From 92dd35d65ffa396223f5ca68535a6a9f4d9c02c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 15 Aug 2021 11:49:17 +0200 Subject: [PATCH 029/200] Bump mockito-core from 3.11.1 to 3.11.2 (#756) Bumps [mockito-core](https://github.com/mockito/mockito) from 3.11.1 to 3.11.2. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.11.1...v3.11.2) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 12d0211fe..517fe9429 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.mockito mockito-core - 3.11.1 + 3.11.2 test From d456ea903c92d1c8a71b40ee804533fd72889cb1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 15 Aug 2021 11:49:44 +0200 Subject: [PATCH 030/200] Bump maven-enforcer-plugin from 3.0.0-M3 to 3.0.0 (#759) Bumps [maven-enforcer-plugin](https://github.com/apache/maven-enforcer) from 3.0.0-M3 to 3.0.0. - [Release notes](https://github.com/apache/maven-enforcer/releases) - [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.0.0-M3...enforcer-3.0.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-enforcer-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 517fe9429..a7c4ffa0e 100644 --- a/pom.xml +++ b/pom.xml @@ -132,7 +132,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0-M3 + 3.0.0 enforce-maven From 54901a15636bc742db11655213c38c8b31f9d96c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 15 Aug 2021 11:50:02 +0200 Subject: [PATCH 031/200] Bump checkstyle from 8.43 to 8.45.1 (#761) Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 8.43 to 8.45.1. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-8.43...checkstyle-8.45.1) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a7c4ffa0e..5bf466a00 100644 --- a/pom.xml +++ b/pom.xml @@ -216,7 +216,7 @@ com.puppycrawl.tools checkstyle - 8.43 + 8.45.1 From b2cb6d1111a66061a9925c5a0bf637de736823fe Mon Sep 17 00:00:00 2001 From: adyang <20383270+adyang@users.noreply.github.com> Date: Sat, 21 Aug 2021 14:57:14 +0000 Subject: [PATCH 032/200] Document steps to ensure application terminates properly when batch mode is enabled (#763) --- MANUAL.md | 44 ++++++++++++++++++++++++++++++++------------ README.md | 15 +++++++++++---- 2 files changed, 43 insertions(+), 16 deletions(-) diff --git a/MANUAL.md b/MANUAL.md index 254eca360..62d45d67a 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -17,24 +17,33 @@ influxDB.query(new Query("CREATE RETENTION POLICY " + retentionPolicyName + " ON " + databaseName + " DURATION 1d REPLICATION 1 DEFAULT")); influxDB.setRetentionPolicy(retentionPolicyName); // (3) -influxDB.enableBatch(BatchOptions.DEFAULTS); // (4) - -influxDB.write(Point.measurement("h2o_feet") // (5) +influxDB.enableBatch( + BatchOptions.DEFAULTS + .threadFactory(runnable -> { + Thread thread = new Thread(runnable); + thread.setDaemon(true); + return thread; + }) +); // (4) + +Runtime.getRuntime().addShutdownHook(new Thread(influxDB::close)); // (5) + +influxDB.write(Point.measurement("h2o_feet") // (6) .time(System.currentTimeMillis(), TimeUnit.MILLISECONDS) .tag("location", "santa_monica") .addField("level description", "below 3 feet") .addField("water_level", 2.064d) .build()); -influxDB.write(Point.measurement("h2o_feet") // (5) +influxDB.write(Point.measurement("h2o_feet") // (6) .tag("location", "coyote_creek") .addField("level description", "between 6 and 9 feet") .addField("water_level", 8.12d) - .build()); // (6) + .build()); -Thread.sleep(5_000L); // (7) +Thread.sleep(5_000L); -QueryResult queryResult = influxDB.query(new Query("SELECT * FROM h2o_feet")); +QueryResult queryResult = influxDB.query(new Query("SELECT * FROM h2o_feet")); // (7) System.out.println(queryResult); // It will print something like: @@ -44,8 +53,6 @@ System.out.println(queryResult); // [2020-03-22T20:50:12.929Z, below 3 feet, santa_monica, 2.064], // [2020-03-22T20:50:12.929Z, between 6 and 9 feet, coyote_creek, 8.12] // ]]], error=null]], error=null] - -influxDB.close(); // (8) ``` ### Connecting to InfluxDB @@ -137,13 +144,26 @@ With batching enabled the client provides two strategies how to deal with errors When new data points are written before the previous (failed) points are successfully written, those are queued inside the client and wait until older data points are successfully written. Size of this queue is limited and configured by `BatchOptions.bufferLimit` property. When the limit is reached, the oldest points in the queue are dropped. 'Retry on error' strategy is used when individual write batch size defined by `BatchOptions.actions` is lower than `BatchOptions.bufferLimit`. -Note: +#### Ensure application exit when batching is enabled +`BatchOptions.DEFAULTS` creates a non-daemon thread pool which prevents the JVM from initiating shutdown in the case of +exceptions or successful completion of the main thread. This will prevent shutdown hooks (many frameworks and plain JVM +applications use these to close/ cleanup resources) from running, preventing graceful termination of the application. + +Thus, configuring batch options with a daemon thread pool will solve this issue and will for example ensure that the registered +(5) shutdown hook is run to close the `InfluxDB` client properly (flushing and closing of resources will happen). + +### Close InfluxDB Client on JVM Termination +(5) In order to ensure that in-flight points are flushed and resources are released properly, it is essential to call +`influxDB.close()` the client when it is no longer required. + +Registering a shutdown hook is a good way to ensure that this is done on application termination regardless of exceptions +that are thrown in the main thread of the code. Note that if you are using a framework, do check the documentation for its +way of configuring shutdown lifecycle hooks or if it might already be calling `close` automatically. -* Batching functionality creates an internal thread pool that needs to be shutdown explicitly as part of a graceful application shutdown or the application will terminate properly. To do so, call `influxDB.close()`. ### Writing to InfluxDB -(5) ... +(6) ... `----8<----BEGIN DRAFT----8<----` diff --git a/README.md b/README.md index d96c23bbf..9590fcd66 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,17 @@ influxDB.query(new Query("CREATE RETENTION POLICY " + retentionPolicyName influxDB.setRetentionPolicy(retentionPolicyName); // Enable batch writes to get better performance. -influxDB.enableBatch(BatchOptions.DEFAULTS); +influxDB.enableBatch( + BatchOptions.DEFAULTS + .threadFactory(runnable -> { + Thread thread = new Thread(runnable); + thread.setDaemon(true); + return thread; + }) +); + +// Close it if your application is terminating or you are not using it anymore. +Runtime.getRuntime().addShutdownHook(new Thread(influxDB::close)); // Write points to InfluxDB. influxDB.write(Point.measurement("h2o_feet") @@ -100,9 +110,6 @@ System.out.println(queryResult); // [2020-03-22T20:50:12.929Z, below 3 feet, santa_monica, 2.064], // [2020-03-22T20:50:12.929Z, between 6 and 9 feet, coyote_creek, 8.12] // ]]], error=null]], error=null] - -// Close it if your application is terminating or you are not using it anymore. -influxDB.close(); ``` ## Contribute From c0e60d15e6ded1e1fa8a3aa407e961d47640a4ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 07:15:16 +0200 Subject: [PATCH 033/200] Bump mockito-core from 3.11.2 to 3.12.1 (#764) Bumps [mockito-core](https://github.com/mockito/mockito) from 3.11.2 to 3.12.1. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.11.2...v3.12.1) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5bf466a00..dd6618dc4 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.mockito mockito-core - 3.11.2 + 3.12.1 test From be7728745e5fdf8fb81bbea2f09c37d0ae8ca74b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Aug 2021 07:51:56 +0200 Subject: [PATCH 034/200] Bump mockito-core from 3.12.1 to 3.12.4 (#766) Bumps [mockito-core](https://github.com/mockito/mockito) from 3.12.1 to 3.12.4. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.12.1...v3.12.4) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dd6618dc4..434b252d0 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.mockito mockito-core - 3.12.1 + 3.12.4 test From 5270ff93831f6ba6e5ff9db44e10a68a4f774f71 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Sep 2021 07:10:51 +0200 Subject: [PATCH 035/200] Bump checkstyle from 8.45.1 to 9.0 (#767) Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 8.45.1 to 9.0. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-8.45.1...checkstyle-9.0) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 434b252d0..3f71964ab 100644 --- a/pom.xml +++ b/pom.xml @@ -216,7 +216,7 @@ com.puppycrawl.tools checkstyle - 8.45.1 + 9.0 From d73aa32d70a4f65d7d5ea149b46cece3464dafb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Fri, 10 Sep 2021 14:34:21 +0200 Subject: [PATCH 036/200] feat: `POST` query variants serializes `'q'` parameter into HTTP body (#765) --- .github/workflows/master.yml | 2 +- .github/workflows/pr.yml | 3 +- CHANGELOG.md | 4 ++ README.md | 2 +- compile-and-test.sh | 22 ++++++- .../java/org/influxdb/impl/InfluxDBImpl.java | 19 +++++-- .../org/influxdb/impl/InfluxDBService.java | 20 ++++--- src/test/java/org/influxdb/InfluxDB2Test.java | 57 +++++++++++++++++++ src/test/java/org/influxdb/InfluxDBTest.java | 41 +++++++++++++ .../org/influxdb/MessagePackInfluxDBTest.java | 12 ++++ .../org/influxdb/impl/InfluxDBImplTest.java | 3 + .../org/influxdb/impl/InfluxDBMapperTest.java | 3 + 12 files changed, 171 insertions(+), 17 deletions(-) create mode 100644 src/test/java/org/influxdb/InfluxDB2Test.java diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index dc54718a5..ca8b05f4c 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: jdk: [3-openjdk-16-slim, 3-jdk-14, 3-jdk-8-slim] - influxdb: [1.1, 1.6, 1.8] + influxdb: [1.1, 1.6, 1.8, 2.0] steps: - name: Checkout diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b333480da..d4274855b 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: jdk: [3-openjdk-16-slim, 3-jdk-14, 3-jdk-8-slim] - influxdb: [1.1, 1.6, 1.8] + influxdb: [1.1, 1.6, 1.8, 2.0] steps: - name: Checkout @@ -27,3 +27,4 @@ jobs: - name: codecov run: bash <(curl -s https://codecov.io/bash) + if: matrix.influxdb != '2.0' diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f46a7d82..8d7457071 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## 2.22 [unreleased] +### Improvements + +- `POST` query variants serializes `'q'` parameter into HTTP body [PR #765](https://github.com/influxdata/influxdb-java/pull/765) + ## 2.21 [2020-12-04] ### Fixes diff --git a/README.md b/README.md index 9590fcd66..ab8e1fdde 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This is the official (and community-maintained) Java client library for [InfluxDB](https://www.influxdata.com/products/influxdb-overview/) (1.x), the open source time series database that is part of the TICK (Telegraf, InfluxDB, Chronograf, Kapacitor) stack. -_Note: This library is for use with InfluxDB 1.x. For connecting to InfluxDB 2.x instances, please use the [influxdb-client-java](https://github.com/influxdata/influxdb-client-java) client._ +_Note: This library is for use with InfluxDB 1.x and [2.x compatibility API](https://docs.influxdata.com/influxdb/v2.0/reference/api/influxdb-1x/). For full supports of InfluxDB 2.x features, please use the [influxdb-client-java](https://github.com/influxdata/influxdb-client-java) client._ ## Adding the library to your project diff --git a/compile-and-test.sh b/compile-and-test.sh index 4af51a8c1..88f0578bc 100755 --- a/compile-and-test.sh +++ b/compile-and-test.sh @@ -20,6 +20,12 @@ docker run \ --publish 8086:8086 \ --publish 8089:8089/udp \ --volume ${PWD}/influxdb.conf:/etc/influxdb/influxdb.conf \ + --env DOCKER_INFLUXDB_INIT_MODE=setup \ + --env DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + --env DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + --env DOCKER_INFLUXDB_INIT_ORG=my-org \ + --env DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + --env DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=my-token \ influxdb:${INFLUXDB_VERSION}-alpine echo "Starting Nginx" @@ -38,6 +44,20 @@ docker run \ echo "Running tests" PROXY_API_URL=http://nginx:8080/influx-api/ PROXY_UDP_PORT=8080 +if [[ "$INFLUXDB_VERSION" == "2.0" ]] +then + TEST_EXPRESSION="InfluxDB2Test" + # Wait to start InfluxDB + docker run --link influxdb:influxdb ubuntu:20.04 bash -c "apt-get update \ + && apt-get install wget --yes \ + && wget -S --spider --tries=20 --retry-connrefused --waitretry=5 http://influxdb:8086/ping" + # Create DBRP Mapping + BUCKET_ID=$(docker exec influxdb bash -c "influx bucket list -o my-org -n my-bucket | grep my-bucket | xargs | cut -d ' ' -f 0") + docker exec influxdb bash -c "influx v1 dbrp create -o my-org --db mydb --rp autogen --default --bucket-id ${BUCKET_ID}" + docker exec influxdb bash -c "influx v1 auth create -o my-org --username my-user --password my-password --read-bucket ${BUCKET_ID} --write-bucket ${BUCKET_ID}" +else + TEST_EXPRESSION="*" +fi docker run --rm \ --volume ${PWD}:/usr/src/mymaven \ @@ -49,7 +69,7 @@ docker run --rm \ --env INFLUXDB_IP=influxdb \ --env PROXY_API_URL=${PROXY_API_URL} \ --env PROXY_UDP_PORT=${PROXY_UDP_PORT} \ - maven:${MAVEN_JAVA_VERSION} mvn clean install + maven:${MAVEN_JAVA_VERSION} mvn clean install -Dtest="${TEST_EXPRESSION}" docker kill influxdb || true docker kill nginx || true diff --git a/src/main/java/org/influxdb/impl/InfluxDBImpl.java b/src/main/java/org/influxdb/impl/InfluxDBImpl.java index 904744f23..825e0708a 100644 --- a/src/main/java/org/influxdb/impl/InfluxDBImpl.java +++ b/src/main/java/org/influxdb/impl/InfluxDBImpl.java @@ -642,7 +642,11 @@ public void query(final Query query, final int chunkSize, final BiConsumer() { @@ -711,15 +715,20 @@ public void onFailure(final Call call, final Throwable t) { */ @Override public QueryResult query(final Query query, final TimeUnit timeUnit) { - Call call = null; + Call call; if (query instanceof BoundParameterQuery) { BoundParameterQuery boundParameterQuery = (BoundParameterQuery) query; call = this.influxDBService.query(getDatabase(query), TimeUtil.toTimePrecision(timeUnit), query.getCommandWithUrlEncoded(), boundParameterQuery.getParameterJsonWithUrlEncoded()); } else { - call = this.influxDBService.query(getDatabase(query), - TimeUtil.toTimePrecision(timeUnit), query.getCommandWithUrlEncoded()); + if (query.requiresPost()) { + call = this.influxDBService.query(getDatabase(query), + TimeUtil.toTimePrecision(timeUnit), query.getCommandWithUrlEncoded(), null); + } else { + call = this.influxDBService.query(getDatabase(query), + TimeUtil.toTimePrecision(timeUnit), query.getCommandWithUrlEncoded()); + } } return executeQuery(call); } @@ -747,7 +756,7 @@ public void deleteDatabase(final String name) { */ @Override public List describeDatabases() { - QueryResult result = executeQuery(this.influxDBService.query(SHOW_DATABASE_COMMAND_ENCODED)); + QueryResult result = executeQuery(this.influxDBService.postQuery(SHOW_DATABASE_COMMAND_ENCODED)); // {"results":[{"series":[{"name":"databases","columns":["name"],"values":[["mydb"]]}]}]} // Series [name=databases, columns=[name], values=[[mydb], [unittest_1433605300968]]] List> databaseNames = result.getResults().get(0).getSeries().get(0).getValues(); diff --git a/src/main/java/org/influxdb/impl/InfluxDBService.java b/src/main/java/org/influxdb/impl/InfluxDBService.java index dfe897257..ce7a811b4 100644 --- a/src/main/java/org/influxdb/impl/InfluxDBService.java +++ b/src/main/java/org/influxdb/impl/InfluxDBService.java @@ -6,6 +6,8 @@ import okhttp3.ResponseBody; import retrofit2.Call; import retrofit2.http.Body; +import retrofit2.http.Field; +import retrofit2.http.FormUrlEncoded; import retrofit2.http.GET; import retrofit2.http.POST; import retrofit2.http.Query; @@ -48,8 +50,9 @@ public Call query(@Query(DB) String db, @Query(EPOCH) String epoch, @Query(value = Q, encoded = true) String query); @POST("query") + @FormUrlEncoded public Call query(@Query(DB) String db, - @Query(EPOCH) String epoch, @Query(value = Q, encoded = true) String query, + @Query(EPOCH) String epoch, @Field(value = Q, encoded = true) String query, @Query(value = PARAMS, encoded = true) String params); @GET("query") @@ -57,18 +60,18 @@ public Call query(@Query(DB) String db, @Query(value = Q, encoded = true) String query); @POST("query") + @FormUrlEncoded public Call postQuery(@Query(DB) String db, - @Query(value = Q, encoded = true) String query); + @Field(value = Q, encoded = true) String query); @POST("query") + @FormUrlEncoded public Call postQuery(@Query(DB) String db, - @Query(value = Q, encoded = true) String query, @Query(value = PARAMS, encoded = true) String params); - - @GET("query") - public Call query(@Query(value = Q, encoded = true) String query); + @Field(value = Q, encoded = true) String query, @Query(value = PARAMS, encoded = true) String params); @POST("query") - public Call postQuery(@Query(value = Q, encoded = true) String query); + @FormUrlEncoded + public Call postQuery(@Field(value = Q, encoded = true) String query); @Streaming @GET("query?chunked=true") @@ -77,6 +80,7 @@ public Call query(@Query(DB) String db, @Query(value = Q, encoded @Streaming @POST("query?chunked=true") - public Call query(@Query(DB) String db, @Query(value = Q, encoded = true) String query, + @FormUrlEncoded + public Call query(@Query(DB) String db, @Field(value = Q, encoded = true) String query, @Query(CHUNK_SIZE) int chunkSize, @Query(value = PARAMS, encoded = true) String params); } diff --git a/src/test/java/org/influxdb/InfluxDB2Test.java b/src/test/java/org/influxdb/InfluxDB2Test.java new file mode 100644 index 000000000..90c703aa6 --- /dev/null +++ b/src/test/java/org/influxdb/InfluxDB2Test.java @@ -0,0 +1,57 @@ +package org.influxdb; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +import org.influxdb.dto.Query; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; +import org.junit.platform.runner.JUnitPlatform; +import org.junit.runner.RunWith; + +/** + * @author Jakub Bednar (30/08/2021 11:31) + */ +@RunWith(JUnitPlatform.class) +@EnabledIfEnvironmentVariable(named = "INFLUXDB_VERSION", matches = "2\\.0") +public class InfluxDB2Test { + + private InfluxDB influxDB; + + @BeforeEach + public void setUp() throws NoSuchFieldException, IllegalAccessException { + String url = String.format("http://%s:%s", TestUtils.getInfluxIP(), TestUtils.getInfluxPORT(true)); + influxDB = InfluxDBFactory + .connect(url, "my-user", "my-password") + .setDatabase("mydb") + .setRetentionPolicy("autogen"); + } + + @AfterEach + public void cleanup() { + influxDB.close(); + } + + @Test + public void testQuery() throws InterruptedException { + + String measurement = TestUtils.getRandomMeasurement(); + + // prepare data + List records = new ArrayList<>(); + records.add(measurement + ",test=a value=1 1"); + records.add(measurement + ",test=a value=2 2"); + influxDB.write(records); + + // query data + final CountDownLatch countDownLatch = new CountDownLatch(1); + influxDB.query(new Query("SELECT * FROM " + measurement), 2, queryResult -> countDownLatch.countDown()); + + Assertions.assertTrue(countDownLatch.await(2, TimeUnit.SECONDS)); + } +} \ No newline at end of file diff --git a/src/test/java/org/influxdb/InfluxDBTest.java b/src/test/java/org/influxdb/InfluxDBTest.java index 326f45dce..60dd66654 100644 --- a/src/test/java/org/influxdb/InfluxDBTest.java +++ b/src/test/java/org/influxdb/InfluxDBTest.java @@ -722,6 +722,16 @@ public void testWriteBatchWithoutPrecision() throws Exception { Assertions.assertEquals(queryResult.getResults().get(0).getSeries().get(0).getValues().get(1).get(0), timeP2); Assertions.assertEquals(queryResult.getResults().get(0).getSeries().get(0).getValues().get(2).get(0), timeP3); + // WHEN I use the post query + queryResult = this.influxDB.query(new Query("SELECT * FROM " + measurement, dbName, true), TimeUnit.NANOSECONDS); + + // THEN result will be same + Assertions.assertEquals(queryResult.getResults().get(0).getSeries().get(0).getValues().size(), 3); + Assertions.assertEquals(queryResult.getResults().get(0).getSeries().get(0).getValues().size(), 3); + Assertions.assertEquals(queryResult.getResults().get(0).getSeries().get(0).getValues().get(0).get(0), timeP1); + Assertions.assertEquals(queryResult.getResults().get(0).getSeries().get(0).getValues().get(1).get(0), timeP2); + Assertions.assertEquals(queryResult.getResults().get(0).getSeries().get(0).getValues().get(2).get(0), timeP3); + this.influxDB.query(new Query("DROP DATABASE " + dbName)); } @@ -1301,6 +1311,37 @@ public void testChunkingOnFailureConnectionError() throws InterruptedException { } + @Test + public void testChunkingQueryPost() throws InterruptedException { + if (this.influxDB.version().startsWith("0.") || this.influxDB.version().startsWith("1.0")) { + // do not test version 0.13 and 1.0 + return; + } + + String dbName = "write_unittest_" + System.currentTimeMillis(); + this.influxDB.query(new Query("CREATE DATABASE " + dbName)); + String rp = TestUtils.defaultRetentionPolicy(this.influxDB.version()); + BatchPoints batchPoints = BatchPoints.database(dbName).retentionPolicy(rp).build(); + Point point1 = Point.measurement("disk").tag("atag", "a").addField("used", 60L).addField("free", 1L).build(); + Point point2 = Point.measurement("disk").tag("atag", "b").addField("used", 70L).addField("free", 2L).build(); + Point point3 = Point.measurement("disk").tag("atag", "c").addField("used", 80L).addField("free", 3L).build(); + batchPoints.point(point1); + batchPoints.point(point2); + batchPoints.point(point3); + this.influxDB.write(batchPoints); + + CountDownLatch countDownLatch = new CountDownLatch(3); + + Thread.sleep(2000); + Query query = new Query("SELECT * FROM disk", dbName, true); + this.influxDB.query(query, 2, result -> countDownLatch.countDown()); + + boolean await = countDownLatch.await(10, TimeUnit.SECONDS); + Assertions.assertTrue(await, "The QueryResults did not arrive!"); + + this.influxDB.query(new Query("DROP DATABASE " + dbName)); + } + @Test public void testFlushPendingWritesWhenBatchingEnabled() { String dbName = "flush_tests_" + System.currentTimeMillis(); diff --git a/src/test/java/org/influxdb/MessagePackInfluxDBTest.java b/src/test/java/org/influxdb/MessagePackInfluxDBTest.java index 9abda1246..f19e2343b 100644 --- a/src/test/java/org/influxdb/MessagePackInfluxDBTest.java +++ b/src/test/java/org/influxdb/MessagePackInfluxDBTest.java @@ -164,6 +164,18 @@ public void testWriteBatchWithoutPrecision() throws Exception { value = Double.valueOf(queryResult.getResults().get(0).getSeries().get(0).getValues().get(2).get(0).toString()); Assertions.assertEquals(value, timeP3); + // WHEN I use the post query + queryResult = this.influxDB.query(new Query("SELECT * FROM " + measurement, dbName, true), TimeUnit.NANOSECONDS); + + // THEN result will be same + Assertions.assertEquals(queryResult.getResults().get(0).getSeries().get(0).getValues().size(), 3); + value = Double.valueOf(queryResult.getResults().get(0).getSeries().get(0).getValues().get(0).get(0).toString()); + Assertions.assertEquals(value, timeP1); + value = Double.valueOf(queryResult.getResults().get(0).getSeries().get(0).getValues().get(1).get(0).toString()); + Assertions.assertEquals(value, timeP2); + value = Double.valueOf(queryResult.getResults().get(0).getSeries().get(0).getValues().get(2).get(0).toString()); + Assertions.assertEquals(value, timeP3); + this.influxDB.query(new Query("DROP DATABASE " + dbName)); } diff --git a/src/test/java/org/influxdb/impl/InfluxDBImplTest.java b/src/test/java/org/influxdb/impl/InfluxDBImplTest.java index 59b33e9e6..9f3804c9c 100644 --- a/src/test/java/org/influxdb/impl/InfluxDBImplTest.java +++ b/src/test/java/org/influxdb/impl/InfluxDBImplTest.java @@ -10,9 +10,12 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.junit.platform.runner.JUnitPlatform; +import org.junit.runner.RunWith; import okhttp3.OkHttpClient; +@RunWith(JUnitPlatform.class) public class InfluxDBImplTest { private InfluxDB influxDB; diff --git a/src/test/java/org/influxdb/impl/InfluxDBMapperTest.java b/src/test/java/org/influxdb/impl/InfluxDBMapperTest.java index 124605477..cd2251ac2 100644 --- a/src/test/java/org/influxdb/impl/InfluxDBMapperTest.java +++ b/src/test/java/org/influxdb/impl/InfluxDBMapperTest.java @@ -16,7 +16,10 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.junit.platform.runner.JUnitPlatform; +import org.junit.runner.RunWith; +@RunWith(JUnitPlatform.class) public class InfluxDBMapperTest { private InfluxDB influxDB; From e5a401ddd6acab1db03cfba7028532c02cb43950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Fri, 10 Sep 2021 16:31:46 +0200 Subject: [PATCH 037/200] fix(ci): system envs --- .github/workflows/master.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index ca8b05f4c..b588105fa 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -20,8 +20,8 @@ jobs: - name: Build project env: - MAVEN_JAVA_VERSION: ${{ matrix.jdk }} - INFLUXDB_VERSION: ${{ matrix.influxdb }} + MAVEN_JAVA_VERSION: "${{ matrix.jdk }}" + INFLUXDB_VERSION: "${{ matrix.influxdb }}" run: ./compile-and-test.sh - name: codecov From 920aa065129763e2aa706a782a19b0f80eaf8ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Fri, 10 Sep 2021 16:36:23 +0200 Subject: [PATCH 038/200] fix(ci): system envs --- .github/workflows/master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index b588105fa..d02b08bbf 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: jdk: [3-openjdk-16-slim, 3-jdk-14, 3-jdk-8-slim] - influxdb: [1.1, 1.6, 1.8, 2.0] + influxdb: ['1.1', '1.6', '1.8', '2.0'] steps: - name: Checkout From e2ed4ea587f961ba628f6e08694cd0f3b04ffe24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Wed, 15 Sep 2021 08:15:40 +0200 Subject: [PATCH 039/200] fix: continuous integration (#773) --- .github/workflows/pr.yml | 5 ++- .../org/influxdb/impl/BatchProcessor.java | 7 ++- .../java/org/influxdb/BatchOptionsTest.java | 43 +++++++++++++------ src/test/java/org/influxdb/InfluxDBTest.java | 2 +- .../org/influxdb/impl/BatchProcessorTest.java | 17 +++++++- 5 files changed, 54 insertions(+), 20 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d4274855b..3d7f39934 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: jdk: [3-openjdk-16-slim, 3-jdk-14, 3-jdk-8-slim] - influxdb: [1.1, 1.6, 1.8, 2.0] + influxdb: ['1.1', '1.6', '1.8', '2.0'] steps: - name: Checkout @@ -23,6 +23,9 @@ jobs: run: '["${{ secrets.DOCKER_REGISTRY_TOKEN }}" == ""] && echo "::set-output name=is_fork_pr::true" || echo "::set-output name=is_fork_pr::false"' - name: Build project + env: + MAVEN_JAVA_VERSION: "${{ matrix.jdk }}" + INFLUXDB_VERSION: "${{ matrix.influxdb }}" run: ./compile-and-test.sh - name: codecov diff --git a/src/main/java/org/influxdb/impl/BatchProcessor.java b/src/main/java/org/influxdb/impl/BatchProcessor.java index 4430072a5..28c45b693 100644 --- a/src/main/java/org/influxdb/impl/BatchProcessor.java +++ b/src/main/java/org/influxdb/impl/BatchProcessor.java @@ -20,6 +20,7 @@ import java.util.concurrent.TimeUnit; import java.util.function.BiConsumer; import java.util.function.Consumer; +import java.util.function.Supplier; import java.util.logging.Level; import java.util.logging.Logger; @@ -46,6 +47,7 @@ public final class BatchProcessor { private final BatchWriter batchWriter; private boolean dropActionsOnQueueExhaustion; Consumer droppedActionHandler; + Supplier randomSupplier; /** * The Builder to create a BatchProcessor instance. @@ -318,20 +320,21 @@ public static Builder builder(final InfluxDB influxDB) { } else { this.queue = new LinkedBlockingQueue<>(); } + this.randomSupplier = Math::random; Runnable flushRunnable = new Runnable() { @Override public void run() { // write doesn't throw any exceptions write(); - int jitterInterval = (int) (Math.random() * BatchProcessor.this.jitterInterval); + int jitterInterval = (int) (randomSupplier.get() * BatchProcessor.this.jitterInterval); BatchProcessor.this.scheduler.schedule(this, BatchProcessor.this.flushInterval + jitterInterval, BatchProcessor.this.flushIntervalUnit); } }; // Flush at specified Rate this.scheduler.schedule(flushRunnable, - this.flushInterval + (int) (Math.random() * BatchProcessor.this.jitterInterval), + this.flushInterval + (int) (randomSupplier.get() * BatchProcessor.this.jitterInterval), this.flushIntervalUnit); } diff --git a/src/test/java/org/influxdb/BatchOptionsTest.java b/src/test/java/org/influxdb/BatchOptionsTest.java index 351321b68..7378746c1 100644 --- a/src/test/java/org/influxdb/BatchOptionsTest.java +++ b/src/test/java/org/influxdb/BatchOptionsTest.java @@ -7,13 +7,13 @@ import org.influxdb.dto.Point; import org.influxdb.dto.Query; import org.influxdb.dto.QueryResult; -import org.jetbrains.annotations.NotNull; +import org.influxdb.impl.BatchProcessor; +import org.influxdb.impl.BatchProcessorTest; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.platform.runner.JUnitPlatform; import org.junit.runner.RunWith; -import org.mockito.Mockito; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; @@ -21,12 +21,15 @@ import java.io.IOException; import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; import java.util.function.BiConsumer; import java.util.function.Consumer; +import java.util.function.Supplier; @RunWith(JUnitPlatform.class) @@ -234,15 +237,20 @@ public void testFlushDuration() throws InterruptedException { * @throws InterruptedException */ @Test - public void testJitterDuration() throws InterruptedException { + public void testJitterDuration() throws Exception { String dbName = "write_unittest_" + System.currentTimeMillis(); try { - BatchOptions options = BatchOptions.DEFAULTS.flushDuration(100).jitterDuration(500); + // prepare points before start BatchProcessor + List points = prepareSomePoints(0, 19); + BatchOptions options = BatchOptions.DEFAULTS.flushDuration(100).jitterDuration(1000); influxDB.query(new Query("CREATE DATABASE " + dbName)); influxDB.setDatabase(dbName); influxDB.enableBatch(options); - write20Points(influxDB); + BatchProcessor batchProcessor = BatchProcessorTest.getPrivateField(influxDB, "batchProcessor"); + // random always return 1.0 to be sure that first query is null + BatchProcessorTest.setPrivateField(batchProcessor, "randomSupplier", (Supplier) () -> 1.0); + points.forEach(influxDB::write); Thread.sleep(100); @@ -251,7 +259,7 @@ public void testJitterDuration() throws InterruptedException { Assertions.assertNull(result.getResults().get(0).getError()); //wait for at least one flush - Thread.sleep(1000); + Thread.sleep(1500); result = influxDB.query(new Query("select * from weather", dbName)); Assertions.assertEquals(20, result.getResults().get(0).getSeries().get(0).getValues().size()); } @@ -596,6 +604,7 @@ public Object answer(InvocationOnMock invocation) throws Throwable { verify(spy, times(2)).write(any(BatchPoints.class)); + Thread.sleep(1_500); QueryResult result = influxDB.query(new Query("select * from m0", dbName)); Assertions.assertNotNull(result.getResults().get(0).getSeries()); Assertions.assertEquals(200, result.getResults().get(0).getSeries().get(0).getValues().size()); @@ -668,14 +677,7 @@ void writeSomePoints(InfluxDB influxDB, String measurement, int firstIndex, int } void writeSomePoints(InfluxDB influxDB, int firstIndex, int lastIndex) { - for (int i = firstIndex; i <= lastIndex; i++) { - Point point = Point.measurement("weather") - .time(i,TimeUnit.HOURS) - .addField("temperature", (double) i) - .addField("humidity", (double) (i) * 1.1) - .addField("uv_index", "moderate").build(); - influxDB.write(point); - } + prepareSomePoints(firstIndex, lastIndex).forEach(influxDB::write); } void write20Points(InfluxDB influxDB) { @@ -686,6 +688,19 @@ void writeSomePoints(InfluxDB influxDB, int n) { writeSomePoints(influxDB, 0, n - 1); } + List prepareSomePoints(int firstIndex, int lastIndex) { + List points = new ArrayList<>(); + for (int i = firstIndex; i <= lastIndex; i++) { + Point point = Point.measurement("weather") + .time(i, TimeUnit.HOURS) + .addField("temperature", (double) i) + .addField("humidity", (double) (i) * 1.1) + .addField("uv_index", "moderate").build(); + points.add(point); + } + return points; + } + private BatchPoints createBatchPoints(String dbName, String measurement, int n) { BatchPoints batchPoints = BatchPoints.database(dbName).build(); for (int i = 1; i <= n; i++) { diff --git a/src/test/java/org/influxdb/InfluxDBTest.java b/src/test/java/org/influxdb/InfluxDBTest.java index 60dd66654..38b5fcfa3 100644 --- a/src/test/java/org/influxdb/InfluxDBTest.java +++ b/src/test/java/org/influxdb/InfluxDBTest.java @@ -1330,7 +1330,7 @@ public void testChunkingQueryPost() throws InterruptedException { batchPoints.point(point3); this.influxDB.write(batchPoints); - CountDownLatch countDownLatch = new CountDownLatch(3); + CountDownLatch countDownLatch = new CountDownLatch(2); Thread.sleep(2000); Query query = new Query("SELECT * FROM disk", dbName, true); diff --git a/src/test/java/org/influxdb/impl/BatchProcessorTest.java b/src/test/java/org/influxdb/impl/BatchProcessorTest.java index 213f6d313..df28da328 100644 --- a/src/test/java/org/influxdb/impl/BatchProcessorTest.java +++ b/src/test/java/org/influxdb/impl/BatchProcessorTest.java @@ -226,14 +226,27 @@ public void precision() throws Exception { } } + @Test + @SuppressWarnings("unchecked") + public void randomSupplier() { + InfluxDB mockInfluxDB = mock(InfluxDBImpl.class); + BatchProcessor batchProcessor = BatchProcessor.builder(mockInfluxDB).actions(Integer.MAX_VALUE) + .interval(1, TimeUnit.NANOSECONDS).build(); + + Double random = batchProcessor.randomSupplier.get(); + assertTrue(random >= 0); + assertTrue(random < 1); + Assertions.assertNotEquals(random, batchProcessor.randomSupplier.get()); + } + @SuppressWarnings("unchecked") - static T getPrivateField(final Object obj, final String name) throws Exception { + public static T getPrivateField(final Object obj, final String name) throws Exception { Field field = obj.getClass().getDeclaredField(name); field.setAccessible(true); return (T) field.get(obj); } - static void setPrivateField(final Object obj, final String name, final Object value) throws Exception { + public static void setPrivateField(final Object obj, final String name, final Object value) throws Exception { Field field = obj.getClass().getDeclaredField(name); field.setAccessible(true); field.set(obj, value); From a6e22ed02d690b8999d37bcb887f413fba0752aa Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Fri, 17 Sep 2021 09:48:42 +0200 Subject: [PATCH 040/200] [maven-release-plugin] prepare release influxdb-java-2.22 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 3f71964ab..b1947a88e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.influxdb influxdb-java jar - 2.22-SNAPSHOT + 2.22 influxdb java bindings Java API to access the InfluxDB REST API http://www.influxdb.org @@ -24,7 +24,7 @@ scm:git:git@github.com:influxdata/influxdb-java.git scm:git:git@github.com:influxdata/influxdb-java.git git@github.com:influxdata/influxdb-java.git - HEAD + influxdb-java-2.22 From 019402c31037ded3b85156122747615cc068f06c Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Fri, 17 Sep 2021 09:48:45 +0200 Subject: [PATCH 041/200] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b1947a88e..0006dec61 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.influxdb influxdb-java jar - 2.22 + 2.23-SNAPSHOT influxdb java bindings Java API to access the InfluxDB REST API http://www.influxdb.org @@ -24,7 +24,7 @@ scm:git:git@github.com:influxdata/influxdb-java.git scm:git:git@github.com:influxdata/influxdb-java.git git@github.com:influxdata/influxdb-java.git - influxdb-java-2.22 + HEAD From ba6c732f2721b58ee797e42a80c66d67892837e6 Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Fri, 17 Sep 2021 09:53:11 +0200 Subject: [PATCH 042/200] docs: update CHANGELOG.md to reflect actual version --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d7457071..eb685014e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog -## 2.22 [unreleased] +## 2.23 [unreleased] + +## 2.22 [2021-09-17] ### Improvements From f26885bdd7f58ded6f0d9c4643c10adb2a0ad70f Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Fri, 17 Sep 2021 10:22:13 +0200 Subject: [PATCH 043/200] jdk 17 is the next LTS (#774) --- .github/workflows/master.yml | 2 +- .github/workflows/pr.yml | 2 +- compile-and-test.sh | 2 +- mvn.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index d02b08bbf..9853c67d0 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - jdk: [3-openjdk-16-slim, 3-jdk-14, 3-jdk-8-slim] + jdk: [3-openjdk-17-slim, 3-jdk-14, 3-jdk-8-slim] influxdb: ['1.1', '1.6', '1.8', '2.0'] steps: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 3d7f39934..405f23b08 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - jdk: [3-openjdk-16-slim, 3-jdk-14, 3-jdk-8-slim] + jdk: [3-openjdk-17-slim, 3-jdk-14, 3-jdk-8-slim] influxdb: ['1.1', '1.6', '1.8', '2.0'] steps: diff --git a/compile-and-test.sh b/compile-and-test.sh index 88f0578bc..4e903e03f 100755 --- a/compile-and-test.sh +++ b/compile-and-test.sh @@ -5,7 +5,7 @@ set -e DEFAULT_INFLUXDB_VERSION="1.8" -DEFAULT_MAVEN_JAVA_VERSION="3-openjdk-16-slim" +DEFAULT_MAVEN_JAVA_VERSION="3-openjdk-17-slim" INFLUXDB_VERSION="${INFLUXDB_VERSION:-$DEFAULT_INFLUXDB_VERSION}" MAVEN_JAVA_VERSION="${MAVEN_JAVA_VERSION:-$DEFAULT_MAVEN_JAVA_VERSION}" diff --git a/mvn.sh b/mvn.sh index 938c3dfbf..cd99af3e6 100755 --- a/mvn.sh +++ b/mvn.sh @@ -8,4 +8,4 @@ docker run -it --rm \ -v $PWD:/usr/src/mymaven \ -v $PWD/.m2:/root/.m2 \ -w /usr/src/mymaven \ - maven:3-openjdk-16-slim mvn clean "$@" + maven:3-openjdk-17-slim mvn clean "$@" From 5334eb0366cd81d55f1a5e32e1672b0e43cd6a3d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Sep 2021 11:22:13 +0200 Subject: [PATCH 044/200] Bump junit-jupiter-engine from 5.7.2 to 5.8.0 (#772) Bumps [junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.7.2 to 5.8.0. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.7.2...r5.8.0) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0006dec61..57f1c381a 100644 --- a/pom.xml +++ b/pom.xml @@ -249,7 +249,7 @@ org.junit.jupiter junit-jupiter-engine - 5.7.2 + 5.8.0 test From a116ff9dc46a145c0fdf5ad320ab91ff517ba0f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Sep 2021 11:22:58 +0200 Subject: [PATCH 045/200] Bump junit-platform-runner from 1.7.2 to 1.8.0 (#770) Bumps [junit-platform-runner](https://github.com/junit-team/junit5) from 1.7.2 to 1.8.0. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/commits) --- updated-dependencies: - dependency-name: org.junit.platform:junit-platform-runner dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 57f1c381a..f1c5805e9 100644 --- a/pom.xml +++ b/pom.xml @@ -255,7 +255,7 @@ org.junit.platform junit-platform-runner - 1.7.2 + 1.8.0 test From 7cc00fcde27c930a849bfc621363f2991ed6a67f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Sep 2021 11:23:22 +0200 Subject: [PATCH 046/200] Bump maven-javadoc-plugin from 3.3.0 to 3.3.1 (#771) Bumps [maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.3.0 to 3.3.1. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.3.0...maven-javadoc-plugin-3.3.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f1c5805e9..7a1c62f7a 100644 --- a/pom.xml +++ b/pom.xml @@ -176,7 +176,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.0 + 3.3.1 8 From da2ad44b7fcdbf64d2328ddbd1c9603d38c96706 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Sep 2021 07:18:46 +0200 Subject: [PATCH 047/200] Bump junit-jupiter-engine from 5.8.0 to 5.8.1 (#776) Bumps [junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.8.0 to 5.8.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.8.0...r5.8.1) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7a1c62f7a..e77fd9fce 100644 --- a/pom.xml +++ b/pom.xml @@ -249,7 +249,7 @@ org.junit.jupiter junit-jupiter-engine - 5.8.0 + 5.8.1 test From c0b8067533ee24c8a5ea6d845595a967724665cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Sep 2021 07:19:08 +0200 Subject: [PATCH 048/200] Bump junit-platform-runner from 1.8.0 to 1.8.1 (#775) Bumps [junit-platform-runner](https://github.com/junit-team/junit5) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/commits) --- updated-dependencies: - dependency-name: org.junit.platform:junit-platform-runner dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e77fd9fce..428580793 100644 --- a/pom.xml +++ b/pom.xml @@ -255,7 +255,7 @@ org.junit.platform junit-platform-runner - 1.8.0 + 1.8.1 test From 173836771d1d7b8f1259275484ba064fd7602224 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Sep 2021 07:19:36 +0200 Subject: [PATCH 049/200] Bump assertj-core from 3.20.2 to 3.21.0 (#777) Bumps [assertj-core](https://github.com/assertj/assertj-core) from 3.20.2 to 3.21.0. - [Release notes](https://github.com/assertj/assertj-core/releases) - [Commits](https://github.com/assertj/assertj-core/compare/assertj-core-3.20.2...assertj-core-3.21.0) --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 428580793..c9c0631e3 100644 --- a/pom.xml +++ b/pom.xml @@ -267,7 +267,7 @@ org.assertj assertj-core - 3.20.2 + 3.21.0 test From b720253d22ab66efd55c43d49b5609a327572e67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 07:24:09 +0200 Subject: [PATCH 050/200] Bump okhttp from 4.9.1 to 4.9.2 (#778) Bumps [okhttp](https://github.com/square/okhttp) from 4.9.1 to 4.9.2. - [Release notes](https://github.com/square/okhttp/releases) - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](https://github.com/square/okhttp/compare/parent-4.9.1...parent-4.9.2) --- updated-dependencies: - dependency-name: com.squareup.okhttp3:okhttp dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c9c0631e3..99adf43c8 100644 --- a/pom.xml +++ b/pom.xml @@ -308,7 +308,7 @@ com.squareup.okhttp3 okhttp - 4.9.1 + 4.9.2 com.squareup.okhttp3 From faa352c918896acb09a2e53aca1be159964255ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 07:24:35 +0200 Subject: [PATCH 051/200] Bump logging-interceptor from 4.9.1 to 4.9.2 (#780) Bumps [logging-interceptor](https://github.com/square/okhttp) from 4.9.1 to 4.9.2. - [Release notes](https://github.com/square/okhttp/releases) - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](https://github.com/square/okhttp/compare/parent-4.9.1...parent-4.9.2) --- updated-dependencies: - dependency-name: com.squareup.okhttp3:logging-interceptor dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 99adf43c8..53d3c73ac 100644 --- a/pom.xml +++ b/pom.xml @@ -313,7 +313,7 @@ com.squareup.okhttp3 logging-interceptor - 4.9.1 + 4.9.2 From b8f167aae6af0e81a6eec90b4db39ff8513f7926 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 07:25:01 +0200 Subject: [PATCH 052/200] Bump checkstyle from 9.0 to 9.0.1 (#779) Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 9.0 to 9.0.1. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-9.0...checkstyle-9.0.1) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 53d3c73ac..8e5778e06 100644 --- a/pom.xml +++ b/pom.xml @@ -216,7 +216,7 @@ com.puppycrawl.tools checkstyle - 9.0 + 9.0.1 From 0e8351e4a348df3d831bab91500c8236cdc1b11c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Oct 2021 07:14:37 +0200 Subject: [PATCH 053/200] Bump mockito-core from 3.12.4 to 4.0.0 (#781) Bumps [mockito-core](https://github.com/mockito/mockito) from 3.12.4 to 4.0.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.12.4...v4.0.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8e5778e06..4ba39f499 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.mockito mockito-core - 3.12.4 + 4.0.0 test From df45710e7042b0a6b89be5c9635ef31eea5bc6ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Nov 2021 06:51:13 +0100 Subject: [PATCH 054/200] Bump checkstyle from 9.0.1 to 9.1 (#783) Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 9.0.1 to 9.1. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-9.0.1...checkstyle-9.1) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4ba39f499..acb0d1d9b 100644 --- a/pom.xml +++ b/pom.xml @@ -216,7 +216,7 @@ com.puppycrawl.tools checkstyle - 9.0.1 + 9.1 From b2366ebd709ffa4e3ffccd31fcadb4f2e33add9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Tue, 16 Nov 2021 10:02:23 +0100 Subject: [PATCH 055/200] chore(ci): add InfluxDB 2.1 to pipeline (#784) --- .github/workflows/master.yml | 3 ++- .github/workflows/pr.yml | 4 ++-- compile-and-test.sh | 2 +- src/test/java/org/influxdb/BatchOptionsTest.java | 3 +-- src/test/java/org/influxdb/InfluxDB2Test.java | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 9853c67d0..93f7ef36b 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: jdk: [3-openjdk-17-slim, 3-jdk-14, 3-jdk-8-slim] - influxdb: ['1.1', '1.6', '1.8', '2.0'] + influxdb: ['1.1', '1.6', '1.8', '2.0', '2.1'] steps: - name: Checkout @@ -26,6 +26,7 @@ jobs: - name: codecov run: bash <(curl -s https://codecov.io/bash) + if: matrix.influxdb != '2.0' && matrix.influxdb != '2.1' # deploy: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 405f23b08..ab9844fad 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: jdk: [3-openjdk-17-slim, 3-jdk-14, 3-jdk-8-slim] - influxdb: ['1.1', '1.6', '1.8', '2.0'] + influxdb: ['1.1', '1.6', '1.8', '2.0', '2.1'] steps: - name: Checkout @@ -30,4 +30,4 @@ jobs: - name: codecov run: bash <(curl -s https://codecov.io/bash) - if: matrix.influxdb != '2.0' + if: matrix.influxdb != '2.0' && matrix.influxdb != '2.1' diff --git a/compile-and-test.sh b/compile-and-test.sh index 4e903e03f..633ff51e2 100755 --- a/compile-and-test.sh +++ b/compile-and-test.sh @@ -44,7 +44,7 @@ docker run \ echo "Running tests" PROXY_API_URL=http://nginx:8080/influx-api/ PROXY_UDP_PORT=8080 -if [[ "$INFLUXDB_VERSION" == "2.0" ]] +if [[ "$INFLUXDB_VERSION" == "2."* ]] then TEST_EXPRESSION="InfluxDB2Test" # Wait to start InfluxDB diff --git a/src/test/java/org/influxdb/BatchOptionsTest.java b/src/test/java/org/influxdb/BatchOptionsTest.java index 7378746c1..1abef4576 100644 --- a/src/test/java/org/influxdb/BatchOptionsTest.java +++ b/src/test/java/org/influxdb/BatchOptionsTest.java @@ -466,8 +466,7 @@ public void testHandlerOnRetryImpossible() throws InterruptedException { writeSomePoints(influxDB, 1); - Thread.sleep(200); - verify(mockHandler, times(1)).accept(any(), any()); + verify(mockHandler, timeout(500).times(1)).accept(any(), any()); QueryResult result = influxDB.query(new Query("select * from weather", dbName)); Assertions.assertNull(result.getResults().get(0).getSeries()); diff --git a/src/test/java/org/influxdb/InfluxDB2Test.java b/src/test/java/org/influxdb/InfluxDB2Test.java index 90c703aa6..0118d0318 100644 --- a/src/test/java/org/influxdb/InfluxDB2Test.java +++ b/src/test/java/org/influxdb/InfluxDB2Test.java @@ -18,7 +18,7 @@ * @author Jakub Bednar (30/08/2021 11:31) */ @RunWith(JUnitPlatform.class) -@EnabledIfEnvironmentVariable(named = "INFLUXDB_VERSION", matches = "2\\.0") +@EnabledIfEnvironmentVariable(named = "INFLUXDB_VERSION", matches = "2\\..") public class InfluxDB2Test { private InfluxDB influxDB; From 3b206336daec6207a3d039a4216c7ae5d00f6533 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Nov 2021 07:29:16 +0100 Subject: [PATCH 056/200] Bump mockito-core from 4.0.0 to 4.1.0 (#787) Bumps [mockito-core](https://github.com/mockito/mockito) from 4.0.0 to 4.1.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.0.0...v4.1.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index acb0d1d9b..905878653 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.mockito mockito-core - 4.0.0 + 4.1.0 test From a5bbbd0cc861491ee183cf0032ef9412e056f7f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Nov 2021 07:29:45 +0100 Subject: [PATCH 057/200] Bump logging-interceptor from 4.9.2 to 4.9.3 (#786) Bumps [logging-interceptor](https://github.com/square/okhttp) from 4.9.2 to 4.9.3. - [Release notes](https://github.com/square/okhttp/releases) - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](https://github.com/square/okhttp/compare/parent-4.9.2...parent-4.9.3) --- updated-dependencies: - dependency-name: com.squareup.okhttp3:logging-interceptor dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 905878653..2af6274f6 100644 --- a/pom.xml +++ b/pom.xml @@ -313,7 +313,7 @@ com.squareup.okhttp3 logging-interceptor - 4.9.2 + 4.9.3 From 4953a2a13f6c2c8662b273be2ac5fd64abddb2da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Nov 2021 07:30:09 +0100 Subject: [PATCH 058/200] Bump okhttp from 4.9.2 to 4.9.3 (#785) Bumps [okhttp](https://github.com/square/okhttp) from 4.9.2 to 4.9.3. - [Release notes](https://github.com/square/okhttp/releases) - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](https://github.com/square/okhttp/compare/parent-4.9.2...parent-4.9.3) --- updated-dependencies: - dependency-name: com.squareup.okhttp3:okhttp dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2af6274f6..71d98d9f5 100644 --- a/pom.xml +++ b/pom.xml @@ -308,7 +308,7 @@ com.squareup.okhttp3 okhttp - 4.9.2 + 4.9.3 com.squareup.okhttp3 From 85432a877c9d3cd147a5cfc014fa249aad719ffd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Nov 2021 07:28:17 +0100 Subject: [PATCH 059/200] Bump junit-jupiter-engine from 5.8.1 to 5.8.2 (#789) Bumps [junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.8.1 to 5.8.2. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.8.1...r5.8.2) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 71d98d9f5..4101e059a 100644 --- a/pom.xml +++ b/pom.xml @@ -249,7 +249,7 @@ org.junit.jupiter junit-jupiter-engine - 5.8.1 + 5.8.2 test From ab6406a38936d4817e719684aa13952ee5e6796e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Nov 2021 07:28:39 +0100 Subject: [PATCH 060/200] Bump junit-platform-runner from 1.8.1 to 1.8.2 (#790) Bumps [junit-platform-runner](https://github.com/junit-team/junit5) from 1.8.1 to 1.8.2. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/commits) --- updated-dependencies: - dependency-name: org.junit.platform:junit-platform-runner dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4101e059a..e7f589e57 100644 --- a/pom.xml +++ b/pom.xml @@ -255,7 +255,7 @@ org.junit.platform junit-platform-runner - 1.8.1 + 1.8.2 test From ce0c8621f0f343ae71aaa38f67d4819ff5ec9742 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Nov 2021 07:29:35 +0100 Subject: [PATCH 061/200] Bump checkstyle from 9.1 to 9.2 (#788) Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 9.1 to 9.2. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-9.1...checkstyle-9.2) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e7f589e57..9401b2976 100644 --- a/pom.xml +++ b/pom.xml @@ -216,7 +216,7 @@ com.puppycrawl.tools checkstyle - 9.1 + 9.2 From 7f2bf7cb26f10d079fcb8e8cab03196d2e1aa138 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Dec 2021 10:42:50 +0100 Subject: [PATCH 062/200] Bump mockito-core from 4.1.0 to 4.2.0 (#792) Bumps [mockito-core](https://github.com/mockito/mockito) from 4.1.0 to 4.2.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.1.0...v4.2.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9401b2976..a7a5451e2 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.mockito mockito-core - 4.1.0 + 4.2.0 test From 384bc29e93f0298f66aeb88bbe20668befca5f13 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Dec 2021 11:09:57 +0100 Subject: [PATCH 063/200] Bump checkstyle from 9.2 to 9.2.1 (#793) Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 9.2 to 9.2.1. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-9.2...checkstyle-9.2.1) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a7a5451e2..4c5904d61 100644 --- a/pom.xml +++ b/pom.xml @@ -216,7 +216,7 @@ com.puppycrawl.tools checkstyle - 9.2 + 9.2.1 From 444838a9e3191cebd7537f5c1e7d4963c764b3cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Dec 2021 11:10:43 +0100 Subject: [PATCH 064/200] Bump maven-site-plugin from 3.9.1 to 3.10.0 (#794) Bumps [maven-site-plugin](https://github.com/apache/maven-site-plugin) from 3.9.1 to 3.10.0. - [Release notes](https://github.com/apache/maven-site-plugin/releases) - [Commits](https://github.com/apache/maven-site-plugin/compare/maven-site-plugin-3.9.1...maven-site-plugin-3.10.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-site-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4c5904d61..b7adc638d 100644 --- a/pom.xml +++ b/pom.xml @@ -94,7 +94,7 @@ org.apache.maven.plugins maven-site-plugin - 3.9.1 + 3.10.0 org.apache.maven.plugins From a3e811b73462374e900af80dc293c8368aeb7faa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jan 2022 09:33:45 +0100 Subject: [PATCH 065/200] Bump assertj-core from 3.21.0 to 3.22.0 (#796) Bumps [assertj-core](https://github.com/assertj/assertj-core) from 3.21.0 to 3.22.0. - [Release notes](https://github.com/assertj/assertj-core/releases) - [Commits](https://github.com/assertj/assertj-core/compare/assertj-core-3.21.0...assertj-core-3.22.0) --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b7adc638d..4cb187f30 100644 --- a/pom.xml +++ b/pom.xml @@ -267,7 +267,7 @@ org.assertj assertj-core - 3.21.0 + 3.22.0 test From 660dd91290fdca6dfab1a76707fd16014c1ac0f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jan 2022 09:34:17 +0100 Subject: [PATCH 066/200] Bump maven-deploy-plugin from 3.0.0-M1 to 3.0.0-M2 (#797) Bumps [maven-deploy-plugin](https://github.com/apache/maven-deploy-plugin) from 3.0.0-M1 to 3.0.0-M2. - [Release notes](https://github.com/apache/maven-deploy-plugin/releases) - [Commits](https://github.com/apache/maven-deploy-plugin/compare/maven-deploy-plugin-3.0.0-M1...maven-deploy-plugin-3.0.0-M2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-deploy-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4cb187f30..426348861 100644 --- a/pom.xml +++ b/pom.xml @@ -104,7 +104,7 @@ org.apache.maven.plugins maven-deploy-plugin - 3.0.0-M1 + 3.0.0-M2 org.apache.maven.plugins From f3ce1c6546771e399a552aaf090ba9e8c347bcd6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jan 2022 06:55:59 +0100 Subject: [PATCH 067/200] Bump maven-jar-plugin from 3.2.0 to 3.2.1 (#799) Bumps [maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.2.0 to 3.2.1. - [Release notes](https://github.com/apache/maven-jar-plugin/releases) - [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.2.0...maven-jar-plugin-3.2.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-jar-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 426348861..d7ad9c5c0 100644 --- a/pom.xml +++ b/pom.xml @@ -114,7 +114,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.0 + 3.2.1 org.apache.maven.plugins From cd926e1a2a4dbc2a3b550fe26db655322db70a0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jan 2022 06:56:23 +0100 Subject: [PATCH 068/200] Bump maven-release-plugin from 3.0.0-M4 to 3.0.0-M5 (#798) Bumps [maven-release-plugin](https://github.com/apache/maven-release) from 3.0.0-M4 to 3.0.0-M5. - [Release notes](https://github.com/apache/maven-release/releases) - [Commits](https://github.com/apache/maven-release/compare/maven-release-3.0.0-M4...maven-release-3.0.0-M5) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-release-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d7ad9c5c0..ff2b9b002 100644 --- a/pom.xml +++ b/pom.xml @@ -124,7 +124,7 @@ org.apache.maven.plugins maven-release-plugin - 3.0.0-M4 + 3.0.0-M5 From d538a8d862f29ddc7b55bba11f7b2eb7344b808b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 07:15:33 +0100 Subject: [PATCH 069/200] Bump maven-compiler-plugin from 3.8.1 to 3.9.0 (#801) Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.8.1 to 3.9.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.8.1...maven-compiler-plugin-3.9.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ff2b9b002..e258c0c8c 100644 --- a/pom.xml +++ b/pom.xml @@ -80,7 +80,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.9.0 1.8 1.8 From 4b05c809cf7570a62f912653df4629a435734d07 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 07:15:58 +0100 Subject: [PATCH 070/200] Bump maven-jar-plugin from 3.2.1 to 3.2.2 (#800) Bumps [maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.2.1 to 3.2.2. - [Release notes](https://github.com/apache/maven-jar-plugin/releases) - [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.2.1...maven-jar-plugin-3.2.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-jar-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e258c0c8c..3fc344a43 100644 --- a/pom.xml +++ b/pom.xml @@ -114,7 +114,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.1 + 3.2.2 org.apache.maven.plugins From 3dd90cba7bd09cb4f076613677fe15a9888a898f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jan 2022 07:31:54 +0100 Subject: [PATCH 071/200] Bump versions-maven-plugin from 2.8.1 to 2.9.0 (#803) Bumps [versions-maven-plugin](https://github.com/mojohaus/versions-maven-plugin) from 2.8.1 to 2.9.0. - [Release notes](https://github.com/mojohaus/versions-maven-plugin/releases) - [Changelog](https://github.com/mojohaus/versions-maven-plugin/blob/master/ReleaseNotes.md) - [Commits](https://github.com/mojohaus/versions-maven-plugin/compare/versions-maven-plugin-2.8.1...versions-maven-plugin-2.9.0) --- updated-dependencies: - dependency-name: org.codehaus.mojo:versions-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3fc344a43..a1ffe1c3a 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ org.codehaus.mojo versions-maven-plugin - 2.8.1 + 2.9.0 org.apache.maven.plugins From cfae8cb83752e90fd830ec23c144655f8893e427 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jan 2022 07:32:01 +0100 Subject: [PATCH 072/200] Bump mockito-core from 4.2.0 to 4.3.1 (#805) Bumps [mockito-core](https://github.com/mockito/mockito) from 4.2.0 to 4.3.1. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.2.0...v4.3.1) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a1ffe1c3a..d9c694c8f 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.mockito mockito-core - 4.2.0 + 4.3.1 test From 94ee017e2c9a362fbd5fdde832f548e70f771a5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jan 2022 07:32:34 +0100 Subject: [PATCH 073/200] Bump checkstyle from 9.2.1 to 9.3 (#804) Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 9.2.1 to 9.3. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-9.2.1...checkstyle-9.3) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d9c694c8f..bc59a7605 100644 --- a/pom.xml +++ b/pom.xml @@ -216,7 +216,7 @@ com.puppycrawl.tools checkstyle - 9.2.1 + 9.3 From 84a94a1e7e9bbb2e830f3087743020f988554569 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 07:18:02 +0100 Subject: [PATCH 074/200] Bump maven-compiler-plugin from 3.9.0 to 3.10.0 (#809) Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.9.0 to 3.10.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.9.0...maven-compiler-plugin-3.10.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bc59a7605..c9342b880 100644 --- a/pom.xml +++ b/pom.xml @@ -80,7 +80,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.9.0 + 3.10.0 1.8 1.8 From 1fff84a17577a809a80a4ceae408486df05924a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 07:18:41 +0100 Subject: [PATCH 075/200] Bump maven-site-plugin from 3.10.0 to 3.11.0 (#808) Bumps [maven-site-plugin](https://github.com/apache/maven-site-plugin) from 3.10.0 to 3.11.0. - [Release notes](https://github.com/apache/maven-site-plugin/releases) - [Commits](https://github.com/apache/maven-site-plugin/compare/maven-site-plugin-3.10.0...maven-site-plugin-3.11.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-site-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c9342b880..c0700906d 100644 --- a/pom.xml +++ b/pom.xml @@ -94,7 +94,7 @@ org.apache.maven.plugins maven-site-plugin - 3.10.0 + 3.11.0 org.apache.maven.plugins From 6a523b11e1201394bcb7997ab6652d1474908e38 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 07:19:22 +0100 Subject: [PATCH 076/200] Bump nexus-staging-maven-plugin from 1.6.8 to 1.6.11 (#810) Bumps nexus-staging-maven-plugin from 1.6.8 to 1.6.11. --- updated-dependencies: - dependency-name: org.sonatype.plugins:nexus-staging-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c0700906d..0a4ca9ce5 100644 --- a/pom.xml +++ b/pom.xml @@ -152,7 +152,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.11 true ossrh From 32035c2e868aeba08a67a8716ed59bad515555ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Tue, 22 Feb 2022 13:32:25 +0100 Subject: [PATCH 077/200] chore(ci): use new Codecov uploader for reporting code coverage (#811) --- .github/workflows/master.yml | 12 +++++++++++- .github/workflows/pr.yml | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 93f7ef36b..aeaede1ba 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -25,7 +25,17 @@ jobs: run: ./compile-and-test.sh - name: codecov - run: bash <(curl -s https://codecov.io/bash) + run: | + sudo apt-get update + sudo apt-get install gpg libdigest-sha-perl -y + curl -Os https://uploader.codecov.io/latest/linux/codecov + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig + curl -s https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM + shasum -a 256 -c codecov.SHA256SUM + chmod +x ./codecov + ./codecov if: matrix.influxdb != '2.0' && matrix.influxdb != '2.1' diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index ab9844fad..4b938bf19 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -29,5 +29,15 @@ jobs: run: ./compile-and-test.sh - name: codecov - run: bash <(curl -s https://codecov.io/bash) + run: | + sudo apt-get update + sudo apt-get install gpg libdigest-sha-perl -y + curl -Os https://uploader.codecov.io/latest/linux/codecov + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig + curl -s https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM + shasum -a 256 -c codecov.SHA256SUM + chmod +x ./codecov + ./codecov if: matrix.influxdb != '2.0' && matrix.influxdb != '2.1' From 0aa35d9edf8dca01d678d32e4e8d33fc096c5a9d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 07:35:13 +0100 Subject: [PATCH 078/200] Bump nexus-staging-maven-plugin from 1.6.11 to 1.6.12 (#812) Bumps nexus-staging-maven-plugin from 1.6.11 to 1.6.12. --- updated-dependencies: - dependency-name: org.sonatype.plugins:nexus-staging-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0a4ca9ce5..a8205d45a 100644 --- a/pom.xml +++ b/pom.xml @@ -152,7 +152,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.11 + 1.6.12 true ossrh From 49dccf6f1da57666d1353de42611f24cfb165959 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 07:13:05 +0100 Subject: [PATCH 079/200] Bump checkstyle from 9.3 to 10.0 (#813) Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 9.3 to 10.0. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-9.3...checkstyle-10.0) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a8205d45a..1458f19a5 100644 --- a/pom.xml +++ b/pom.xml @@ -216,7 +216,7 @@ com.puppycrawl.tools checkstyle - 9.3 + 10.0 From d2ca9a532265b9628ca1a9d516f019e69d07c0a6 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Mon, 7 Mar 2022 14:01:16 +0100 Subject: [PATCH 080/200] Revert "Bump checkstyle from 9.3 to 10.0 (#813)" (#814) This reverts commit 49dccf6f1da57666d1353de42611f24cfb165959. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1458f19a5..a8205d45a 100644 --- a/pom.xml +++ b/pom.xml @@ -216,7 +216,7 @@ com.puppycrawl.tools checkstyle - 10.0 + 9.3 From 914997b17c144e990fb32d4a64edb980d2de86f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Mar 2022 06:56:40 +0100 Subject: [PATCH 081/200] chore(deps): bump msgpack-core from 0.9.0 to 0.9.1 (#816) Bumps [msgpack-core](https://github.com/msgpack/msgpack-java) from 0.9.0 to 0.9.1. - [Release notes](https://github.com/msgpack/msgpack-java/releases) - [Changelog](https://github.com/msgpack/msgpack-java/blob/develop/RELEASE_NOTES.md) - [Commits](https://github.com/msgpack/msgpack-java/compare/v0.9.0...v0.9.1) --- updated-dependencies: - dependency-name: org.msgpack:msgpack-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a8205d45a..4405949f4 100644 --- a/pom.xml +++ b/pom.xml @@ -301,7 +301,7 @@ org.msgpack msgpack-core - 0.9.0 + 0.9.1 From 3985c5e449e616c043392ae7f793a56e6a27b7fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Mar 2022 06:57:12 +0100 Subject: [PATCH 082/200] chore(deps-dev): bump mockito-core from 4.3.1 to 4.4.0 (#817) Bumps [mockito-core](https://github.com/mockito/mockito) from 4.3.1 to 4.4.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.3.1...v4.4.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4405949f4..158cca08c 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.mockito mockito-core - 4.3.1 + 4.4.0 test From 3e4fb137b777b733727b838cd8d275871c032b7e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Mar 2022 06:57:51 +0100 Subject: [PATCH 083/200] chore(deps): bump maven-compiler-plugin from 3.10.0 to 3.10.1 (#815) Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.10.0 to 3.10.1. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.10.0...maven-compiler-plugin-3.10.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 158cca08c..75668ce61 100644 --- a/pom.xml +++ b/pom.xml @@ -80,7 +80,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.10.0 + 3.10.1 1.8 1.8 From 0fbf510e9f81417f9b5bb2cae7ab93b88d1f6707 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Mar 2022 06:58:17 +0100 Subject: [PATCH 084/200] Bump maven-javadoc-plugin from 3.3.1 to 3.3.2 (#807) Bumps [maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.3.1 to 3.3.2. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.3.1...maven-javadoc-plugin-3.3.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 75668ce61..4dab7ac14 100644 --- a/pom.xml +++ b/pom.xml @@ -176,7 +176,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + 3.3.2 8 From 592c3cd836edd628b8d566e6e68df823ba6b7c55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 07:15:25 +0100 Subject: [PATCH 085/200] chore(deps): bump versions-maven-plugin from 2.9.0 to 2.10.0 (#819) Bumps [versions-maven-plugin](https://github.com/mojohaus/versions-maven-plugin) from 2.9.0 to 2.10.0. - [Release notes](https://github.com/mojohaus/versions-maven-plugin/releases) - [Changelog](https://github.com/mojohaus/versions-maven-plugin/blob/master/ReleaseNotes.md) - [Commits](https://github.com/mojohaus/versions-maven-plugin/compare/versions-maven-plugin-2.9.0...versions-maven-plugin-2.10.0) --- updated-dependencies: - dependency-name: org.codehaus.mojo:versions-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4dab7ac14..6dd06c7cf 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ org.codehaus.mojo versions-maven-plugin - 2.9.0 + 2.10.0 org.apache.maven.plugins From a3a71ab3c1c5b4ec6cf689f480266039a0c16ee0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 07:14:26 +0200 Subject: [PATCH 086/200] chore(deps): bump jacoco-maven-plugin from 0.8.7 to 0.8.8 (#826) Bumps [jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.7 to 0.8.8. - [Release notes](https://github.com/jacoco/jacoco/releases) - [Commits](https://github.com/jacoco/jacoco/compare/v0.8.7...v0.8.8) --- updated-dependencies: - dependency-name: org.jacoco:jacoco-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6dd06c7cf..99964108a 100644 --- a/pom.xml +++ b/pom.xml @@ -192,7 +192,7 @@ org.jacoco jacoco-maven-plugin - 0.8.7 + 0.8.8 From 801ddd4ff9f8b08622bf543f6f94f733778b2c7a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 07:14:59 +0200 Subject: [PATCH 087/200] chore(deps): bump maven-surefire-plugin from 3.0.0-M5 to 3.0.0-M6 (#824) Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.0.0-M5 to 3.0.0-M6. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.0.0-M5...surefire-3.0.0-M6) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 99964108a..45b252c7a 100644 --- a/pom.xml +++ b/pom.xml @@ -89,7 +89,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M5 + 3.0.0-M6 org.apache.maven.plugins From 34fac0ab4e4095e9a0c86a40bf8ae1bea26f4a4c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 07:15:26 +0200 Subject: [PATCH 088/200] chore(deps): bump maven-clean-plugin from 3.1.0 to 3.2.0 (#825) Bumps [maven-clean-plugin](https://github.com/apache/maven-clean-plugin) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/apache/maven-clean-plugin/releases) - [Commits](https://github.com/apache/maven-clean-plugin/compare/maven-clean-plugin-3.1.0...maven-clean-plugin-3.2.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-clean-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 45b252c7a..616a2d0b7 100644 --- a/pom.xml +++ b/pom.xml @@ -99,7 +99,7 @@ org.apache.maven.plugins maven-clean-plugin - 3.1.0 + 3.2.0 org.apache.maven.plugins From b62d6a9b335ae6bb9154c4898886ab2e35725f0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 06:58:12 +0200 Subject: [PATCH 089/200] chore(deps): bump nexus-staging-maven-plugin from 1.6.12 to 1.6.13 (#832) Bumps nexus-staging-maven-plugin from 1.6.12 to 1.6.13. --- updated-dependencies: - dependency-name: org.sonatype.plugins:nexus-staging-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 616a2d0b7..eedc46676 100644 --- a/pom.xml +++ b/pom.xml @@ -152,7 +152,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.12 + 1.6.13 true ossrh From 33bfb66ed2841b306755e12c4deb05219258a820 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 06:58:43 +0200 Subject: [PATCH 090/200] chore(deps-dev): bump mockito-core from 4.4.0 to 4.5.1 (#831) Bumps [mockito-core](https://github.com/mockito/mockito) from 4.4.0 to 4.5.1. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.4.0...v4.5.1) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index eedc46676..f1cb2a5a2 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.mockito mockito-core - 4.4.0 + 4.5.1 test From 4f15da2de3ab0f3da6b8a825a0c0ac23bb199308 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 06:59:10 +0200 Subject: [PATCH 091/200] chore(deps): bump maven-site-plugin from 3.11.0 to 3.12.0 (#830) Bumps [maven-site-plugin](https://github.com/apache/maven-site-plugin) from 3.11.0 to 3.12.0. - [Release notes](https://github.com/apache/maven-site-plugin/releases) - [Commits](https://github.com/apache/maven-site-plugin/compare/maven-site-plugin-3.11.0...maven-site-plugin-3.12.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-site-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f1cb2a5a2..3384edb60 100644 --- a/pom.xml +++ b/pom.xml @@ -94,7 +94,7 @@ org.apache.maven.plugins maven-site-plugin - 3.11.0 + 3.12.0 org.apache.maven.plugins From 736a4ebfb55fe78f20b80f344a6284ec53e96e2a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 06:59:35 +0200 Subject: [PATCH 092/200] chore(deps): bump maven-javadoc-plugin from 3.3.2 to 3.4.0 (#829) Bumps [maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.3.2 to 3.4.0. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.3.2...maven-javadoc-plugin-3.4.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3384edb60..4284c3e29 100644 --- a/pom.xml +++ b/pom.xml @@ -176,7 +176,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.2 + 3.4.0 8 From 124bda060250e15c45a4ed3d194391b339b5ce6f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 May 2022 07:12:16 +0200 Subject: [PATCH 093/200] chore(deps): bump versions-maven-plugin from 2.10.0 to 2.11.0 (#833) Bumps [versions-maven-plugin](https://github.com/mojohaus/versions-maven-plugin) from 2.10.0 to 2.11.0. - [Release notes](https://github.com/mojohaus/versions-maven-plugin/releases) - [Changelog](https://github.com/mojohaus/versions-maven-plugin/blob/master/ReleaseNotes.md) - [Commits](https://github.com/mojohaus/versions-maven-plugin/compare/versions-maven-plugin-2.10.0...versions-maven-plugin-2.11.0) --- updated-dependencies: - dependency-name: org.codehaus.mojo:versions-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4284c3e29..e1def07cc 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ org.codehaus.mojo versions-maven-plugin - 2.10.0 + 2.11.0 org.apache.maven.plugins From e5f80c6c8bc0485df3f91c966aebeba1f25a1482 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 May 2022 07:05:48 +0200 Subject: [PATCH 094/200] chore(deps-dev): bump mockito-core from 4.5.1 to 4.6.0 (#835) Bumps [mockito-core](https://github.com/mockito/mockito) from 4.5.1 to 4.6.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.5.1...v4.6.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e1def07cc..1ad1bcf3f 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.mockito mockito-core - 4.5.1 + 4.6.0 test From 0c7b55f30bff6c40de3a3857b4d3e98bc15bc11b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 09:34:27 +0200 Subject: [PATCH 095/200] chore(deps-dev): bump mockito-core from 4.6.0 to 4.6.1 (#839) Bumps [mockito-core](https://github.com/mockito/mockito) from 4.6.0 to 4.6.1. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.6.0...v4.6.1) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1ad1bcf3f..64f6a6642 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.mockito mockito-core - 4.6.0 + 4.6.1 test From b8168435ca76a50690ee0d9c14bd2c7854738cc4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 09:34:57 +0200 Subject: [PATCH 096/200] chore(deps-dev): bump assertj-core from 3.22.0 to 3.23.1 (#838) Bumps [assertj-core](https://github.com/assertj/assertj-core) from 3.22.0 to 3.23.1. - [Release notes](https://github.com/assertj/assertj-core/releases) - [Commits](https://github.com/assertj/assertj-core/compare/assertj-core-3.22.0...assertj-core-3.23.1) --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 64f6a6642..975b1a7b5 100644 --- a/pom.xml +++ b/pom.xml @@ -267,7 +267,7 @@ org.assertj assertj-core - 3.22.0 + 3.23.1 test From 841a3458e3b156cc221d9f2d5f94a07531d1a8d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jun 2022 07:12:37 +0200 Subject: [PATCH 097/200] chore(deps): bump maven-surefire-plugin from 3.0.0-M6 to 3.0.0-M7 (#840) Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.0.0-M6 to 3.0.0-M7. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.0.0-M6...surefire-3.0.0-M7) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 975b1a7b5..0f41cd28d 100644 --- a/pom.xml +++ b/pom.xml @@ -89,7 +89,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M6 + 3.0.0-M7 org.apache.maven.plugins From 214edab19461201fdc7559b67b6f7fa11a940044 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jun 2022 07:14:09 +0200 Subject: [PATCH 098/200] chore(deps): bump okhttp from 4.9.3 to 4.10.0 (#841) Bumps [okhttp](https://github.com/square/okhttp) from 4.9.3 to 4.10.0. - [Release notes](https://github.com/square/okhttp/releases) - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](https://github.com/square/okhttp/compare/parent-4.9.3...parent-4.10.0) --- updated-dependencies: - dependency-name: com.squareup.okhttp3:okhttp dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0f41cd28d..8e125dfd3 100644 --- a/pom.xml +++ b/pom.xml @@ -308,7 +308,7 @@ com.squareup.okhttp3 okhttp - 4.9.3 + 4.10.0 com.squareup.okhttp3 From 2bae7e4a2e7821c3a01722ecdc5a6bfb9a036aeb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jun 2022 07:14:34 +0200 Subject: [PATCH 099/200] chore(deps): bump logging-interceptor from 4.9.3 to 4.10.0 (#842) Bumps [logging-interceptor](https://github.com/square/okhttp) from 4.9.3 to 4.10.0. - [Release notes](https://github.com/square/okhttp/releases) - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](https://github.com/square/okhttp/compare/parent-4.9.3...parent-4.10.0) --- updated-dependencies: - dependency-name: com.squareup.okhttp3:logging-interceptor dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8e125dfd3..9168a1c84 100644 --- a/pom.xml +++ b/pom.xml @@ -313,7 +313,7 @@ com.squareup.okhttp3 logging-interceptor - 4.9.3 + 4.10.0 From 1fd32da8e7716a0668bd01d2a83dce25ffccc9e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jun 2022 07:15:04 +0200 Subject: [PATCH 100/200] chore(deps): bump maven-enforcer-plugin from 3.0.0 to 3.1.0 (#843) Bumps [maven-enforcer-plugin](https://github.com/apache/maven-enforcer) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/apache/maven-enforcer/releases) - [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.0.0...enforcer-3.1.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-enforcer-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9168a1c84..4a5019560 100644 --- a/pom.xml +++ b/pom.xml @@ -132,7 +132,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0 + 3.1.0 enforce-maven From 71ee6af7bfe4910afb0b4b5b571ad38ac8c68082 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jun 2022 07:14:38 +0200 Subject: [PATCH 101/200] chore(deps): bump msgpack-core from 0.9.1 to 0.9.2 (#845) Bumps [msgpack-core](https://github.com/msgpack/msgpack-java) from 0.9.1 to 0.9.2. - [Release notes](https://github.com/msgpack/msgpack-java/releases) - [Changelog](https://github.com/msgpack/msgpack-java/blob/develop/RELEASE_NOTES.md) - [Commits](https://github.com/msgpack/msgpack-java/compare/v0.9.1...v0.9.2) --- updated-dependencies: - dependency-name: org.msgpack:msgpack-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4a5019560..8eb7a7748 100644 --- a/pom.xml +++ b/pom.xml @@ -301,7 +301,7 @@ org.msgpack msgpack-core - 0.9.1 + 0.9.2 From db72eb430e35a1196305f6b57b9cd022297898a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jun 2022 07:15:02 +0200 Subject: [PATCH 102/200] chore(deps): bump maven-release-plugin from 3.0.0-M5 to 3.0.0-M6 (#844) Bumps [maven-release-plugin](https://github.com/apache/maven-release) from 3.0.0-M5 to 3.0.0-M6. - [Release notes](https://github.com/apache/maven-release/releases) - [Commits](https://github.com/apache/maven-release/compare/maven-release-3.0.0-M5...maven-release-3.0.0-M6) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-release-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8eb7a7748..2dd72f078 100644 --- a/pom.xml +++ b/pom.xml @@ -124,7 +124,7 @@ org.apache.maven.plugins maven-release-plugin - 3.0.0-M5 + 3.0.0-M6 From 3d53a50e47384392efb868ee1c78a90ad7345820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Wed, 29 Jun 2022 16:18:47 +0200 Subject: [PATCH 103/200] chore(release): add implementation information to Jar manifest (#847) --- CHANGELOG.md | 3 +++ pom.xml | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb685014e..7a7f520da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## 2.23 [unreleased] +### Improvements +- Add implementation information to `Jar` manifest [PR #847](https://github.com/influxdata/influxdb-java/pull/847) + ## 2.22 [2021-09-17] ### Improvements diff --git a/pom.xml b/pom.xml index 2dd72f078..7e4471c77 100644 --- a/pom.xml +++ b/pom.xml @@ -115,6 +115,13 @@ org.apache.maven.plugins maven-jar-plugin 3.2.2 + + + + true + + + org.apache.maven.plugins From 80362507fe8a14f1146930d61e045b3ed3f3436f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Jul 2022 07:48:48 +0200 Subject: [PATCH 104/200] chore(deps): bump msgpack-core from 0.9.2 to 0.9.3 (#849) Bumps [msgpack-core](https://github.com/msgpack/msgpack-java) from 0.9.2 to 0.9.3. - [Release notes](https://github.com/msgpack/msgpack-java/releases) - [Changelog](https://github.com/msgpack/msgpack-java/blob/develop/RELEASE_NOTES.md) - [Commits](https://github.com/msgpack/msgpack-java/compare/v0.9.2...v0.9.3) --- updated-dependencies: - dependency-name: org.msgpack:msgpack-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7e4471c77..8535612b9 100644 --- a/pom.xml +++ b/pom.xml @@ -308,7 +308,7 @@ org.msgpack msgpack-core - 0.9.2 + 0.9.3 From 99dbf496f59e9269387df4a15afaf09db73e67e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Tue, 5 Jul 2022 07:00:30 +0200 Subject: [PATCH 105/200] fix: use gzip compression only for /write endpoint (#851) --- CHANGELOG.md | 3 +++ .../org/influxdb/impl/GzipRequestInterceptor.java | 7 +++++++ src/test/java/org/influxdb/InfluxDBTest.java | 14 ++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a7f520da..847bd95ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ ### Improvements - Add implementation information to `Jar` manifest [PR #847](https://github.com/influxdata/influxdb-java/pull/847) +### Fixes +- Only the request to /write endpoint should be compressed by GZIP [PR #851](https://github.com/influxdata/influxdb-java/pull/851) + ## 2.22 [2021-09-17] ### Improvements diff --git a/src/main/java/org/influxdb/impl/GzipRequestInterceptor.java b/src/main/java/org/influxdb/impl/GzipRequestInterceptor.java index 8969780d9..adaa3d528 100644 --- a/src/main/java/org/influxdb/impl/GzipRequestInterceptor.java +++ b/src/main/java/org/influxdb/impl/GzipRequestInterceptor.java @@ -2,6 +2,7 @@ import java.io.IOException; import java.util.concurrent.atomic.AtomicBoolean; +import java.util.regex.Pattern; import okhttp3.Interceptor; import okhttp3.MediaType; @@ -19,6 +20,8 @@ */ final class GzipRequestInterceptor implements Interceptor { + private static final Pattern WRITE_PATTERN = Pattern.compile(".*/write", Pattern.CASE_INSENSITIVE); + private AtomicBoolean enabled = new AtomicBoolean(false); GzipRequestInterceptor() { @@ -48,6 +51,10 @@ public Response intercept(final Interceptor.Chain chain) throws IOException { return chain.proceed(originalRequest); } + if (!WRITE_PATTERN.matcher(originalRequest.url().encodedPath()).matches()) { + return chain.proceed(originalRequest); + } + Request compressedRequest = originalRequest.newBuilder().header("Content-Encoding", "gzip") .method(originalRequest.method(), gzip(body)).build(); return chain.proceed(compressedRequest); diff --git a/src/test/java/org/influxdb/InfluxDBTest.java b/src/test/java/org/influxdb/InfluxDBTest.java index 38b5fcfa3..2598b9f23 100644 --- a/src/test/java/org/influxdb/InfluxDBTest.java +++ b/src/test/java/org/influxdb/InfluxDBTest.java @@ -41,6 +41,8 @@ import java.util.function.Consumer; import java.util.regex.Pattern; +import static org.assertj.core.api.Assertions.assertThat; + /** * Test the InfluxDB API. * @@ -1457,6 +1459,18 @@ public String call() throws Exception { Assertions.assertTrue(MyInfluxDBBean.OKHTTP_BUILDER.interceptors().isEmpty()); } + @Test + public void testQueryPostWithGZIPCompression() { + this.influxDB.enableGzip(); + String database = "db_gzip_" + System.currentTimeMillis(); + this.influxDB.query(new Query(String.format("CREATE DATABASE %s", database), null, true)); + QueryResult query = this.influxDB.query(new Query("SHOW DATABASES", null, true)); + assertThat(query.getResults()).hasSize(1); + assertThat(query.getResults().get(0).getSeries()).hasSize(1); + assertThat(query.getResults().get(0).getSeries().get(0).getValues()).contains(Collections.singletonList(database)); + this.influxDB.query(new Query(String.format("DROP DATABASE %s", database), null, true)); + } + private static final class MyInfluxDBBean { static final OkHttpClient.Builder OKHTTP_BUILDER = new OkHttpClient.Builder(); From aa29f90aa8af0f1dc8a7d70b69a64034e97542b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Thu, 7 Jul 2022 08:15:04 +0200 Subject: [PATCH 106/200] chore(ci): use InfluxDB 2.1, 2.2 and 2.3 in CI pipeline (#852) --- .github/workflows/master.yml | 4 ++-- .github/workflows/pr.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index aeaede1ba..51af9c563 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: jdk: [3-openjdk-17-slim, 3-jdk-14, 3-jdk-8-slim] - influxdb: ['1.1', '1.6', '1.8', '2.0', '2.1'] + influxdb: ['1.1', '1.6', '1.8', '2.1', '2.2', '2.3'] steps: - name: Checkout @@ -36,7 +36,7 @@ jobs: shasum -a 256 -c codecov.SHA256SUM chmod +x ./codecov ./codecov - if: matrix.influxdb != '2.0' && matrix.influxdb != '2.1' + if: matrix.influxdb != '2.1' && matrix.influxdb != '2.2' && matrix.influxdb != '2.3' # deploy: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 4b938bf19..cf74ce6b3 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: jdk: [3-openjdk-17-slim, 3-jdk-14, 3-jdk-8-slim] - influxdb: ['1.1', '1.6', '1.8', '2.0', '2.1'] + influxdb: ['1.1', '1.6', '1.8', '2.1', '2.2', '2.3'] steps: - name: Checkout @@ -40,4 +40,4 @@ jobs: shasum -a 256 -c codecov.SHA256SUM chmod +x ./codecov ./codecov - if: matrix.influxdb != '2.0' && matrix.influxdb != '2.1' + if: matrix.influxdb != '2.1' && matrix.influxdb != '2.2' && matrix.influxdb != '2.3' From b6e8d36ff5e83d8587b81d2b95eb4b8c2ee4385c Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Thu, 7 Jul 2022 11:13:22 +0200 Subject: [PATCH 107/200] [maven-release-plugin] prepare release influxdb-java-2.23 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 8535612b9..cd2e4b65c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.influxdb influxdb-java jar - 2.23-SNAPSHOT + 2.23 influxdb java bindings Java API to access the InfluxDB REST API http://www.influxdb.org @@ -24,7 +24,7 @@ scm:git:git@github.com:influxdata/influxdb-java.git scm:git:git@github.com:influxdata/influxdb-java.git git@github.com:influxdata/influxdb-java.git - HEAD + influxdb-java-2.23 From d75a34c4e7a79155bb6450498f8d8834221b7e6e Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Thu, 7 Jul 2022 11:13:26 +0200 Subject: [PATCH 108/200] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index cd2e4b65c..71e43c749 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.influxdb influxdb-java jar - 2.23 + 2.24-SNAPSHOT influxdb java bindings Java API to access the InfluxDB REST API http://www.influxdb.org @@ -24,7 +24,7 @@ scm:git:git@github.com:influxdata/influxdb-java.git scm:git:git@github.com:influxdata/influxdb-java.git git@github.com:influxdata/influxdb-java.git - influxdb-java-2.23 + HEAD From e1b8fc49ddb3ebeba4ff245e47f6d9eafb716a74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Jul 2022 07:02:04 +0200 Subject: [PATCH 109/200] chore(deps): bump maven-install-plugin from 3.0.0-M1 to 3.0.1 (#855) Bumps [maven-install-plugin](https://github.com/apache/maven-install-plugin) from 3.0.0-M1 to 3.0.1. - [Release notes](https://github.com/apache/maven-install-plugin/releases) - [Commits](https://github.com/apache/maven-install-plugin/compare/maven-install-plugin-3.0.0-M1...maven-install-plugin-3.0.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-install-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 71e43c749..1078f408b 100644 --- a/pom.xml +++ b/pom.xml @@ -109,7 +109,7 @@ org.apache.maven.plugins maven-install-plugin - 3.0.0-M1 + 3.0.1 org.apache.maven.plugins From aaf2cb6f6a8d987ed49fa5ec014fd1e96e4197a2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Jul 2022 07:02:26 +0200 Subject: [PATCH 110/200] chore(deps): bump maven-deploy-plugin from 3.0.0-M2 to 3.0.0 (#856) Bumps [maven-deploy-plugin](https://github.com/apache/maven-deploy-plugin) from 3.0.0-M2 to 3.0.0. - [Release notes](https://github.com/apache/maven-deploy-plugin/releases) - [Commits](https://github.com/apache/maven-deploy-plugin/compare/maven-deploy-plugin-3.0.0-M2...maven-deploy-plugin-3.0.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-deploy-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1078f408b..5b54f361d 100644 --- a/pom.xml +++ b/pom.xml @@ -104,7 +104,7 @@ org.apache.maven.plugins maven-deploy-plugin - 3.0.0-M2 + 3.0.0 org.apache.maven.plugins From 7cb413a1b2b9ee227ad0a6ef1db12e82b60031d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 07:11:30 +0200 Subject: [PATCH 111/200] chore(deps): bump maven-site-plugin from 3.12.0 to 3.12.1 (#863) Bumps [maven-site-plugin](https://github.com/apache/maven-site-plugin) from 3.12.0 to 3.12.1. - [Release notes](https://github.com/apache/maven-site-plugin/releases) - [Commits](https://github.com/apache/maven-site-plugin/compare/maven-site-plugin-3.12.0...maven-site-plugin-3.12.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-site-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5b54f361d..917be9a67 100644 --- a/pom.xml +++ b/pom.xml @@ -94,7 +94,7 @@ org.apache.maven.plugins maven-site-plugin - 3.12.0 + 3.12.1 org.apache.maven.plugins From 4174231b65d3c855d960c64b9e83c95410c85dd4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 07:12:40 +0200 Subject: [PATCH 112/200] chore(deps): bump maven-resources-plugin from 3.2.0 to 3.3.0 (#861) Bumps [maven-resources-plugin](https://github.com/apache/maven-resources-plugin) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/apache/maven-resources-plugin/releases) - [Commits](https://github.com/apache/maven-resources-plugin/compare/maven-resources-plugin-3.2.0...maven-resources-plugin-3.3.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-resources-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 917be9a67..dcc073430 100644 --- a/pom.xml +++ b/pom.xml @@ -126,7 +126,7 @@ org.apache.maven.plugins maven-resources-plugin - 3.2.0 + 3.3.0 org.apache.maven.plugins @@ -333,7 +333,7 @@ maven-resources-plugin - 3.2.0 + 3.3.0 copy-resources From f0e92e2b3ba725d6d7af8f0faa135e1661472d23 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 07:21:19 +0200 Subject: [PATCH 113/200] chore(deps-dev): bump mockito-core from 4.6.1 to 4.7.0 (#865) Bumps [mockito-core](https://github.com/mockito/mockito) from 4.6.1 to 4.7.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.6.1...v4.7.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dcc073430..a38a05e6e 100644 --- a/pom.xml +++ b/pom.xml @@ -280,7 +280,7 @@ org.mockito mockito-core - 4.6.1 + 4.7.0 test From 32cd31f5c3b66841c368b0323e431fb7b308fae7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 07:21:45 +0200 Subject: [PATCH 114/200] chore(deps-dev): bump junit-jupiter-engine from 5.8.2 to 5.9.0 (#860) Bumps [junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.8.2 to 5.9.0. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.8.2...r5.9.0) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a38a05e6e..e728c5ed2 100644 --- a/pom.xml +++ b/pom.xml @@ -256,7 +256,7 @@ org.junit.jupiter junit-jupiter-engine - 5.8.2 + 5.9.0 test From dd4405bda97787fecb5be198f7b6ef427c5bd3dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 07:22:07 +0200 Subject: [PATCH 115/200] chore(deps-dev): bump junit-platform-runner from 1.8.2 to 1.9.0 (#858) Bumps [junit-platform-runner](https://github.com/junit-team/junit5) from 1.8.2 to 1.9.0. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/commits) --- updated-dependencies: - dependency-name: org.junit.platform:junit-platform-runner dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e728c5ed2..43bdd30f7 100644 --- a/pom.xml +++ b/pom.xml @@ -262,7 +262,7 @@ org.junit.platform junit-platform-runner - 1.8.2 + 1.9.0 test From ae212ffaeeb512ba561ef6730199d29ca22cd94c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 07:22:26 +0200 Subject: [PATCH 116/200] chore(deps): bump maven-javadoc-plugin from 3.4.0 to 3.4.1 (#866) Bumps [maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.4.0 to 3.4.1. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.4.0...maven-javadoc-plugin-3.4.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 43bdd30f7..b302ccdd7 100644 --- a/pom.xml +++ b/pom.xml @@ -183,7 +183,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 8 From daba8e62480eae8ca944b4ec566f96ae289272e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Fri, 2 Sep 2022 09:39:26 +0200 Subject: [PATCH 117/200] chore(ci): add InfluxDB 2.4 to CI pipeline (#867) --- .github/workflows/master.yml | 4 ++-- .github/workflows/pr.yml | 4 ++-- CHANGELOG.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 51af9c563..47c777cc0 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: jdk: [3-openjdk-17-slim, 3-jdk-14, 3-jdk-8-slim] - influxdb: ['1.1', '1.6', '1.8', '2.1', '2.2', '2.3'] + influxdb: ['1.1', '1.6', '1.8', '2.2', '2.3', '2.4'] steps: - name: Checkout @@ -36,7 +36,7 @@ jobs: shasum -a 256 -c codecov.SHA256SUM chmod +x ./codecov ./codecov - if: matrix.influxdb != '2.1' && matrix.influxdb != '2.2' && matrix.influxdb != '2.3' + if: matrix.influxdb != '2.2' && matrix.influxdb != '2.3' && matrix.influxdb != '2.4' # deploy: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index cf74ce6b3..796189ea8 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: jdk: [3-openjdk-17-slim, 3-jdk-14, 3-jdk-8-slim] - influxdb: ['1.1', '1.6', '1.8', '2.1', '2.2', '2.3'] + influxdb: ['1.1', '1.6', '1.8', '2.2', '2.3', '2.4'] steps: - name: Checkout @@ -40,4 +40,4 @@ jobs: shasum -a 256 -c codecov.SHA256SUM chmod +x ./codecov ./codecov - if: matrix.influxdb != '2.1' && matrix.influxdb != '2.2' && matrix.influxdb != '2.3' + if: matrix.influxdb != '2.2' && matrix.influxdb != '2.3' && matrix.influxdb != '2.4' diff --git a/CHANGELOG.md b/CHANGELOG.md index 847bd95ad..026d4d09a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 2.23 [unreleased] +## 2.23 [2022-07-07] ### Improvements - Add implementation information to `Jar` manifest [PR #847](https://github.com/influxdata/influxdb-java/pull/847) From c029ec16880ea1a415aee566b67c57d5b51bbcd3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Sep 2022 15:15:57 +0200 Subject: [PATCH 118/200] chore(deps): bump maven-checkstyle-plugin from 3.1.2 to 3.2.0 (#868) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b302ccdd7..906d7c085 100644 --- a/pom.xml +++ b/pom.xml @@ -218,7 +218,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.1.2 + 3.2.0 com.puppycrawl.tools From 6fda74aacf8950a46ae03b75393071fd2b945f1b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 07:24:09 +0200 Subject: [PATCH 119/200] chore(deps-dev): bump mockito-core from 4.7.0 to 4.8.0 (#870) Bumps [mockito-core](https://github.com/mockito/mockito) from 4.7.0 to 4.8.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.7.0...v4.8.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 906d7c085..16f5bdd06 100644 --- a/pom.xml +++ b/pom.xml @@ -280,7 +280,7 @@ org.mockito mockito-core - 4.7.0 + 4.8.0 test From b60c7c364271bc21c4f46b8a35bb840cac8a32e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 07:24:35 +0200 Subject: [PATCH 120/200] chore(deps): bump versions-maven-plugin from 2.11.0 to 2.12.0 (#869) Bumps [versions-maven-plugin](https://github.com/mojohaus/versions-maven-plugin) from 2.11.0 to 2.12.0. - [Release notes](https://github.com/mojohaus/versions-maven-plugin/releases) - [Changelog](https://github.com/mojohaus/versions-maven-plugin/blob/master/ReleaseNotes.md) - [Commits](https://github.com/mojohaus/versions-maven-plugin/compare/versions-maven-plugin-2.11.0...versions-maven-plugin-2.12.0) --- updated-dependencies: - dependency-name: org.codehaus.mojo:versions-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 16f5bdd06..19a196897 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ org.codehaus.mojo versions-maven-plugin - 2.11.0 + 2.12.0 org.apache.maven.plugins From bb6c04e851ee5b39a93293f49186791e858c349e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Sep 2022 07:31:57 +0200 Subject: [PATCH 121/200] chore(deps): bump maven-jar-plugin from 3.2.2 to 3.3.0 (#871) Bumps [maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.2.2 to 3.3.0. - [Release notes](https://github.com/apache/maven-jar-plugin/releases) - [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.2.2...maven-jar-plugin-3.3.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-jar-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 19a196897..3925acbaf 100644 --- a/pom.xml +++ b/pom.xml @@ -114,7 +114,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.2 + 3.3.0 From 6bf6f881036ffbed74709585fbc326c4a2ef4a50 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 08:51:38 +0200 Subject: [PATCH 122/200] chore(deps-dev): bump junit-jupiter-engine from 5.9.0 to 5.9.1 (#872) Bumps [junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.9.0 to 5.9.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.9.0...r5.9.1) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3925acbaf..08fe6afe4 100644 --- a/pom.xml +++ b/pom.xml @@ -256,7 +256,7 @@ org.junit.jupiter junit-jupiter-engine - 5.9.0 + 5.9.1 test From bd59d49c64f93bc72e5b388da3b3b50620981c00 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 08:52:01 +0200 Subject: [PATCH 123/200] chore(deps-dev): bump junit-platform-runner from 1.9.0 to 1.9.1 (#873) Bumps [junit-platform-runner](https://github.com/junit-team/junit5) from 1.9.0 to 1.9.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/commits) --- updated-dependencies: - dependency-name: org.junit.platform:junit-platform-runner dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 08fe6afe4..f930be46a 100644 --- a/pom.xml +++ b/pom.xml @@ -262,7 +262,7 @@ org.junit.platform junit-platform-runner - 1.9.0 + 1.9.1 test From c8b58f8f59313bf5b0e7881e19b341873dbfcb95 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 06:56:22 +0200 Subject: [PATCH 124/200] chore(deps-dev): bump mockito-core from 4.8.0 to 4.8.1 (#876) Bumps [mockito-core](https://github.com/mockito/mockito) from 4.8.0 to 4.8.1. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.8.0...v4.8.1) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f930be46a..ed38da3c2 100644 --- a/pom.xml +++ b/pom.xml @@ -280,7 +280,7 @@ org.mockito mockito-core - 4.8.0 + 4.8.1 test From 0b786a9dda4749b77df8c3eb216696fb43cbfc52 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 06:56:57 +0200 Subject: [PATCH 125/200] chore(deps): bump versions-maven-plugin from 2.12.0 to 2.13.0 (#875) Bumps [versions-maven-plugin](https://github.com/mojohaus/versions-maven-plugin) from 2.12.0 to 2.13.0. - [Release notes](https://github.com/mojohaus/versions-maven-plugin/releases) - [Changelog](https://github.com/mojohaus/versions-maven-plugin/blob/master/ReleaseNotes.md) - [Commits](https://github.com/mojohaus/versions-maven-plugin/compare/versions-maven-plugin-2.12.0...2.13.0) --- updated-dependencies: - dependency-name: org.codehaus.mojo:versions-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ed38da3c2..65e9021de 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ org.codehaus.mojo versions-maven-plugin - 2.12.0 + 2.13.0 org.apache.maven.plugins From dd635514c365332cbc2fa9a765085d5722cf10ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Wed, 2 Nov 2022 10:41:01 +0100 Subject: [PATCH 126/200] chore(ci): add InfluxDB 2.5 to CI pipeline (#878) --- .github/workflows/master.yml | 4 ++-- .github/workflows/pr.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 47c777cc0..8571e5738 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: jdk: [3-openjdk-17-slim, 3-jdk-14, 3-jdk-8-slim] - influxdb: ['1.1', '1.6', '1.8', '2.2', '2.3', '2.4'] + influxdb: ['1.1', '1.6', '1.8', '2.3', '2.4', '2.5'] steps: - name: Checkout @@ -36,7 +36,7 @@ jobs: shasum -a 256 -c codecov.SHA256SUM chmod +x ./codecov ./codecov - if: matrix.influxdb != '2.2' && matrix.influxdb != '2.3' && matrix.influxdb != '2.4' + if: matrix.influxdb != '2.3' && matrix.influxdb != '2.4' && matrix.influxdb != '2.5' # deploy: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 796189ea8..5b70f5e1c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: jdk: [3-openjdk-17-slim, 3-jdk-14, 3-jdk-8-slim] - influxdb: ['1.1', '1.6', '1.8', '2.2', '2.3', '2.4'] + influxdb: ['1.1', '1.6', '1.8', '2.3', '2.4', '2.5'] steps: - name: Checkout @@ -40,4 +40,4 @@ jobs: shasum -a 256 -c codecov.SHA256SUM chmod +x ./codecov ./codecov - if: matrix.influxdb != '2.2' && matrix.influxdb != '2.3' && matrix.influxdb != '2.4' + if: matrix.influxdb != '2.3' && matrix.influxdb != '2.4' && matrix.influxdb != '2.5' From 916e1a0c36f3c51fca94b1118e75e01adfc3e6a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Dec 2022 09:30:06 +0100 Subject: [PATCH 127/200] chore(deps-dev): bump mockito-core from 4.8.1 to 4.10.0 (#884) Bumps [mockito-core](https://github.com/mockito/mockito) from 4.8.1 to 4.10.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.8.1...v4.10.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 65e9021de..7d792e505 100644 --- a/pom.xml +++ b/pom.xml @@ -280,7 +280,7 @@ org.mockito mockito-core - 4.8.1 + 4.10.0 test From 2b48bd48b4398c38626f9a38e363835fb8d1cb65 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Dec 2022 09:30:30 +0100 Subject: [PATCH 128/200] chore(deps): bump versions-maven-plugin from 2.13.0 to 2.14.1 (#883) Bumps [versions-maven-plugin](https://github.com/mojohaus/versions) from 2.13.0 to 2.14.1. - [Release notes](https://github.com/mojohaus/versions/releases) - [Changelog](https://github.com/mojohaus/versions/blob/master/ReleaseNotes.md) - [Commits](https://github.com/mojohaus/versions/compare/2.13.0...2.14.1) --- updated-dependencies: - dependency-name: org.codehaus.mojo:versions-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7d792e505..3ce26a081 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ org.codehaus.mojo versions-maven-plugin - 2.13.0 + 2.14.1 org.apache.maven.plugins From a0f09f8a3086ea34bfce1754f5445e4b50301a98 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Dec 2022 09:07:59 +0100 Subject: [PATCH 129/200] chore(deps): bump versions-maven-plugin from 2.14.1 to 2.14.2 (#885) Bumps [versions-maven-plugin](https://github.com/mojohaus/versions) from 2.14.1 to 2.14.2. - [Release notes](https://github.com/mojohaus/versions/releases) - [Changelog](https://github.com/mojohaus/versions/blob/master/ReleaseNotes.md) - [Commits](https://github.com/mojohaus/versions/compare/2.14.1...2.14.2) --- updated-dependencies: - dependency-name: org.codehaus.mojo:versions-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3ce26a081..6987a753c 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ org.codehaus.mojo versions-maven-plugin - 2.14.1 + 2.14.2 org.apache.maven.plugins From c71a3d010891ef44247ad7e7635ef7257ff0115b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Jan 2023 07:07:49 +0100 Subject: [PATCH 130/200] chore(deps-dev): bump assertj-core from 3.23.1 to 3.24.1 (#888) Bumps assertj-core from 3.23.1 to 3.24.1. --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6987a753c..c5c3efea0 100644 --- a/pom.xml +++ b/pom.xml @@ -274,7 +274,7 @@ org.assertj assertj-core - 3.23.1 + 3.24.1 test From 9e7fc7f8512448253202ceee43aca3bf448117b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Jan 2023 06:43:42 +0100 Subject: [PATCH 131/200] chore(deps-dev): bump junit-jupiter-engine from 5.9.1 to 5.9.2 (#890) Bumps [junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.9.1 to 5.9.2. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.9.1...r5.9.2) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c5c3efea0..7b9e7e545 100644 --- a/pom.xml +++ b/pom.xml @@ -256,7 +256,7 @@ org.junit.jupiter junit-jupiter-engine - 5.9.1 + 5.9.2 test From 80f0f1adad5e2298b345e98974510a642c73c8bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Jan 2023 06:44:14 +0100 Subject: [PATCH 132/200] chore(deps): bump maven-surefire-plugin from 3.0.0-M7 to 3.0.0-M8 (#891) Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.0.0-M7 to 3.0.0-M8. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.0.0-M7...surefire-3.0.0-M8) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7b9e7e545..9bb27e6f2 100644 --- a/pom.xml +++ b/pom.xml @@ -89,7 +89,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M7 + 3.0.0-M8 org.apache.maven.plugins From 5a34be841a485a82537a570edb876b6dd4b2ac80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Jan 2023 06:44:43 +0100 Subject: [PATCH 133/200] chore(deps): bump maven-install-plugin from 3.0.1 to 3.1.0 (#880) Bumps [maven-install-plugin](https://github.com/apache/maven-install-plugin) from 3.0.1 to 3.1.0. - [Release notes](https://github.com/apache/maven-install-plugin/releases) - [Commits](https://github.com/apache/maven-install-plugin/compare/maven-install-plugin-3.0.1...maven-install-plugin-3.1.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-install-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9bb27e6f2..c3338d411 100644 --- a/pom.xml +++ b/pom.xml @@ -109,7 +109,7 @@ org.apache.maven.plugins maven-install-plugin - 3.0.1 + 3.1.0 org.apache.maven.plugins From 2c7825c078bad14cb7da80a0399f31cea0505e83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Jan 2023 07:08:56 +0100 Subject: [PATCH 134/200] chore(deps-dev): bump junit-platform-runner from 1.9.1 to 1.9.2 (#893) Bumps [junit-platform-runner](https://github.com/junit-team/junit5) from 1.9.1 to 1.9.2. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/commits) --- updated-dependencies: - dependency-name: org.junit.platform:junit-platform-runner dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c3338d411..0d7afd458 100644 --- a/pom.xml +++ b/pom.xml @@ -262,7 +262,7 @@ org.junit.platform junit-platform-runner - 1.9.1 + 1.9.2 test From 7baa819949abfd53cc0d8189d3d0b8ee21f19c0f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Jan 2023 07:09:22 +0100 Subject: [PATCH 135/200] chore(deps-dev): bump assertj-core from 3.24.1 to 3.24.2 (#894) Bumps assertj-core from 3.24.1 to 3.24.2. --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0d7afd458..0f9859a3d 100644 --- a/pom.xml +++ b/pom.xml @@ -274,7 +274,7 @@ org.assertj assertj-core - 3.24.1 + 3.24.2 test From 141c65e528cbff3a5ea2f07c4310773f2bd1ad4b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Jan 2023 07:10:24 +0100 Subject: [PATCH 136/200] chore(deps): bump maven-checkstyle-plugin from 3.2.0 to 3.2.1 (#895) Bumps [maven-checkstyle-plugin](https://github.com/apache/maven-checkstyle-plugin) from 3.2.0 to 3.2.1. - [Release notes](https://github.com/apache/maven-checkstyle-plugin/releases) - [Commits](https://github.com/apache/maven-checkstyle-plugin/compare/maven-checkstyle-plugin-3.2.0...maven-checkstyle-plugin-3.2.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-checkstyle-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0f9859a3d..29dcc2221 100644 --- a/pom.xml +++ b/pom.xml @@ -218,7 +218,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.2.0 + 3.2.1 com.puppycrawl.tools From fa2a4bfa917f4edc596833afb6bd233a3eba0bca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Feb 2023 08:06:54 +0100 Subject: [PATCH 137/200] chore(deps): bump maven-enforcer-plugin from 3.1.0 to 3.2.1 (#899) Bumps [maven-enforcer-plugin](https://github.com/apache/maven-enforcer) from 3.1.0 to 3.2.1. - [Release notes](https://github.com/apache/maven-enforcer/releases) - [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.1.0...enforcer-3.2.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-enforcer-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 29dcc2221..60bcc21a8 100644 --- a/pom.xml +++ b/pom.xml @@ -139,7 +139,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.1.0 + 3.2.1 enforce-maven From c5218d96973fdc10cd2450ab599ea4e3bf3a5435 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Feb 2023 07:22:23 +0100 Subject: [PATCH 138/200] chore(deps): bump maven-deploy-plugin from 3.0.0 to 3.1.0 (#901) Bumps [maven-deploy-plugin](https://github.com/apache/maven-deploy-plugin) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/apache/maven-deploy-plugin/releases) - [Commits](https://github.com/apache/maven-deploy-plugin/compare/maven-deploy-plugin-3.0.0...maven-deploy-plugin-3.1.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-deploy-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 60bcc21a8..f44f27e39 100644 --- a/pom.xml +++ b/pom.xml @@ -104,7 +104,7 @@ org.apache.maven.plugins maven-deploy-plugin - 3.0.0 + 3.1.0 org.apache.maven.plugins From 7b167869e22439fe8bea29afc7eb633ecc42ec7a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 07:11:19 +0100 Subject: [PATCH 139/200] chore(deps): bump maven-surefire-plugin from 3.0.0-M8 to 3.0.0-M9 (#903) Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.0.0-M8 to 3.0.0-M9. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.0.0-M8...surefire-3.0.0-M9) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f44f27e39..0fe85a50d 100644 --- a/pom.xml +++ b/pom.xml @@ -89,7 +89,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M8 + 3.0.0-M9 org.apache.maven.plugins From 870655753028c002af75ce450b98c35e01ac130c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 07:11:44 +0100 Subject: [PATCH 140/200] chore(deps): bump maven-javadoc-plugin from 3.4.1 to 3.5.0 (#904) Bumps [maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.4.1 to 3.5.0. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.4.1...maven-javadoc-plugin-3.5.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0fe85a50d..c3cc423e6 100644 --- a/pom.xml +++ b/pom.xml @@ -183,7 +183,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.1 + 3.5.0 8 From f22a67a6953cd3b596bca20a904942827b3088b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 07:14:45 +0100 Subject: [PATCH 141/200] chore(deps): bump versions-maven-plugin from 2.14.2 to 2.15.0 (#906) Bumps [versions-maven-plugin](https://github.com/mojohaus/versions) from 2.14.2 to 2.15.0. - [Release notes](https://github.com/mojohaus/versions/releases) - [Changelog](https://github.com/mojohaus/versions/blob/master/ReleaseNotes.md) - [Commits](https://github.com/mojohaus/versions/compare/2.14.2...2.15.0) --- updated-dependencies: - dependency-name: org.codehaus.mojo:versions-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c3cc423e6..533db2374 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ org.codehaus.mojo versions-maven-plugin - 2.14.2 + 2.15.0 org.apache.maven.plugins From f7dd938762cd8bb9eef80edfdfbc32ce7a4c4c3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 07:22:12 +0100 Subject: [PATCH 142/200] chore(deps): bump maven-compiler-plugin from 3.10.1 to 3.11.0 (#907) Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.10.1 to 3.11.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.10.1...maven-compiler-plugin-3.11.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 533db2374..f054e9540 100644 --- a/pom.xml +++ b/pom.xml @@ -80,7 +80,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.10.1 + 3.11.0 1.8 1.8 From 086b8e36a31da6577a4183b154e148fc7378dc80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Mar 2023 07:00:23 +0100 Subject: [PATCH 143/200] chore(deps): bump maven-surefire-plugin from 3.0.0-M9 to 3.0.0 (#911) Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.0.0-M9 to 3.0.0. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.0.0-M9...surefire-3.0.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f054e9540..6c82221a9 100644 --- a/pom.xml +++ b/pom.xml @@ -89,7 +89,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M9 + 3.0.0 org.apache.maven.plugins From 73dfd18fd82e7aa37d41d428cbf201b6cf1fd149 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Mar 2023 07:10:53 +0200 Subject: [PATCH 144/200] chore(deps): bump maven-install-plugin from 3.1.0 to 3.1.1 (#916) Bumps [maven-install-plugin](https://github.com/apache/maven-install-plugin) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/apache/maven-install-plugin/releases) - [Commits](https://github.com/apache/maven-install-plugin/compare/maven-install-plugin-3.1.0...maven-install-plugin-3.1.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-install-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6c82221a9..d13427776 100644 --- a/pom.xml +++ b/pom.xml @@ -109,7 +109,7 @@ org.apache.maven.plugins maven-install-plugin - 3.1.0 + 3.1.1 org.apache.maven.plugins From 5d69d0580e714eeca570b1ad294122ad557b9ae7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Mar 2023 07:11:21 +0200 Subject: [PATCH 145/200] chore(deps): bump maven-release-plugin from 3.0.0-M6 to 3.0.0 (#914) Bumps [maven-release-plugin](https://github.com/apache/maven-release) from 3.0.0-M6 to 3.0.0. - [Release notes](https://github.com/apache/maven-release/releases) - [Commits](https://github.com/apache/maven-release/compare/maven-release-3.0.0-M6...maven-release-3.0.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-release-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d13427776..5687d4890 100644 --- a/pom.xml +++ b/pom.xml @@ -131,7 +131,7 @@ org.apache.maven.plugins maven-release-plugin - 3.0.0-M6 + 3.0.0 From b04459b7f40deecdef82ab375d59f4802da331f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Mar 2023 07:11:41 +0200 Subject: [PATCH 146/200] chore(deps): bump maven-deploy-plugin from 3.1.0 to 3.1.1 (#913) Bumps [maven-deploy-plugin](https://github.com/apache/maven-deploy-plugin) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/apache/maven-deploy-plugin/releases) - [Commits](https://github.com/apache/maven-deploy-plugin/compare/maven-deploy-plugin-3.1.0...maven-deploy-plugin-3.1.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-deploy-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5687d4890..7194637b4 100644 --- a/pom.xml +++ b/pom.xml @@ -104,7 +104,7 @@ org.apache.maven.plugins maven-deploy-plugin - 3.1.0 + 3.1.1 org.apache.maven.plugins From 12bd1b1e43d6b77787e3e640c5dc5bcb3ed14880 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Mar 2023 07:12:01 +0200 Subject: [PATCH 147/200] chore(deps): bump maven-resources-plugin from 3.3.0 to 3.3.1 (#912) Bumps [maven-resources-plugin](https://github.com/apache/maven-resources-plugin) from 3.3.0 to 3.3.1. - [Release notes](https://github.com/apache/maven-resources-plugin/releases) - [Commits](https://github.com/apache/maven-resources-plugin/compare/maven-resources-plugin-3.3.0...maven-resources-plugin-3.3.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-resources-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 7194637b4..19e60f00c 100644 --- a/pom.xml +++ b/pom.xml @@ -126,7 +126,7 @@ org.apache.maven.plugins maven-resources-plugin - 3.3.0 + 3.3.1 org.apache.maven.plugins @@ -333,7 +333,7 @@ maven-resources-plugin - 3.3.0 + 3.3.1 copy-resources From f1d064f6d8dc444cc9227be246f378329cee22b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Apr 2023 14:33:43 +0200 Subject: [PATCH 148/200] chore(deps): bump maven-enforcer-plugin from 3.2.1 to 3.3.0 (#920) Bumps [maven-enforcer-plugin](https://github.com/apache/maven-enforcer) from 3.2.1 to 3.3.0. - [Release notes](https://github.com/apache/maven-enforcer/releases) - [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.2.1...enforcer-3.3.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-enforcer-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 19e60f00c..fa0a0410c 100644 --- a/pom.xml +++ b/pom.xml @@ -139,7 +139,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.2.1 + 3.3.0 enforce-maven From 27eec0c7da8c32df61125e6aa90a4e728d9ed85d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Apr 2023 09:12:48 +0200 Subject: [PATCH 149/200] chore(deps): bump okhttp from 4.10.0 to 4.11.0 (#923) Bumps [okhttp](https://github.com/square/okhttp) from 4.10.0 to 4.11.0. - [Release notes](https://github.com/square/okhttp/releases) - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](https://github.com/square/okhttp/compare/parent-4.10.0...parent-4.11.0) --- updated-dependencies: - dependency-name: com.squareup.okhttp3:okhttp dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fa0a0410c..84e336582 100644 --- a/pom.xml +++ b/pom.xml @@ -315,7 +315,7 @@ com.squareup.okhttp3 okhttp - 4.10.0 + 4.11.0 com.squareup.okhttp3 From 7ba9cb9e1c85d0f220293884ee5c1d3e3c6c3b41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Apr 2023 09:13:10 +0200 Subject: [PATCH 150/200] chore(deps): bump maven-checkstyle-plugin from 3.2.1 to 3.2.2 (#924) Bumps [maven-checkstyle-plugin](https://github.com/apache/maven-checkstyle-plugin) from 3.2.1 to 3.2.2. - [Release notes](https://github.com/apache/maven-checkstyle-plugin/releases) - [Commits](https://github.com/apache/maven-checkstyle-plugin/compare/maven-checkstyle-plugin-3.2.1...maven-checkstyle-plugin-3.2.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-checkstyle-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 84e336582..46239d477 100644 --- a/pom.xml +++ b/pom.xml @@ -218,7 +218,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.2.1 + 3.2.2 com.puppycrawl.tools From 59bafab64f19f777ec78163df9c01cfb7d4531be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Apr 2023 09:13:48 +0200 Subject: [PATCH 151/200] chore(deps): bump logging-interceptor from 4.10.0 to 4.11.0 (#925) Bumps [logging-interceptor](https://github.com/square/okhttp) from 4.10.0 to 4.11.0. - [Release notes](https://github.com/square/okhttp/releases) - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](https://github.com/square/okhttp/compare/parent-4.10.0...parent-4.11.0) --- updated-dependencies: - dependency-name: com.squareup.okhttp3:logging-interceptor dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 46239d477..8daaf5896 100644 --- a/pom.xml +++ b/pom.xml @@ -320,7 +320,7 @@ com.squareup.okhttp3 logging-interceptor - 4.10.0 + 4.11.0 From ca213db4928cfbc09d92806dfc566859c32ddfab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 May 2023 08:56:58 +0200 Subject: [PATCH 152/200] chore(deps-dev): bump junit-jupiter-engine from 5.9.2 to 5.9.3 (#929) Bumps [junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.9.2 to 5.9.3. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.9.2...r5.9.3) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8daaf5896..08c830b50 100644 --- a/pom.xml +++ b/pom.xml @@ -256,7 +256,7 @@ org.junit.jupiter junit-jupiter-engine - 5.9.2 + 5.9.3 test From cd8beb19f7d4e4ad39aab25a66d31cdde45328cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 May 2023 08:57:25 +0200 Subject: [PATCH 153/200] chore(deps): bump jacoco-maven-plugin from 0.8.8 to 0.8.10 (#928) Bumps [jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.8 to 0.8.10. - [Release notes](https://github.com/jacoco/jacoco/releases) - [Commits](https://github.com/jacoco/jacoco/compare/v0.8.8...v0.8.10) --- updated-dependencies: - dependency-name: org.jacoco:jacoco-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 08c830b50..6b41ee925 100644 --- a/pom.xml +++ b/pom.xml @@ -199,7 +199,7 @@ org.jacoco jacoco-maven-plugin - 0.8.8 + 0.8.10 From 599886a6023942e00f197c7a8e3b1c9e0ea3651c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 May 2023 08:57:55 +0200 Subject: [PATCH 154/200] chore(deps-dev): bump junit-platform-runner from 1.9.2 to 1.9.3 (#926) Bumps [junit-platform-runner](https://github.com/junit-team/junit5) from 1.9.2 to 1.9.3. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/commits) --- updated-dependencies: - dependency-name: org.junit.platform:junit-platform-runner dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6b41ee925..745cdadf6 100644 --- a/pom.xml +++ b/pom.xml @@ -262,7 +262,7 @@ org.junit.platform junit-platform-runner - 1.9.2 + 1.9.3 test From 8b01672859311a8e327f044ce117e1afefefd5f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jun 2023 06:56:44 +0200 Subject: [PATCH 155/200] chore(deps): bump maven-surefire-plugin from 3.0.0 to 3.1.2 (#938) Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.0.0 to 3.1.2. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.0.0...surefire-3.1.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 745cdadf6..689690fb7 100644 --- a/pom.xml +++ b/pom.xml @@ -89,7 +89,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0 + 3.1.2 org.apache.maven.plugins From a8d1399344064ad293624c1b655be2f27b8b0399 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 07:33:38 +0200 Subject: [PATCH 156/200] chore(deps): bump versions-maven-plugin from 2.15.0 to 2.16.0 (#940) Bumps [versions-maven-plugin](https://github.com/mojohaus/versions) from 2.15.0 to 2.16.0. - [Release notes](https://github.com/mojohaus/versions/releases) - [Changelog](https://github.com/mojohaus/versions/blob/master/ReleaseNotes.md) - [Commits](https://github.com/mojohaus/versions/compare/2.15.0...2.16.0) --- updated-dependencies: - dependency-name: org.codehaus.mojo:versions-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 689690fb7..4c2fcadde 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ org.codehaus.mojo versions-maven-plugin - 2.15.0 + 2.16.0 org.apache.maven.plugins From 56dd341733203589dd750d5c127402603177202b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 07:34:22 +0200 Subject: [PATCH 157/200] chore(deps): bump maven-checkstyle-plugin from 3.2.2 to 3.3.0 (#936) Bumps [maven-checkstyle-plugin](https://github.com/apache/maven-checkstyle-plugin) from 3.2.2 to 3.3.0. - [Commits](https://github.com/apache/maven-checkstyle-plugin/compare/maven-checkstyle-plugin-3.2.2...maven-checkstyle-plugin-3.3.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-checkstyle-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4c2fcadde..28faa89ee 100644 --- a/pom.xml +++ b/pom.xml @@ -218,7 +218,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.2.2 + 3.3.0 com.puppycrawl.tools From c2dff05c34375f0ba4ae02e41687c32d233d252d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 07:34:49 +0200 Subject: [PATCH 158/200] chore(deps): bump maven-gpg-plugin from 3.0.1 to 3.1.0 (#931) Bumps [maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.0.1 to 3.1.0. - [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.0.1...maven-gpg-plugin-3.1.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-gpg-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 28faa89ee..7a68ae5e4 100644 --- a/pom.xml +++ b/pom.xml @@ -390,7 +390,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.0.1 + 3.1.0 sign-artifacts From 305bbeb84d6c5f3f17009a9d95d9e846c5c0472a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jul 2023 07:22:56 +0200 Subject: [PATCH 159/200] chore(deps): bump maven-release-plugin from 3.0.0 to 3.0.1 (#943) Bumps [maven-release-plugin](https://github.com/apache/maven-release) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/apache/maven-release/releases) - [Commits](https://github.com/apache/maven-release/compare/maven-release-3.0.0...maven-release-3.0.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-release-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7a68ae5e4..b8de77368 100644 --- a/pom.xml +++ b/pom.xml @@ -131,7 +131,7 @@ org.apache.maven.plugins maven-release-plugin - 3.0.0 + 3.0.1 From efcf9ab496609a385a9b6bee962dcb3d414f3996 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jul 2023 07:23:23 +0200 Subject: [PATCH 160/200] chore(deps): bump maven-clean-plugin from 3.2.0 to 3.3.1 (#942) Bumps [maven-clean-plugin](https://github.com/apache/maven-clean-plugin) from 3.2.0 to 3.3.1. - [Release notes](https://github.com/apache/maven-clean-plugin/releases) - [Commits](https://github.com/apache/maven-clean-plugin/compare/maven-clean-plugin-3.2.0...maven-clean-plugin-3.3.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-clean-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b8de77368..34ae8aea8 100644 --- a/pom.xml +++ b/pom.xml @@ -99,7 +99,7 @@ org.apache.maven.plugins maven-clean-plugin - 3.2.0 + 3.3.1 org.apache.maven.plugins From eb31d7be70b6ae80e12103a8db96979aedbd40e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 07:36:29 +0200 Subject: [PATCH 161/200] chore(deps): bump msgpack-core from 0.9.3 to 0.9.4 (#944) Bumps [msgpack-core](https://github.com/msgpack/msgpack-java) from 0.9.3 to 0.9.4. - [Release notes](https://github.com/msgpack/msgpack-java/releases) - [Changelog](https://github.com/msgpack/msgpack-java/blob/develop/RELEASE_NOTES.md) - [Commits](https://github.com/msgpack/msgpack-java/compare/v0.9.3...v0.9.4) --- updated-dependencies: - dependency-name: org.msgpack:msgpack-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 34ae8aea8..f750b59dd 100644 --- a/pom.xml +++ b/pom.xml @@ -308,7 +308,7 @@ org.msgpack msgpack-core - 0.9.3 + 0.9.4 From 21baacfeb87b0f23bbbf34fe7d5c3b5d0a488876 Mon Sep 17 00:00:00 2001 From: Jamie Strandboge Date: Tue, 18 Jul 2023 16:36:05 -0500 Subject: [PATCH 162/200] chore: update README.md based on feedback from Product (#945) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ab8e1fdde..74f6a5ba1 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ This is the official (and community-maintained) Java client library for [InfluxDB](https://www.influxdata.com/products/influxdb-overview/) (1.x), the open source time series database that is part of the TICK (Telegraf, InfluxDB, Chronograf, Kapacitor) stack. +For InfluxDB 3.0 users, this library is succeeded by the lightweight [v3 client library](https://github.com/InfluxCommunity/influxdb3-java). + _Note: This library is for use with InfluxDB 1.x and [2.x compatibility API](https://docs.influxdata.com/influxdb/v2.0/reference/api/influxdb-1x/). For full supports of InfluxDB 2.x features, please use the [influxdb-client-java](https://github.com/influxdata/influxdb-client-java) client._ ## Adding the library to your project From 52b53f48f8a11eb5b2e4d070669a719e565be141 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Aug 2023 06:51:19 +0200 Subject: [PATCH 163/200] chore(deps): bump org.apache.maven.plugins:maven-enforcer-plugin (#950) Bumps [org.apache.maven.plugins:maven-enforcer-plugin](https://github.com/apache/maven-enforcer) from 3.3.0 to 3.4.0. - [Release notes](https://github.com/apache/maven-enforcer/releases) - [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.3.0...enforcer-3.4.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-enforcer-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f750b59dd..a6770b0de 100644 --- a/pom.xml +++ b/pom.xml @@ -139,7 +139,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.3.0 + 3.4.0 enforce-maven From b1d1d8a2ed4430f6b6ac271362acab7b493be984 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Aug 2023 06:52:14 +0200 Subject: [PATCH 164/200] chore(deps): bump org.msgpack:msgpack-core from 0.9.4 to 0.9.5 (#949) Bumps [org.msgpack:msgpack-core](https://github.com/msgpack/msgpack-java) from 0.9.4 to 0.9.5. - [Release notes](https://github.com/msgpack/msgpack-java/releases) - [Changelog](https://github.com/msgpack/msgpack-java/blob/develop/RELEASE_NOTES.md) - [Commits](https://github.com/msgpack/msgpack-java/compare/v0.9.4...v0.9.5) --- updated-dependencies: - dependency-name: org.msgpack:msgpack-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a6770b0de..59ea3351b 100644 --- a/pom.xml +++ b/pom.xml @@ -308,7 +308,7 @@ org.msgpack msgpack-core - 0.9.4 + 0.9.5 From abc3f41c02f4999c1d9973fa59b9f1b2dd456ccb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 07:16:10 +0100 Subject: [PATCH 165/200] chore(deps): bump org.codehaus.mojo:versions-maven-plugin (#963) Bumps [org.codehaus.mojo:versions-maven-plugin](https://github.com/mojohaus/versions) from 2.16.0 to 2.16.2. - [Release notes](https://github.com/mojohaus/versions/releases) - [Changelog](https://github.com/mojohaus/versions/blob/master/ReleaseNotes.md) - [Commits](https://github.com/mojohaus/versions/compare/2.16.0...2.16.2) --- updated-dependencies: - dependency-name: org.codehaus.mojo:versions-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 59ea3351b..84ea8497d 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ org.codehaus.mojo versions-maven-plugin - 2.16.0 + 2.16.2 org.apache.maven.plugins From 08e6d1000a497a84edf8c65d36fba8ab3019012a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 07:16:37 +0100 Subject: [PATCH 166/200] chore(deps): bump org.apache.maven.plugins:maven-javadoc-plugin (#961) Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.5.0 to 3.6.2. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.5.0...maven-javadoc-plugin-3.6.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 84ea8497d..351fac5e8 100644 --- a/pom.xml +++ b/pom.xml @@ -183,7 +183,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.5.0 + 3.6.2 8 From e9ae27bfef433292d4bdde8ab567ddc89d96f0e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 07:17:08 +0100 Subject: [PATCH 167/200] chore(deps): bump org.msgpack:msgpack-core from 0.9.5 to 0.9.6 (#956) Bumps [org.msgpack:msgpack-core](https://github.com/msgpack/msgpack-java) from 0.9.5 to 0.9.6. - [Release notes](https://github.com/msgpack/msgpack-java/releases) - [Changelog](https://github.com/msgpack/msgpack-java/blob/main/RELEASE_NOTES.md) - [Commits](https://github.com/msgpack/msgpack-java/compare/v0.9.5...v0.9.6) --- updated-dependencies: - dependency-name: org.msgpack:msgpack-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 351fac5e8..d15fbb132 100644 --- a/pom.xml +++ b/pom.xml @@ -308,7 +308,7 @@ org.msgpack msgpack-core - 0.9.5 + 0.9.6 From 14c85772fc10c39966fd6811948d6d28c74c8978 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 07:17:33 +0100 Subject: [PATCH 168/200] chore(deps): bump org.apache.maven.plugins:maven-enforcer-plugin (#954) Bumps [org.apache.maven.plugins:maven-enforcer-plugin](https://github.com/apache/maven-enforcer) from 3.4.0 to 3.4.1. - [Release notes](https://github.com/apache/maven-enforcer/releases) - [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.4.0...enforcer-3.4.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-enforcer-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d15fbb132..28bc8ea80 100644 --- a/pom.xml +++ b/pom.xml @@ -139,7 +139,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.4.0 + 3.4.1 enforce-maven From 66589bd5bf8dc2832914132afc2b2f8cfb9d8d23 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 07:11:12 +0100 Subject: [PATCH 169/200] chore(deps): bump com.squareup.okhttp3:okhttp from 4.11.0 to 4.12.0 (#969) Bumps [com.squareup.okhttp3:okhttp](https://github.com/square/okhttp) from 4.11.0 to 4.12.0. - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](https://github.com/square/okhttp/compare/parent-4.11.0...parent-4.12.0) --- updated-dependencies: - dependency-name: com.squareup.okhttp3:okhttp dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 28bc8ea80..d16de744f 100644 --- a/pom.xml +++ b/pom.xml @@ -315,7 +315,7 @@ com.squareup.okhttp3 okhttp - 4.11.0 + 4.12.0 com.squareup.okhttp3 From d96f2f65d5a4235e212edf39ab0c7b7bf3a75106 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 07:11:43 +0100 Subject: [PATCH 170/200] chore(deps): bump org.apache.maven.plugins:maven-clean-plugin (#968) Bumps [org.apache.maven.plugins:maven-clean-plugin](https://github.com/apache/maven-clean-plugin) from 3.3.1 to 3.3.2. - [Release notes](https://github.com/apache/maven-clean-plugin/releases) - [Commits](https://github.com/apache/maven-clean-plugin/compare/maven-clean-plugin-3.3.1...maven-clean-plugin-3.3.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-clean-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d16de744f..57eee3949 100644 --- a/pom.xml +++ b/pom.xml @@ -99,7 +99,7 @@ org.apache.maven.plugins maven-clean-plugin - 3.3.1 + 3.3.2 org.apache.maven.plugins From d7052c5a5017ca84f25b70a9b30113ca35395bac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 07:12:04 +0100 Subject: [PATCH 171/200] chore(deps): bump com.squareup.okhttp3:logging-interceptor (#967) Bumps [com.squareup.okhttp3:logging-interceptor](https://github.com/square/okhttp) from 4.11.0 to 4.12.0. - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](https://github.com/square/okhttp/compare/parent-4.11.0...parent-4.12.0) --- updated-dependencies: - dependency-name: com.squareup.okhttp3:logging-interceptor dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 57eee3949..516d50816 100644 --- a/pom.xml +++ b/pom.xml @@ -320,7 +320,7 @@ com.squareup.okhttp3 logging-interceptor - 4.11.0 + 4.12.0 From d3a7bbcce9a5bfaf17ee0c93fb46d8d4fe027631 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 07:12:30 +0100 Subject: [PATCH 172/200] chore(deps): bump org.apache.maven.plugins:maven-surefire-plugin (#966) Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.1.2 to 3.2.2. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.1.2...surefire-3.2.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 516d50816..70c238cfd 100644 --- a/pom.xml +++ b/pom.xml @@ -89,7 +89,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.1.2 + 3.2.2 org.apache.maven.plugins From ba9bfebf2a24672b48827660ece79b45fbefe8bd Mon Sep 17 00:00:00 2001 From: Eran Leshem <1707552+eranl@users.noreply.github.com> Date: Sat, 2 Dec 2023 19:18:04 +0200 Subject: [PATCH 173/200] Default column name to pojo field name, and add `allFields` mode to `Measurement` annotation (#972) --- MANUAL.md | 29 +++- .../java/org/influxdb/annotation/Column.java | 5 +- .../java/org/influxdb/annotation/Exclude.java | 38 +++++ .../org/influxdb/annotation/Measurement.java | 7 + src/main/java/org/influxdb/dto/Point.java | 44 ++++-- .../influxdb/impl/InfluxDBResultMapper.java | 56 ++++--- src/test/java/org/influxdb/dto/PointTest.java | 141 ++++++++++++++++-- .../impl/InfluxDBResultMapperTest.java | 56 +++++-- 8 files changed, 309 insertions(+), 67 deletions(-) create mode 100644 src/main/java/org/influxdb/annotation/Exclude.java diff --git a/MANUAL.md b/MANUAL.md index 62d45d67a..18040aeab 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -323,21 +323,40 @@ public class Cpu { } ``` -2. Add @Measurement,@TimeColumn and @Column annotations: +2. Add @Measurement,@TimeColumn and @Column annotations (column names default to field names unless otherwise specified): ```Java @Measurement(name = "cpu") public class Cpu { @TimeColumn - @Column(name = "time") + @Column private Instant time; @Column(name = "host", tag = true) private String hostname; - @Column(name = "region", tag = true) + @Column(tag = true) + private String region; + @Column + private Double idle; + @Column + private Boolean happydevop; + @Column(name = "uptimesecs") + private Long uptimeSecs; + // getters (and setters if you need) +} +``` + +Alternatively, you can use: + +```Java +@Measurement(name = "cpu", allFields = true) +public class Cpu { + @TimeColumn + private Instant time; + @Column(name = "host", tag = true) + private String hostname; + @Column(tag = true) private String region; - @Column(name = "idle") private Double idle; - @Column(name = "happydevop") private Boolean happydevop; @Column(name = "uptimesecs") private Long uptimeSecs; diff --git a/src/main/java/org/influxdb/annotation/Column.java b/src/main/java/org/influxdb/annotation/Column.java index cde2fbe50..6edb256f8 100644 --- a/src/main/java/org/influxdb/annotation/Column.java +++ b/src/main/java/org/influxdb/annotation/Column.java @@ -32,7 +32,10 @@ @Target(ElementType.FIELD) public @interface Column { - String name(); + /** + * If unset, the annotated field's name will be used as the column name. + */ + String name() default ""; boolean tag() default false; } diff --git a/src/main/java/org/influxdb/annotation/Exclude.java b/src/main/java/org/influxdb/annotation/Exclude.java new file mode 100644 index 000000000..01e6f52e6 --- /dev/null +++ b/src/main/java/org/influxdb/annotation/Exclude.java @@ -0,0 +1,38 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2017 azeti Networks AG () + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + * associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT + * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +package org.influxdb.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * When a POJO annotated with {@code @Measurement(allFields = true)} is loaded or saved, + * this annotation can be used to exclude some of its fields. + * @see Measurement#allFields() + * + * @author Eran Leshem + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface Exclude { +} diff --git a/src/main/java/org/influxdb/annotation/Measurement.java b/src/main/java/org/influxdb/annotation/Measurement.java index a834bfbae..fa9d19fd5 100644 --- a/src/main/java/org/influxdb/annotation/Measurement.java +++ b/src/main/java/org/influxdb/annotation/Measurement.java @@ -40,4 +40,11 @@ String retentionPolicy() default "autogen"; TimeUnit timeUnit() default TimeUnit.MILLISECONDS; + + /** + * If {@code true}, then all non-static fields of this measurement will be loaded or saved, + * regardless of any {@code @Column} annotations. + * @see Exclude + */ + boolean allFields() default false; } diff --git a/src/main/java/org/influxdb/dto/Point.java b/src/main/java/org/influxdb/dto/Point.java index 96069026c..b8cc9e2e6 100755 --- a/src/main/java/org/influxdb/dto/Point.java +++ b/src/main/java/org/influxdb/dto/Point.java @@ -1,7 +1,15 @@ package org.influxdb.dto; +import org.influxdb.BuilderException; +import org.influxdb.annotation.Column; +import org.influxdb.annotation.Exclude; +import org.influxdb.annotation.Measurement; +import org.influxdb.annotation.TimeColumn; +import org.influxdb.impl.Preconditions; + import java.lang.annotation.Annotation; import java.lang.reflect.Field; +import java.lang.reflect.Modifier; import java.math.BigDecimal; import java.math.BigInteger; import java.math.RoundingMode; @@ -11,14 +19,9 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Objects; -import java.util.TreeMap; import java.util.Optional; +import java.util.TreeMap; import java.util.concurrent.TimeUnit; -import org.influxdb.BuilderException; -import org.influxdb.annotation.Column; -import org.influxdb.annotation.Measurement; -import org.influxdb.annotation.TimeColumn; -import org.influxdb.impl.Preconditions; /** * Representation of a InfluxDB database Point. @@ -276,23 +279,34 @@ public boolean hasFields() { */ public Builder addFieldsFromPOJO(final Object pojo) { - Class clazz = pojo.getClass(); + Class clazz = pojo.getClass(); + Measurement measurement = clazz.getAnnotation(Measurement.class); + boolean allFields = measurement != null && measurement.allFields(); + while (clazz != null) { for (Field field : clazz.getDeclaredFields()) { Column column = field.getAnnotation(Column.class); - if (column == null) { + if (column == null && !(allFields + && !field.isAnnotationPresent(Exclude.class) && !Modifier.isStatic(field.getModifiers()))) { continue; } field.setAccessible(true); - String fieldName = column.name(); - addFieldByAttribute(pojo, field, column, fieldName); + + String fieldName; + if (column != null && !column.name().isEmpty()) { + fieldName = column.name(); + } else { + fieldName = field.getName(); + } + + addFieldByAttribute(pojo, field, column != null && column.tag(), fieldName); } - clazz = clazz.getSuperclass(); - } + clazz = clazz.getSuperclass(); + } if (this.fields.isEmpty()) { throw new BuilderException("Class " + pojo.getClass().getName() @@ -302,8 +316,8 @@ public Builder addFieldsFromPOJO(final Object pojo) { return this; } - private void addFieldByAttribute(final Object pojo, final Field field, final Column column, - final String fieldName) { + private void addFieldByAttribute(final Object pojo, final Field field, final boolean tag, + final String fieldName) { try { Object fieldValue = field.get(pojo); @@ -325,7 +339,7 @@ private void addFieldByAttribute(final Object pojo, final Field field, final Col return; } - if (column.tag()) { + if (tag) { if (fieldValue != null) { this.tags.put(fieldName, (String) fieldValue); } diff --git a/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java b/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java index d6edef17c..15d4c283a 100644 --- a/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java +++ b/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java @@ -20,7 +20,14 @@ */ package org.influxdb.impl; +import org.influxdb.InfluxDBMapperException; +import org.influxdb.annotation.Column; +import org.influxdb.annotation.Exclude; +import org.influxdb.annotation.Measurement; +import org.influxdb.dto.QueryResult; + import java.lang.reflect.Field; +import java.lang.reflect.Modifier; import java.time.Instant; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; @@ -33,11 +40,6 @@ import java.util.concurrent.ConcurrentMap; import java.util.concurrent.TimeUnit; -import org.influxdb.InfluxDBMapperException; -import org.influxdb.annotation.Column; -import org.influxdb.annotation.Measurement; -import org.influxdb.dto.QueryResult; - /** * Main class responsible for mapping a QueryResult to a POJO. * @@ -213,13 +215,19 @@ void cacheMeasurementClass(final Class... classVarAgrs) { } ConcurrentMap influxColumnAndFieldMap = new ConcurrentHashMap<>(); + Measurement measurement = clazz.getAnnotation(Measurement.class); + boolean allFields = measurement != null && measurement.allFields(); + Class c = clazz; while (c != null) { for (Field field : c.getDeclaredFields()) { Column colAnnotation = field.getAnnotation(Column.class); - if (colAnnotation != null) { - influxColumnAndFieldMap.put(colAnnotation.name(), field); + if (colAnnotation == null && !(allFields + && !field.isAnnotationPresent(Exclude.class) && !Modifier.isStatic(field.getModifiers()))) { + continue; } + + influxColumnAndFieldMap.put(getFieldName(field, colAnnotation), field); } c = c.getSuperclass(); } @@ -227,6 +235,14 @@ void cacheMeasurementClass(final Class... classVarAgrs) { } } + private static String getFieldName(final Field field, final Column colAnnotation) { + if (colAnnotation != null && !colAnnotation.name().isEmpty()) { + return colAnnotation.name(); + } + + return field.getName(); + } + String getMeasurementName(final Class clazz) { return ((Measurement) clazz.getAnnotation(Measurement.class)).name(); } @@ -289,17 +305,11 @@ List parseSeriesAs(final QueryResult.Series series, final Class clazz, /** * InfluxDB client returns any number as Double. - * See https://github.com/influxdata/influxdb-java/issues/153#issuecomment-259681987 + * See ... * for more information. * - * @param object - * @param field - * @param value - * @param precision - * @throws IllegalArgumentException - * @throws IllegalAccessException */ - void setFieldValue(final T object, final Field field, final Object value, final TimeUnit precision) + private static void setFieldValue(final T object, final Field field, final Object value, final TimeUnit precision) throws IllegalArgumentException, IllegalAccessException { if (value == null) { return; @@ -325,8 +335,8 @@ void setFieldValue(final T object, final Field field, final Object value, fi } } - boolean fieldValueModified(final Class fieldType, final Field field, final T object, final Object value, - final TimeUnit precision) + static boolean fieldValueModified(final Class fieldType, final Field field, final T object, final Object value, + final TimeUnit precision) throws IllegalArgumentException, IllegalAccessException { if (String.class.isAssignableFrom(fieldType)) { field.set(object, String.valueOf(value)); @@ -351,8 +361,9 @@ boolean fieldValueModified(final Class fieldType, final Field field, fina return false; } - boolean fieldValueForPrimitivesModified(final Class fieldType, final Field field, final T object, - final Object value) throws IllegalArgumentException, IllegalAccessException { + static boolean fieldValueForPrimitivesModified(final Class fieldType, final Field field, final T object, + final Object value) + throws IllegalArgumentException, IllegalAccessException { if (double.class.isAssignableFrom(fieldType)) { field.setDouble(object, ((Double) value).doubleValue()); return true; @@ -372,8 +383,9 @@ boolean fieldValueForPrimitivesModified(final Class fieldType, final Fiel return false; } - boolean fieldValueForPrimitiveWrappersModified(final Class fieldType, final Field field, final T object, - final Object value) throws IllegalArgumentException, IllegalAccessException { + static boolean fieldValueForPrimitiveWrappersModified(final Class fieldType, final Field field, final T object, + final Object value) + throws IllegalArgumentException, IllegalAccessException { if (Double.class.isAssignableFrom(fieldType)) { field.set(object, value); return true; @@ -393,7 +405,7 @@ boolean fieldValueForPrimitiveWrappersModified(final Class fieldType, fin return false; } - private Long toMillis(final long value, final TimeUnit precision) { + private static Long toMillis(final long value, final TimeUnit precision) { return TimeUnit.MILLISECONDS.convert(value, precision); } diff --git a/src/test/java/org/influxdb/dto/PointTest.java b/src/test/java/org/influxdb/dto/PointTest.java index a49454177..c315aad23 100755 --- a/src/test/java/org/influxdb/dto/PointTest.java +++ b/src/test/java/org/influxdb/dto/PointTest.java @@ -1,7 +1,17 @@ package org.influxdb.dto; -import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.Mockito.mock; +import org.influxdb.BuilderException; +import org.influxdb.InfluxDB; +import org.influxdb.annotation.Column; +import org.influxdb.annotation.Measurement; +import org.influxdb.annotation.TimeColumn; +import org.influxdb.impl.InfluxDBImpl; +import org.junit.Assert; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.platform.runner.JUnitPlatform; +import org.junit.runner.RunWith; +import org.mockito.Mockito; import java.lang.reflect.Field; import java.math.BigDecimal; @@ -16,18 +26,8 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import org.influxdb.BuilderException; -import org.influxdb.InfluxDB; -import org.influxdb.annotation.Column; -import org.influxdb.annotation.Measurement; -import org.influxdb.annotation.TimeColumn; -import org.influxdb.impl.InfluxDBImpl; -import org.junit.Assert; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.platform.runner.JUnitPlatform; -import org.junit.runner.RunWith; -import org.mockito.Mockito; +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.mock; /** * Test for the Point DTO. @@ -794,6 +794,63 @@ public void testAddFieldsFromPOJOWithPublicAttributes() { Assertions.assertEquals(pojo.uuid, p.getTags().get("uuid")); } + @Test + public void testAddFieldsFromPojoWithAllFieldsAnnotation() { + + PojoWithAllFieldsAnnotation pojo = new PojoWithAllFieldsAnnotation(); + pojo.booleanObject = true; + pojo.booleanPrimitive = false; + pojo.doubleObject = 2.0; + pojo.doublePrimitive = 3.1; + pojo.integerObject = 32; + pojo.integerPrimitive = 64; + pojo.longObject = 1L; + pojo.longPrimitive = 2L; + pojo.time = Instant.now(); + pojo.uuid = "TEST"; + + Point p = Point.measurementByPOJO(PojoWithAllFieldsAnnotation.class).addFieldsFromPOJO(pojo).build(); + + assertThat(p.lineProtocol()).startsWith("mymeasurement"); + assertThat(p.getFields()).doesNotContainKey("staticField"); + Assertions.assertEquals(pojo.booleanObject, p.getFields().get("booleanObject")); + Assertions.assertEquals(pojo.booleanPrimitive, p.getFields().get("booleanPrimitive")); + Assertions.assertEquals(pojo.doubleObject, p.getFields().get("doubleObject")); + Assertions.assertEquals(pojo.doublePrimitive, p.getFields().get("doublePrimitive")); + Assertions.assertEquals(pojo.integerObject, p.getFields().get("integerObject")); + Assertions.assertEquals(pojo.integerPrimitive, p.getFields().get("integerPrimitive")); + Assertions.assertEquals(pojo.longObject, p.getFields().get("longObject")); + Assertions.assertEquals(pojo.longPrimitive, p.getFields().get("longPrimitive")); + Assertions.assertEquals(pojo.uuid, p.getTags().get("uuid")); + } + + @Test + public void testAddFieldsFromPojoWithBlankColumnAnnotations() { + PojoWithBlankColumnAnnotations pojo = new PojoWithBlankColumnAnnotations(); + pojo.booleanObject = true; + pojo.booleanPrimitive = false; + pojo.doubleObject = 2.0; + pojo.doublePrimitive = 3.1; + pojo.integerObject = 32; + pojo.integerPrimitive = 64; + pojo.longObject = 1L; + pojo.longPrimitive = 2L; + pojo.time = Instant.now(); + pojo.uuid = "TEST"; + + Point p = Point.measurementByPOJO(PojoWithBlankColumnAnnotations.class).addFieldsFromPOJO(pojo).build(); + + Assertions.assertEquals(pojo.booleanObject, p.getFields().get("booleanObject")); + Assertions.assertEquals(pojo.booleanPrimitive, p.getFields().get("booleanPrimitive")); + Assertions.assertEquals(pojo.doubleObject, p.getFields().get("doubleObject")); + Assertions.assertEquals(pojo.doublePrimitive, p.getFields().get("doublePrimitive")); + Assertions.assertEquals(pojo.integerObject, p.getFields().get("integerObject")); + Assertions.assertEquals(pojo.integerPrimitive, p.getFields().get("integerPrimitive")); + Assertions.assertEquals(pojo.longObject, p.getFields().get("longObject")); + Assertions.assertEquals(pojo.longPrimitive, p.getFields().get("longPrimitive")); + Assertions.assertEquals(pojo.uuid, p.getTags().get("uuid")); + } + @Test public void testInheritMeasurement() { Point expected = Point.measurementByPOJO(SubClassMeasurement.class) @@ -1007,6 +1064,62 @@ static class PojoWithPublicAttributes { public Boolean booleanObject; } + @Measurement(name = "mymeasurement", allFields = true) + static class PojoWithAllFieldsAnnotation { + public static final String staticField = "static"; + + public boolean booleanPrimitive; + + @TimeColumn + public Instant time; + + @Column(tag = true) + public String uuid; + + public Double doubleObject; + public Long longObject; + public Integer integerObject; + public double doublePrimitive; + public long longPrimitive; + public int integerPrimitive; + public Boolean booleanObject; + } + + @Measurement(name = "mymeasurement") + static class PojoWithBlankColumnAnnotations { + + @Column + public boolean booleanPrimitive; + + @Column + @TimeColumn + public Instant time; + + @Column(tag = true) + public String uuid; + + @Column + public Double doubleObject; + + @Column + public Long longObject; + + @Column + public Integer integerObject; + + @Column + public double doublePrimitive; + + @Column + public long longPrimitive; + + @Column + public int integerPrimitive; + + @Column + public Boolean booleanObject; + } + @Measurement(name = "SuperMeasuremet") static class SuperMeasurement { @Column(name = "superClassField") diff --git a/src/test/java/org/influxdb/impl/InfluxDBResultMapperTest.java b/src/test/java/org/influxdb/impl/InfluxDBResultMapperTest.java index f4eee0ba2..d93c4d305 100644 --- a/src/test/java/org/influxdb/impl/InfluxDBResultMapperTest.java +++ b/src/test/java/org/influxdb/impl/InfluxDBResultMapperTest.java @@ -20,6 +20,17 @@ */ package org.influxdb.impl; +import org.influxdb.InfluxDBMapperException; +import org.influxdb.annotation.Column; +import org.influxdb.annotation.Exclude; +import org.influxdb.annotation.Measurement; +import org.influxdb.annotation.TimeColumn; +import org.influxdb.dto.QueryResult; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.platform.runner.JUnitPlatform; +import org.junit.runner.RunWith; + import java.time.Instant; import java.util.Arrays; import java.util.Date; @@ -31,16 +42,6 @@ import java.util.UUID; import java.util.concurrent.TimeUnit; -import org.influxdb.InfluxDBMapperException; -import org.influxdb.annotation.Column; -import org.influxdb.annotation.Measurement; -import org.influxdb.annotation.TimeColumn; -import org.influxdb.dto.QueryResult; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.platform.runner.JUnitPlatform; -import org.junit.runner.RunWith; - /** * @author fmachado */ @@ -71,6 +72,12 @@ public void testToPOJO_HappyPath() { // Then... Assertions.assertEquals(1, myList.size(), "there must be one entry in the result list"); + + //When... + List myList1 = mapper.toPOJO(queryResult, MyAllFieldsCustomMeasurement.class); + + // Then... + Assertions.assertEquals(1, myList1.size(), "there must be one entry in the result list"); } @Test @@ -578,6 +585,35 @@ public String toString() { } } + @Measurement(name = "CustomMeasurement", allFields = true) + static class MyAllFieldsCustomMeasurement { + private Instant time; + private String uuid; + private Double doubleObject; + private Long longObject; + private Integer integerObject; + private double doublePrimitive; + private long longPrimitive; + private int integerPrimitive; + private Boolean booleanObject; + private boolean booleanPrimitive; + + @SuppressWarnings("unused") + @Exclude + private String nonColumn1; + + @SuppressWarnings("unused") + @Exclude + private Random rnd; + + @Override + public String toString() { + return "MyCustomMeasurement [time=" + time + ", uuid=" + uuid + ", doubleObject=" + doubleObject + ", longObject=" + longObject + + ", integerObject=" + integerObject + ", doublePrimitive=" + doublePrimitive + ", longPrimitive=" + longPrimitive + + ", integerPrimitive=" + integerPrimitive + ", booleanObject=" + booleanObject + ", booleanPrimitive=" + booleanPrimitive + "]"; + } + } + @Measurement(name = "SuperMeasurement") static class MySuperMeasurement { From e5518beba598381095ceda3d8cc062c7dda59c45 Mon Sep 17 00:00:00 2001 From: Eran Leshem <1707552+eranl@users.noreply.github.com> Date: Sun, 3 Dec 2023 09:22:02 +0200 Subject: [PATCH 174/200] Fix time column with precision > ms (#973) --- src/main/java/org/influxdb/dto/Point.java | 3 +-- src/test/java/org/influxdb/dto/PointTest.java | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/influxdb/dto/Point.java b/src/main/java/org/influxdb/dto/Point.java index b8cc9e2e6..d7eb0396a 100755 --- a/src/main/java/org/influxdb/dto/Point.java +++ b/src/main/java/org/influxdb/dto/Point.java @@ -331,8 +331,7 @@ private void addFieldByAttribute(final Object pojo, final Field field, final boo .add(BigInteger.valueOf(instant.getNano())) .divide(BigInteger.valueOf(TimeUnit.NANOSECONDS.convert(1, timeUnit))); } else { - this.time = TimeUnit.MILLISECONDS.convert(instant.toEpochMilli(), timeUnit); - this.precision = timeUnit; + this.time = timeUnit.convert(instant.toEpochMilli(), TimeUnit.MILLISECONDS); } this.precision = timeUnit; }); diff --git a/src/test/java/org/influxdb/dto/PointTest.java b/src/test/java/org/influxdb/dto/PointTest.java index c315aad23..b59440c64 100755 --- a/src/test/java/org/influxdb/dto/PointTest.java +++ b/src/test/java/org/influxdb/dto/PointTest.java @@ -695,6 +695,23 @@ public void testAddFieldsFromPOJOWithTimeColumnNanoseconds() throws NoSuchFieldE pojo.time = null; } + @Test + public void testAddFieldsFromPOJOWithTimeColumnSeconds() throws NoSuchFieldException, IllegalAccessException { + TimeColumnPojoSec pojo = new TimeColumnPojoSec(); + pojo.time = Instant.now().plusSeconds(132L).plus(365L * 12000, ChronoUnit.DAYS); + pojo.booleanPrimitive = true; + + Point p = Point.measurementByPOJO(pojo.getClass()).addFieldsFromPOJO(pojo).build(); + Field timeField = p.getClass().getDeclaredField("time"); + Field precisionField = p.getClass().getDeclaredField("precision"); + timeField.setAccessible(true); + precisionField.setAccessible(true); + + Assertions.assertEquals(pojo.booleanPrimitive, p.getFields().get("booleanPrimitive")); + Assertions.assertEquals(TimeUnit.SECONDS, precisionField.get(p)); + Assertions.assertEquals(pojo.time.getEpochSecond(), timeField.get(p)); + } + @Test public void testAddFieldsFromPOJOWithTimeColumnNull() throws NoSuchFieldException, IllegalAccessException { TimeColumnPojo pojo = new TimeColumnPojo(); @@ -914,6 +931,14 @@ static class TimeColumnPojoNano { private Instant time; } + @Measurement(name = "tcmeasurement", allFields = true) + static class TimeColumnPojoSec { + boolean booleanPrimitive; + + @TimeColumn(timeUnit = TimeUnit.SECONDS) + Instant time; + } + @Measurement(name = "mymeasurement") static class Pojo { From 3c4064b95a77aed92352535640a516808b4ade0d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 06:51:45 +0100 Subject: [PATCH 175/200] chore(deps): bump org.jacoco:jacoco-maven-plugin from 0.8.10 to 0.8.11 (#978) Bumps [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.10 to 0.8.11. - [Release notes](https://github.com/jacoco/jacoco/releases) - [Commits](https://github.com/jacoco/jacoco/compare/v0.8.10...v0.8.11) --- updated-dependencies: - dependency-name: org.jacoco:jacoco-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 70c238cfd..36785586a 100644 --- a/pom.xml +++ b/pom.xml @@ -199,7 +199,7 @@ org.jacoco jacoco-maven-plugin - 0.8.10 + 0.8.11 From 5f066d1b5b835685d38db0865fbcb1be540f50f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 06:52:24 +0100 Subject: [PATCH 176/200] chore(deps): bump org.apache.maven.plugins:maven-javadoc-plugin (#975) Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.6.2 to 3.6.3. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.6.2...maven-javadoc-plugin-3.6.3) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 36785586a..1ee9a1a96 100644 --- a/pom.xml +++ b/pom.xml @@ -183,7 +183,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.6.2 + 3.6.3 8 From d6971437003ea9e9a883bfd328e5e317b2bbc702 Mon Sep 17 00:00:00 2001 From: Eran Leshem <1707552+eranl@users.noreply.github.com> Date: Mon, 4 Dec 2023 07:54:23 +0200 Subject: [PATCH 177/200] Throw if a non-Instant field is annotated with @TimeColumn (#974) --- src/main/java/org/influxdb/dto/Point.java | 34 +++++++++++-------- src/test/java/org/influxdb/dto/PointTest.java | 16 +++++++++ 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/src/main/java/org/influxdb/dto/Point.java b/src/main/java/org/influxdb/dto/Point.java index d7eb0396a..c503a30e7 100755 --- a/src/main/java/org/influxdb/dto/Point.java +++ b/src/main/java/org/influxdb/dto/Point.java @@ -1,6 +1,7 @@ package org.influxdb.dto; import org.influxdb.BuilderException; +import org.influxdb.InfluxDBMapperException; import org.influxdb.annotation.Column; import org.influxdb.annotation.Exclude; import org.influxdb.annotation.Measurement; @@ -322,20 +323,25 @@ private void addFieldByAttribute(final Object pojo, final Field field, final boo Object fieldValue = field.get(pojo); TimeColumn tc = field.getAnnotation(TimeColumn.class); - if (tc != null && Instant.class.isAssignableFrom(field.getType())) { - Optional.ofNullable((Instant) fieldValue).ifPresent(instant -> { - TimeUnit timeUnit = tc.timeUnit(); - if (timeUnit == TimeUnit.NANOSECONDS || timeUnit == TimeUnit.MICROSECONDS) { - this.time = BigInteger.valueOf(instant.getEpochSecond()) - .multiply(NANOSECONDS_PER_SECOND) - .add(BigInteger.valueOf(instant.getNano())) - .divide(BigInteger.valueOf(TimeUnit.NANOSECONDS.convert(1, timeUnit))); - } else { - this.time = timeUnit.convert(instant.toEpochMilli(), TimeUnit.MILLISECONDS); - } - this.precision = timeUnit; - }); - return; + if (tc != null) { + if (Instant.class.isAssignableFrom(field.getType())) { + Optional.ofNullable((Instant) fieldValue).ifPresent(instant -> { + TimeUnit timeUnit = tc.timeUnit(); + if (timeUnit == TimeUnit.NANOSECONDS || timeUnit == TimeUnit.MICROSECONDS) { + this.time = BigInteger.valueOf(instant.getEpochSecond()) + .multiply(NANOSECONDS_PER_SECOND) + .add(BigInteger.valueOf(instant.getNano())) + .divide(BigInteger.valueOf(TimeUnit.NANOSECONDS.convert(1, timeUnit))); + } else { + this.time = timeUnit.convert(instant.toEpochMilli(), TimeUnit.MILLISECONDS); + } + this.precision = timeUnit; + }); + return; + } + + throw new InfluxDBMapperException( + "Unsupported type " + field.getType() + " for time: should be of Instant type"); } if (tag) { diff --git a/src/test/java/org/influxdb/dto/PointTest.java b/src/test/java/org/influxdb/dto/PointTest.java index b59440c64..14d9614be 100755 --- a/src/test/java/org/influxdb/dto/PointTest.java +++ b/src/test/java/org/influxdb/dto/PointTest.java @@ -2,6 +2,7 @@ import org.influxdb.BuilderException; import org.influxdb.InfluxDB; +import org.influxdb.InfluxDBMapperException; import org.influxdb.annotation.Column; import org.influxdb.annotation.Measurement; import org.influxdb.annotation.TimeColumn; @@ -712,6 +713,13 @@ public void testAddFieldsFromPOJOWithTimeColumnSeconds() throws NoSuchFieldExcep Assertions.assertEquals(pojo.time.getEpochSecond(), timeField.get(p)); } + @Test + public void testAddFieldsFromPOJOWithBadTimeColumn() { + BadTimeColumnPojo pojo = new BadTimeColumnPojo(); + Assertions.assertThrows(InfluxDBMapperException.class, + () -> Point.measurementByPOJO(pojo.getClass()).addFieldsFromPOJO(pojo).build()); + } + @Test public void testAddFieldsFromPOJOWithTimeColumnNull() throws NoSuchFieldException, IllegalAccessException { TimeColumnPojo pojo = new TimeColumnPojo(); @@ -939,6 +947,14 @@ static class TimeColumnPojoSec { Instant time; } + @Measurement(name = "tcmeasurement", allFields = true) + static class BadTimeColumnPojo { + boolean booleanPrimitive; + + @TimeColumn + String time; + } + @Measurement(name = "mymeasurement") static class Pojo { From e93949f9a359b48a0af9cbd378ced79044bd5caf Mon Sep 17 00:00:00 2001 From: Eran Leshem <1707552+eranl@users.noreply.github.com> Date: Tue, 5 Dec 2023 20:44:34 +0200 Subject: [PATCH 178/200] Unify Point's and InfluxDBMapper's POJO saving logic (#979) --- src/main/java/org/influxdb/dto/Point.java | 28 ++++- .../org/influxdb/impl/InfluxDBMapper.java | 100 ++---------------- src/test/java/org/influxdb/dto/PointTest.java | 6 +- .../org/influxdb/impl/InfluxDBMapperTest.java | 3 + 4 files changed, 43 insertions(+), 94 deletions(-) diff --git a/src/main/java/org/influxdb/dto/Point.java b/src/main/java/org/influxdb/dto/Point.java index c503a30e7..48fa76436 100755 --- a/src/main/java/org/influxdb/dto/Point.java +++ b/src/main/java/org/influxdb/dto/Point.java @@ -350,7 +350,7 @@ private void addFieldByAttribute(final Object pojo, final Field field, final boo } } else { if (fieldValue != null) { - this.fields.put(fieldName, fieldValue); + setField(field.getType(), fieldName, fieldValue); } } @@ -379,6 +379,32 @@ public Point build() { point.setTags(this.tags); return point; } + + private void setField( + final Class fieldType, + final String columnName, + final Object value) { + if (boolean.class.isAssignableFrom(fieldType) || Boolean.class.isAssignableFrom(fieldType)) { + addField(columnName, (boolean) value); + } else if (long.class.isAssignableFrom(fieldType) || Long.class.isAssignableFrom(fieldType)) { + addField(columnName, (long) value); + } else if (double.class.isAssignableFrom(fieldType) || Double.class.isAssignableFrom(fieldType)) { + addField(columnName, (double) value); + } else if (float.class.isAssignableFrom(fieldType) || Float.class.isAssignableFrom(fieldType)) { + addField(columnName, (float) value); + } else if (int.class.isAssignableFrom(fieldType) || Integer.class.isAssignableFrom(fieldType)) { + addField(columnName, (int) value); + } else if (short.class.isAssignableFrom(fieldType) || Short.class.isAssignableFrom(fieldType)) { + addField(columnName, (short) value); + } else if (String.class.isAssignableFrom(fieldType)) { + addField(columnName, (String) value); + } else if (Enum.class.isAssignableFrom(fieldType)) { + addField(columnName, ((Enum) value).name()); + } else { + throw new InfluxDBMapperException( + "Unsupported type " + fieldType + " for column " + columnName); + } + } } /** diff --git a/src/main/java/org/influxdb/impl/InfluxDBMapper.java b/src/main/java/org/influxdb/impl/InfluxDBMapper.java index 700a960cf..2a6c0dc4c 100644 --- a/src/main/java/org/influxdb/impl/InfluxDBMapper.java +++ b/src/main/java/org/influxdb/impl/InfluxDBMapper.java @@ -1,18 +1,13 @@ package org.influxdb.impl; -import java.lang.reflect.Field; -import java.time.Instant; -import java.util.List; -import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.TimeUnit; import org.influxdb.InfluxDB; -import org.influxdb.InfluxDBMapperException; -import org.influxdb.annotation.Column; import org.influxdb.annotation.Measurement; import org.influxdb.dto.Point; import org.influxdb.dto.Query; import org.influxdb.dto.QueryResult; +import java.util.List; + public class InfluxDBMapper extends InfluxDBResultMapper { private final InfluxDB influxDB; @@ -52,91 +47,16 @@ public List query(final Class clazz) { public void save(final T model) { throwExceptionIfMissingAnnotation(model.getClass()); - cacheMeasurementClass(model.getClass()); - - ConcurrentMap colNameAndFieldMap = getColNameAndFieldMap(model.getClass()); - - try { - Class modelType = model.getClass(); - String measurement = getMeasurementName(modelType); - String database = getDatabaseName(modelType); - String retentionPolicy = getRetentionPolicy(modelType); - TimeUnit timeUnit = getTimeUnit(modelType); - long time = timeUnit.convert(System.currentTimeMillis(), TimeUnit.MILLISECONDS); - Point.Builder pointBuilder = Point.measurement(measurement).time(time, timeUnit); - - for (String key : colNameAndFieldMap.keySet()) { - Field field = colNameAndFieldMap.get(key); - Column column = field.getAnnotation(Column.class); - String columnName = column.name(); - Class fieldType = field.getType(); - - if (!field.isAccessible()) { - field.setAccessible(true); - } - - Object value = field.get(model); - - if (column.tag()) { - /** Tags are strings either way. */ - pointBuilder.tag(columnName, value.toString()); - } else if ("time".equals(columnName)) { - if (value != null) { - setTime(pointBuilder, fieldType, timeUnit, value); - } - } else { - setField(pointBuilder, fieldType, columnName, value); - } - } - - Point point = pointBuilder.build(); + Class modelType = model.getClass(); + String database = getDatabaseName(modelType); + String retentionPolicy = getRetentionPolicy(modelType); + Point.Builder pointBuilder = Point.measurementByPOJO(modelType).addFieldsFromPOJO(model); + Point point = pointBuilder.build(); - if ("[unassigned]".equals(database)) { - influxDB.write(point); - } else { - influxDB.write(database, retentionPolicy, point); - } - - } catch (IllegalAccessException e) { - throw new InfluxDBMapperException(e); - } - } - - private void setTime( - final Point.Builder pointBuilder, - final Class fieldType, - final TimeUnit timeUnit, - final Object value) { - if (Instant.class.isAssignableFrom(fieldType)) { - Instant instant = (Instant) value; - long time = timeUnit.convert(instant.toEpochMilli(), TimeUnit.MILLISECONDS); - pointBuilder.time(time, timeUnit); - } else { - throw new InfluxDBMapperException( - "Unsupported type " + fieldType + " for time: should be of Instant type"); - } - } - - private void setField( - final Point.Builder pointBuilder, - final Class fieldType, - final String columnName, - final Object value) { - if (boolean.class.isAssignableFrom(fieldType) || Boolean.class.isAssignableFrom(fieldType)) { - pointBuilder.addField(columnName, (boolean) value); - } else if (long.class.isAssignableFrom(fieldType) || Long.class.isAssignableFrom(fieldType)) { - pointBuilder.addField(columnName, (long) value); - } else if (double.class.isAssignableFrom(fieldType) - || Double.class.isAssignableFrom(fieldType)) { - pointBuilder.addField(columnName, (double) value); - } else if (int.class.isAssignableFrom(fieldType) || Integer.class.isAssignableFrom(fieldType)) { - pointBuilder.addField(columnName, (int) value); - } else if (String.class.isAssignableFrom(fieldType)) { - pointBuilder.addField(columnName, (String) value); + if ("[unassigned]".equals(database)) { + influxDB.write(point); } else { - throw new InfluxDBMapperException( - "Unsupported type " + fieldType + " for column " + columnName); + influxDB.write(database, retentionPolicy, point); } } - } diff --git a/src/test/java/org/influxdb/dto/PointTest.java b/src/test/java/org/influxdb/dto/PointTest.java index 14d9614be..4121d4025 100755 --- a/src/test/java/org/influxdb/dto/PointTest.java +++ b/src/test/java/org/influxdb/dto/PointTest.java @@ -737,7 +737,7 @@ public void testAddFieldsFromPOJOWithTimeColumnNull() throws NoSuchFieldExceptio } @Test - public void testAddFieldsFromPOJOWithData() throws NoSuchFieldException, IllegalAccessException { + public void testAddFieldsFromPOJOWithData() { Pojo pojo = new Pojo(); pojo.booleanObject = true; pojo.booleanPrimitive = false; @@ -760,7 +760,6 @@ public void testAddFieldsFromPOJOWithData() throws NoSuchFieldException, Illegal Assertions.assertEquals(pojo.integerPrimitive, p.getFields().get("integerPrimitive")); Assertions.assertEquals(pojo.longObject, p.getFields().get("longObject")); Assertions.assertEquals(pojo.longPrimitive, p.getFields().get("longPrimitive")); - Assertions.assertEquals(pojo.time, p.getFields().get("time")); Assertions.assertEquals(pojo.uuid, p.getTags().get("uuid")); } @@ -815,7 +814,6 @@ public void testAddFieldsFromPOJOWithPublicAttributes() { Assertions.assertEquals(pojo.integerPrimitive, p.getFields().get("integerPrimitive")); Assertions.assertEquals(pojo.longObject, p.getFields().get("longObject")); Assertions.assertEquals(pojo.longPrimitive, p.getFields().get("longPrimitive")); - Assertions.assertEquals(pojo.time, p.getFields().get("time")); Assertions.assertEquals(pojo.uuid, p.getTags().get("uuid")); } @@ -962,6 +960,7 @@ static class Pojo { private boolean booleanPrimitive; @Column(name = "time") + @TimeColumn private Instant time; @Column(name = "uuid", tag = true) @@ -1078,6 +1077,7 @@ static class PojoWithPublicAttributes { public boolean booleanPrimitive; @Column(name = "time") + @TimeColumn public Instant time; @Column(name = "uuid", tag = true) diff --git a/src/test/java/org/influxdb/impl/InfluxDBMapperTest.java b/src/test/java/org/influxdb/impl/InfluxDBMapperTest.java index cd2251ac2..3d5bd86be 100644 --- a/src/test/java/org/influxdb/impl/InfluxDBMapperTest.java +++ b/src/test/java/org/influxdb/impl/InfluxDBMapperTest.java @@ -11,6 +11,7 @@ import org.influxdb.TestUtils; import org.influxdb.annotation.Column; import org.influxdb.annotation.Measurement; +import org.influxdb.annotation.TimeColumn; import org.influxdb.dto.Query; import org.junit.Assert; import org.junit.jupiter.api.AfterEach; @@ -129,6 +130,7 @@ static class ServerMeasure { /** Check the instant conversions */ @Column(name = "time") + @TimeColumn private Instant time; @Column(name = "name", tag = true) @@ -322,6 +324,7 @@ public void setField(Integer field) { static class NonInstantTime { @Column(name = "time") + @TimeColumn private long time; public long getTime() { From f324d221943d2eae901557c16656e2dd383a54fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 07:06:57 +0100 Subject: [PATCH 179/200] chore(deps): bump org.apache.maven.plugins:maven-checkstyle-plugin (#981) Bumps [org.apache.maven.plugins:maven-checkstyle-plugin](https://github.com/apache/maven-checkstyle-plugin) from 3.3.0 to 3.3.1. - [Commits](https://github.com/apache/maven-checkstyle-plugin/compare/maven-checkstyle-plugin-3.3.0...maven-checkstyle-plugin-3.3.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-checkstyle-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1ee9a1a96..beb377423 100644 --- a/pom.xml +++ b/pom.xml @@ -218,7 +218,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.3.0 + 3.3.1 com.puppycrawl.tools From 4b4dc44eb97ec6d1a33cbd393e1e520614fe6755 Mon Sep 17 00:00:00 2001 From: Eran Leshem <1707552+eranl@users.noreply.github.com> Date: Wed, 13 Dec 2023 11:20:24 +0200 Subject: [PATCH 180/200] Support generic POJO super classes (#980) * Support generic POJO super classes * Add generic POJO super classes to MANUAL.md * Clean up TypeMapper --- MANUAL.md | 19 ++ src/main/java/org/influxdb/dto/Point.java | 28 ++- .../influxdb/impl/InfluxDBResultMapper.java | 185 ++++++++---------- .../java/org/influxdb/impl/TypeMapper.java | 70 +++++++ src/test/java/org/influxdb/dto/PointTest.java | 30 +++ .../impl/InfluxDBResultMapperTest.java | 56 ++++++ 6 files changed, 280 insertions(+), 108 deletions(-) create mode 100644 src/main/java/org/influxdb/impl/TypeMapper.java diff --git a/MANUAL.md b/MANUAL.md index 18040aeab..92b245b21 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -402,6 +402,25 @@ influxDB.write(dbName, rpName, point); An alternative way to create InfluxDB queries is available. By using the [QueryBuilder](QUERY_BUILDER.md) you can create queries using java instead of providing the influxdb queries as strings. +#### Generic POJO super classes + +POJO classes can have generic super classes, for cases where multiple measurements have a similar structure, and differ by type(s), as in: + +```java +public class SuperMeasurement { + @Column + @TimeColumn + private Instant time; + @Column + T value; + // Other common columns and tags +} + +public class SubMeasurement extends SuperMeasurement { + // Any specific columns and tags +} +``` + ### InfluxDBMapper In case you want to save and load data using models you can use the [InfluxDBMapper](INFLUXDB_MAPPER.md). diff --git a/src/main/java/org/influxdb/dto/Point.java b/src/main/java/org/influxdb/dto/Point.java index 48fa76436..277ce4c99 100755 --- a/src/main/java/org/influxdb/dto/Point.java +++ b/src/main/java/org/influxdb/dto/Point.java @@ -7,10 +7,13 @@ import org.influxdb.annotation.Measurement; import org.influxdb.annotation.TimeColumn; import org.influxdb.impl.Preconditions; +import org.influxdb.impl.TypeMapper; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.lang.reflect.Modifier; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; import java.math.BigDecimal; import java.math.BigInteger; import java.math.RoundingMode; @@ -286,6 +289,8 @@ public Builder addFieldsFromPOJO(final Object pojo) { while (clazz != null) { + TypeMapper typeMapper = TypeMapper.empty(); + while (clazz != null) { for (Field field : clazz.getDeclaredFields()) { Column column = field.getAnnotation(Column.class); @@ -304,10 +309,20 @@ public Builder addFieldsFromPOJO(final Object pojo) { fieldName = field.getName(); } - addFieldByAttribute(pojo, field, column != null && column.tag(), fieldName); + addFieldByAttribute(pojo, field, column != null && column.tag(), fieldName, typeMapper); + } + + Class superclass = clazz.getSuperclass(); + Type genericSuperclass = clazz.getGenericSuperclass(); + if (genericSuperclass instanceof ParameterizedType) { + typeMapper = TypeMapper.of((ParameterizedType) genericSuperclass, superclass); + } else { + typeMapper = TypeMapper.empty(); } - clazz = clazz.getSuperclass(); + + clazz = superclass; } + } if (this.fields.isEmpty()) { throw new BuilderException("Class " + pojo.getClass().getName() @@ -318,13 +333,14 @@ public Builder addFieldsFromPOJO(final Object pojo) { } private void addFieldByAttribute(final Object pojo, final Field field, final boolean tag, - final String fieldName) { + final String fieldName, final TypeMapper typeMapper) { try { Object fieldValue = field.get(pojo); TimeColumn tc = field.getAnnotation(TimeColumn.class); + Class fieldType = (Class) typeMapper.resolve(field.getGenericType()); if (tc != null) { - if (Instant.class.isAssignableFrom(field.getType())) { + if (Instant.class.isAssignableFrom(fieldType)) { Optional.ofNullable((Instant) fieldValue).ifPresent(instant -> { TimeUnit timeUnit = tc.timeUnit(); if (timeUnit == TimeUnit.NANOSECONDS || timeUnit == TimeUnit.MICROSECONDS) { @@ -341,7 +357,7 @@ private void addFieldByAttribute(final Object pojo, final Field field, final boo } throw new InfluxDBMapperException( - "Unsupported type " + field.getType() + " for time: should be of Instant type"); + "Unsupported type " + fieldType + " for time: should be of Instant type"); } if (tag) { @@ -350,7 +366,7 @@ private void addFieldByAttribute(final Object pojo, final Field field, final boo } } else { if (fieldValue != null) { - setField(field.getType(), fieldName, fieldValue); + setField(fieldType, fieldName, fieldValue); } } diff --git a/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java b/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java index 15d4c283a..5a4d3af85 100644 --- a/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java +++ b/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java @@ -28,6 +28,8 @@ import java.lang.reflect.Field; import java.lang.reflect.Modifier; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; import java.time.Instant; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; @@ -50,8 +52,12 @@ public class InfluxDBResultMapper { /** * Data structure used to cache classes used as measurements. */ + private static class ClassInfo { + ConcurrentMap fieldMap; + ConcurrentMap typeMappers; + } private static final - ConcurrentMap> CLASS_FIELD_CACHE = new ConcurrentHashMap<>(); + ConcurrentMap CLASS_INFO_CACHE = new ConcurrentHashMap<>(); private static final int FRACTION_MIN_WIDTH = 0; private static final int FRACTION_MAX_WIDTH = 9; @@ -204,21 +210,19 @@ void throwExceptionIfResultWithError(final QueryResult queryResult) { }); } - ConcurrentMap getColNameAndFieldMap(final Class clazz) { - return CLASS_FIELD_CACHE.get(clazz.getName()); - } - void cacheMeasurementClass(final Class... classVarAgrs) { for (Class clazz : classVarAgrs) { - if (CLASS_FIELD_CACHE.containsKey(clazz.getName())) { + if (CLASS_INFO_CACHE.containsKey(clazz.getName())) { continue; } - ConcurrentMap influxColumnAndFieldMap = new ConcurrentHashMap<>(); + ConcurrentMap fieldMap = new ConcurrentHashMap<>(); + ConcurrentMap typeMappers = new ConcurrentHashMap<>(); Measurement measurement = clazz.getAnnotation(Measurement.class); boolean allFields = measurement != null && measurement.allFields(); Class c = clazz; + TypeMapper typeMapper = TypeMapper.empty(); while (c != null) { for (Field field : c.getDeclaredFields()) { Column colAnnotation = field.getAnnotation(Column.class); @@ -227,11 +231,25 @@ void cacheMeasurementClass(final Class... classVarAgrs) { continue; } - influxColumnAndFieldMap.put(getFieldName(field, colAnnotation), field); + fieldMap.put(getFieldName(field, colAnnotation), field); + typeMappers.put(field, typeMapper); } - c = c.getSuperclass(); + + Class superclass = c.getSuperclass(); + Type genericSuperclass = c.getGenericSuperclass(); + if (genericSuperclass instanceof ParameterizedType) { + typeMapper = TypeMapper.of((ParameterizedType) genericSuperclass, superclass); + } else { + typeMapper = TypeMapper.empty(); + } + + c = superclass; } - CLASS_FIELD_CACHE.putIfAbsent(clazz.getName(), influxColumnAndFieldMap); + + ClassInfo classInfo = new ClassInfo(); + classInfo.fieldMap = fieldMap; + classInfo.typeMappers = typeMappers; + CLASS_INFO_CACHE.putIfAbsent(clazz.getName(), classInfo); } } @@ -255,10 +273,6 @@ String getRetentionPolicy(final Class clazz) { return ((Measurement) clazz.getAnnotation(Measurement.class)).retentionPolicy(); } - TimeUnit getTimeUnit(final Class clazz) { - return ((Measurement) clazz.getAnnotation(Measurement.class)).timeUnit(); - } - List parseSeriesAs(final QueryResult.Series series, final Class clazz, final List result) { return parseSeriesAs(series, clazz, result, TimeUnit.MILLISECONDS); } @@ -266,17 +280,19 @@ List parseSeriesAs(final QueryResult.Series series, final Class clazz, List parseSeriesAs(final QueryResult.Series series, final Class clazz, final List result, final TimeUnit precision) { int columnSize = series.getColumns().size(); - ConcurrentMap colNameAndFieldMap = CLASS_FIELD_CACHE.get(clazz.getName()); + + ClassInfo classInfo = CLASS_INFO_CACHE.get(clazz.getName()); try { T object = null; for (List row : series.getValues()) { for (int i = 0; i < columnSize; i++) { - Field correspondingField = colNameAndFieldMap.get(series.getColumns().get(i)/*InfluxDB columnName*/); + Field correspondingField = classInfo.fieldMap.get(series.getColumns().get(i)/*InfluxDB columnName*/); if (correspondingField != null) { if (object == null) { object = clazz.newInstance(); } - setFieldValue(object, correspondingField, row.get(i), precision); + setFieldValue(object, correspondingField, row.get(i), precision, + classInfo.typeMappers.get(correspondingField)); } } // When the "GROUP BY" clause is used, "tags" are returned as Map and @@ -285,10 +301,11 @@ List parseSeriesAs(final QueryResult.Series series, final Class clazz, // "tag" values are always String. if (series.getTags() != null && !series.getTags().isEmpty()) { for (Entry entry : series.getTags().entrySet()) { - Field correspondingField = colNameAndFieldMap.get(entry.getKey()/*InfluxDB columnName*/); + Field correspondingField = classInfo.fieldMap.get(entry.getKey()/*InfluxDB columnName*/); if (correspondingField != null) { // I don't think it is possible to reach here without a valid "object" - setFieldValue(object, correspondingField, entry.getValue(), precision); + setFieldValue(object, correspondingField, entry.getValue(), precision, + classInfo.typeMappers.get(correspondingField)); } } } @@ -309,104 +326,68 @@ List parseSeriesAs(final QueryResult.Series series, final Class clazz, * for more information. * */ - private static void setFieldValue(final T object, final Field field, final Object value, final TimeUnit precision) + private static void setFieldValue(final T object, final Field field, final Object value, final TimeUnit precision, + final TypeMapper typeMapper) throws IllegalArgumentException, IllegalAccessException { if (value == null) { return; } - Class fieldType = field.getType(); + Type fieldType = typeMapper.resolve(field.getGenericType()); + if (!field.isAccessible()) { + field.setAccessible(true); + } + field.set(object, adaptValue((Class) fieldType, value, precision, field.getName(), object.getClass().getName())); + } + + private static Object adaptValue(final Class fieldType, final Object value, final TimeUnit precision, + final String fieldName, final String className) { try { - if (!field.isAccessible()) { - field.setAccessible(true); + if (String.class.isAssignableFrom(fieldType)) { + return String.valueOf(value); + } + if (Instant.class.isAssignableFrom(fieldType)) { + if (value instanceof String) { + return Instant.from(RFC3339_FORMATTER.parse(String.valueOf(value))); + } + if (value instanceof Long) { + return Instant.ofEpochMilli(toMillis((long) value, precision)); + } + if (value instanceof Double) { + return Instant.ofEpochMilli(toMillis(((Double) value).longValue(), precision)); + } + if (value instanceof Integer) { + return Instant.ofEpochMilli(toMillis(((Integer) value).longValue(), precision)); + } + throw new InfluxDBMapperException("Unsupported type " + fieldType + " for field " + fieldName); } - if (fieldValueModified(fieldType, field, object, value, precision) - || fieldValueForPrimitivesModified(fieldType, field, object, value) - || fieldValueForPrimitiveWrappersModified(fieldType, field, object, value)) { - return; + if (Double.class.isAssignableFrom(fieldType) || double.class.isAssignableFrom(fieldType)) { + return value; + } + if (Long.class.isAssignableFrom(fieldType) || long.class.isAssignableFrom(fieldType)) { + return ((Double) value).longValue(); + } + if (Integer.class.isAssignableFrom(fieldType) || int.class.isAssignableFrom(fieldType)) { + return ((Double) value).intValue(); + } + if (Boolean.class.isAssignableFrom(fieldType) || boolean.class.isAssignableFrom(fieldType)) { + return Boolean.valueOf(String.valueOf(value)); + } + if (Enum.class.isAssignableFrom(fieldType)) { + //noinspection unchecked + return Enum.valueOf((Class) fieldType, String.valueOf(value)); } - String msg = "Class '%s' field '%s' is from an unsupported type '%s'."; - throw new InfluxDBMapperException( - String.format(msg, object.getClass().getName(), field.getName(), field.getType())); } catch (ClassCastException e) { String msg = "Class '%s' field '%s' was defined with a different field type and caused a ClassCastException. " + "The correct type is '%s' (current field value: '%s')."; throw new InfluxDBMapperException( - String.format(msg, object.getClass().getName(), field.getName(), value.getClass().getName(), value)); - } - } - - static boolean fieldValueModified(final Class fieldType, final Field field, final T object, final Object value, - final TimeUnit precision) - throws IllegalArgumentException, IllegalAccessException { - if (String.class.isAssignableFrom(fieldType)) { - field.set(object, String.valueOf(value)); - return true; - } - if (Instant.class.isAssignableFrom(fieldType)) { - Instant instant; - if (value instanceof String) { - instant = Instant.from(RFC3339_FORMATTER.parse(String.valueOf(value))); - } else if (value instanceof Long) { - instant = Instant.ofEpochMilli(toMillis((long) value, precision)); - } else if (value instanceof Double) { - instant = Instant.ofEpochMilli(toMillis(((Double) value).longValue(), precision)); - } else if (value instanceof Integer) { - instant = Instant.ofEpochMilli(toMillis(((Integer) value).longValue(), precision)); - } else { - throw new InfluxDBMapperException("Unsupported type " + field.getClass() + " for field " + field.getName()); - } - field.set(object, instant); - return true; - } - return false; - } - - static boolean fieldValueForPrimitivesModified(final Class fieldType, final Field field, final T object, - final Object value) - throws IllegalArgumentException, IllegalAccessException { - if (double.class.isAssignableFrom(fieldType)) { - field.setDouble(object, ((Double) value).doubleValue()); - return true; - } - if (long.class.isAssignableFrom(fieldType)) { - field.setLong(object, ((Double) value).longValue()); - return true; - } - if (int.class.isAssignableFrom(fieldType)) { - field.setInt(object, ((Double) value).intValue()); - return true; + String.format(msg, className, fieldName, value.getClass().getName(), value)); } - if (boolean.class.isAssignableFrom(fieldType)) { - field.setBoolean(object, Boolean.valueOf(String.valueOf(value)).booleanValue()); - return true; - } - return false; - } - static boolean fieldValueForPrimitiveWrappersModified(final Class fieldType, final Field field, final T object, - final Object value) - throws IllegalArgumentException, IllegalAccessException { - if (Double.class.isAssignableFrom(fieldType)) { - field.set(object, value); - return true; - } - if (Long.class.isAssignableFrom(fieldType)) { - field.set(object, Long.valueOf(((Double) value).longValue())); - return true; - } - if (Integer.class.isAssignableFrom(fieldType)) { - field.set(object, Integer.valueOf(((Double) value).intValue())); - return true; - } - if (Boolean.class.isAssignableFrom(fieldType)) { - field.set(object, Boolean.valueOf(String.valueOf(value))); - return true; - } - return false; + throw new InfluxDBMapperException( + String.format("Class '%s' field '%s' is from an unsupported type '%s'.", className, fieldName, fieldType)); } - private static Long toMillis(final long value, final TimeUnit precision) { - + private static long toMillis(final long value, final TimeUnit precision) { return TimeUnit.MILLISECONDS.convert(value, precision); } } diff --git a/src/main/java/org/influxdb/impl/TypeMapper.java b/src/main/java/org/influxdb/impl/TypeMapper.java new file mode 100644 index 000000000..98f4ada63 --- /dev/null +++ b/src/main/java/org/influxdb/impl/TypeMapper.java @@ -0,0 +1,70 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2017 azeti Networks AG () + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + * associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT + * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +package org.influxdb.impl; + +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; +import java.util.HashMap; +import java.util.Map; + +/** + * Resolves generic type variables to actual types, based on context. + * + * @author Eran Leshem + */ +@FunctionalInterface +public interface TypeMapper { + TypeMapper EMPTY = typeVariable -> null; + + static TypeMapper of(ParameterizedType type, Class clazz) { + TypeVariable>[] typeVariables = clazz.getTypeParameters(); + Type[] types = type.getActualTypeArguments(); + if (types.length != typeVariables.length) { + throw new IllegalStateException("Mismatched lengths for type variables and actual types"); + } + Map, Type> typeMapping = new HashMap<>(typeVariables.length); + for (int i = 0; i < typeVariables.length; i++) { + typeMapping.put(typeVariables[i], types[i]); + } + + return typeMapping::get; + } + + static TypeMapper empty() { + return EMPTY; + } + + default Type resolve(Type type) { + if (type instanceof TypeVariable) { + Type resolvedType = get((TypeVariable) type); + if (resolvedType == null) { + throw new IllegalStateException("Could not resolve type " + type); + } + + return resolvedType; + } + + return type; + } + + Type get(TypeVariable typeVariable); +} diff --git a/src/test/java/org/influxdb/dto/PointTest.java b/src/test/java/org/influxdb/dto/PointTest.java index 4121d4025..9148c64ba 100755 --- a/src/test/java/org/influxdb/dto/PointTest.java +++ b/src/test/java/org/influxdb/dto/PointTest.java @@ -890,6 +890,22 @@ public void testInheritMeasurement() { Assert.assertEquals(expected, actual); } + @Test + public void testGenericInheritMeasurement() { + Point expected = Point.measurementByPOJO(MyGenericSubMeasurement.class) + .addField("superValue", "super") + .addField("subValue", "sub") + .build(); + MyGenericSubMeasurement scm = new MyGenericSubMeasurement(); + scm.subValue = "sub"; + scm.superValue = "super"; + + Point actual = Point.measurementByPOJO(MyGenericSubMeasurement.class) + .addFieldsFromPOJO(scm) + .build(); + Assert.assertEquals(expected, actual); + } + static class PojoWithoutAnnotation { private String id; @@ -1173,6 +1189,20 @@ static class SubClassMeasurement extends SuperMeasurement { String subValue; } + @Measurement(name = "SuperMeasurement") + static class MyGenericSuperMeasurement { + + @Column(name = "superValue") + protected T superValue; + } + + @Measurement(name = "SubMeasurement") + static class MyGenericSubMeasurement extends MyGenericSuperMeasurement { + + @Column(name = "subValue") + protected String subValue; + } + @Measurement(name = "PojoNumberPrimitiveTypes") static class PojoNumberPrimitiveTypes { diff --git a/src/test/java/org/influxdb/impl/InfluxDBResultMapperTest.java b/src/test/java/org/influxdb/impl/InfluxDBResultMapperTest.java index d93c4d305..959678216 100644 --- a/src/test/java/org/influxdb/impl/InfluxDBResultMapperTest.java +++ b/src/test/java/org/influxdb/impl/InfluxDBResultMapperTest.java @@ -449,6 +449,38 @@ void testToPOJOInheritance() { Assertions.assertEquals(subValue, result.get(0).subValue); } + @Test + void testToPOJOGenericInheritance() { + // Given... + mapper.cacheMeasurementClass(MyGenericSubMeasurement.class); + + String superValue = UUID.randomUUID().toString(); + String subValue = "my sub value"; + List columnList = Arrays.asList("superValue", "subValue"); + + List firstSeriesResult = Arrays.asList(superValue, subValue); + + QueryResult.Series series = new QueryResult.Series(); + series.setName("MySeriesName"); + series.setColumns(columnList); + series.setValues(Arrays.asList(firstSeriesResult)); + + QueryResult.Result internalResult = new QueryResult.Result(); + internalResult.setSeries(Arrays.asList(series)); + + QueryResult queryResult = new QueryResult(); + queryResult.setResults(Arrays.asList(internalResult)); + + //When... + List result = + mapper.toPOJO(queryResult, MyGenericSubMeasurement.class, "MySeriesName"); + + //Then... + Assertions.assertTrue(result.size() == 1); + Assertions.assertEquals(superValue, result.get(0).superValue); + Assertions.assertEquals(subValue, result.get(0).subValue); + } + @Test public void testToPOJO_HasTimeColumn() { // Given... @@ -638,6 +670,30 @@ public String toString() { } } + @Measurement(name = "SuperMeasurement") + static class MyGenericSuperMeasurement { + + @Column(name = "superValue") + protected T superValue; + + @Override + public String toString() { + return "SuperMeasurement [superValue=" + superValue + "]"; + } + } + + @Measurement(name = "SubMeasurement") + static class MyGenericSubMeasurement extends MyGenericSuperMeasurement { + + @Column(name = "subValue") + protected String subValue; + + @Override + public String toString() { + return "MySubMeasurement [subValue=" + subValue + ", superValue=" + superValue + "]"; + } + } + @Measurement(name = "foo") static class MyPojoWithUnsupportedField { From d88f1d5ad8ff35ec17d5316bb1cd63579d76d973 Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Thu, 14 Dec 2023 08:46:33 +0100 Subject: [PATCH 181/200] [maven-release-plugin] prepare release influxdb-java-2.24 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index beb377423..da1f4f9ab 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.influxdb influxdb-java jar - 2.24-SNAPSHOT + 2.24 influxdb java bindings Java API to access the InfluxDB REST API http://www.influxdb.org @@ -24,7 +24,7 @@ scm:git:git@github.com:influxdata/influxdb-java.git scm:git:git@github.com:influxdata/influxdb-java.git git@github.com:influxdata/influxdb-java.git - HEAD + influxdb-java-2.24 From 05d836dce76a2c79b2428f3204b947e211a29fad Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Thu, 14 Dec 2023 08:46:37 +0100 Subject: [PATCH 182/200] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index da1f4f9ab..9db1f2570 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.influxdb influxdb-java jar - 2.24 + 2.25-SNAPSHOT influxdb java bindings Java API to access the InfluxDB REST API http://www.influxdb.org @@ -24,7 +24,7 @@ scm:git:git@github.com:influxdata/influxdb-java.git scm:git:git@github.com:influxdata/influxdb-java.git git@github.com:influxdata/influxdb-java.git - influxdb-java-2.24 + HEAD From 9209837494514fe14b47ef37d4e754c65cfee7d5 Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Thu, 14 Dec 2023 08:49:11 +0100 Subject: [PATCH 183/200] docs: update CHANGELOG.md to reflect actual version --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 026d4d09a..ce4bebb29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 2.24 [2023-12-14] + +### Improvements +- `allFields` mode to Measurement annotation [PR #972](https://github.com/influxdata/influxdb-java/pull/972) +- Support generic POJO super classes [PR #980](https://github.com/influxdata/influxdb-java/pull/980) + ## 2.23 [2022-07-07] ### Improvements From 788540c9ea3d7431b641341d2fc7d4cb0c71be96 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jan 2024 07:28:31 +0100 Subject: [PATCH 184/200] chore(deps-dev): bump org.assertj:assertj-core from 3.24.2 to 3.25.1 (#988) Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.24.2 to 3.25.1. - [Release notes](https://github.com/assertj/assertj/releases) - [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.24.2...assertj-build-3.25.1) --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9db1f2570..7a0a24cb5 100644 --- a/pom.xml +++ b/pom.xml @@ -274,7 +274,7 @@ org.assertj assertj-core - 3.24.2 + 3.25.1 test From fbc34b0f8b9e2036330a0d8d8d4a071919bd1cec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 07:33:32 +0100 Subject: [PATCH 185/200] chore(deps): bump org.msgpack:msgpack-core from 0.9.6 to 0.9.7 (#991) Bumps [org.msgpack:msgpack-core](https://github.com/msgpack/msgpack-java) from 0.9.6 to 0.9.7. - [Release notes](https://github.com/msgpack/msgpack-java/releases) - [Changelog](https://github.com/msgpack/msgpack-java/blob/main/RELEASE_NOTES.md) - [Commits](https://github.com/msgpack/msgpack-java/compare/v0.9.6...v0.9.7) --- updated-dependencies: - dependency-name: org.msgpack:msgpack-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7a0a24cb5..d59632ca7 100644 --- a/pom.xml +++ b/pom.xml @@ -308,7 +308,7 @@ org.msgpack msgpack-core - 0.9.6 + 0.9.7 From 7fc36f8b1e41515189baa0f6563f1815a0a5fd3d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 07:34:05 +0100 Subject: [PATCH 186/200] chore(deps): bump org.apache.maven.plugins:maven-surefire-plugin (#989) Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.2 to 3.2.5. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.2...surefire-3.2.5) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d59632ca7..5d62b977f 100644 --- a/pom.xml +++ b/pom.xml @@ -89,7 +89,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.2.2 + 3.2.5 org.apache.maven.plugins From 996f3578e502ffc69dfdbe03cc310f7e6c12cca3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 07:35:03 +0100 Subject: [PATCH 187/200] chore(deps): bump org.apache.maven.plugins:maven-compiler-plugin (#985) Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.11.0 to 3.12.1. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.11.0...maven-compiler-plugin-3.12.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5d62b977f..da69cc89f 100644 --- a/pom.xml +++ b/pom.xml @@ -80,7 +80,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.11.0 + 3.12.1 1.8 1.8 From ee7059e707014973510c709722ec065b28e3f963 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 07:22:01 +0100 Subject: [PATCH 188/200] chore(deps-dev): bump org.assertj:assertj-core from 3.25.1 to 3.25.2 (#995) Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.25.1 to 3.25.2. - [Release notes](https://github.com/assertj/assertj/releases) - [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.25.1...assertj-build-3.25.2) --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index da69cc89f..4aa5b3b7c 100644 --- a/pom.xml +++ b/pom.xml @@ -274,7 +274,7 @@ org.assertj assertj-core - 3.25.1 + 3.25.2 test From 0c690c8d8a6627f525e05d68e0571e089c61845e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 07:22:29 +0100 Subject: [PATCH 189/200] chore(deps): bump org.msgpack:msgpack-core from 0.9.7 to 0.9.8 (#992) Bumps [org.msgpack:msgpack-core](https://github.com/msgpack/msgpack-java) from 0.9.7 to 0.9.8. - [Release notes](https://github.com/msgpack/msgpack-java/releases) - [Changelog](https://github.com/msgpack/msgpack-java/blob/main/RELEASE_NOTES.md) - [Commits](https://github.com/msgpack/msgpack-java/compare/v0.9.7...v0.9.8) --- updated-dependencies: - dependency-name: org.msgpack:msgpack-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4aa5b3b7c..2bfa0359a 100644 --- a/pom.xml +++ b/pom.xml @@ -308,7 +308,7 @@ org.msgpack msgpack-core - 0.9.7 + 0.9.8 From d204b8f9361f81a377170e37dcc8b5b97dadc523 Mon Sep 17 00:00:00 2001 From: Tim Yocum Date: Tue, 11 Feb 2025 23:55:02 -0600 Subject: [PATCH 190/200] chore/update-ubuntu (#1008) Bumping ubuntu runner to `-latest` as 20.04 is EOL. --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 5b70f5e1c..2a7b043e7 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -7,7 +7,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: From 99fcaccb80f42a1ef3c2174b45e6c8fb53df908a Mon Sep 17 00:00:00 2001 From: Eran Leshem <1707552+eranl@users.noreply.github.com> Date: Tue, 25 Mar 2025 09:43:06 +0200 Subject: [PATCH 191/200] Add support for parameter binding to built queries (#1010) --- QUERY_BUILDER.md | 16 +++ .../org/influxdb/dto/BoundParameterQuery.java | 72 +------------- src/main/java/org/influxdb/dto/Query.java | 98 +++++++++++++------ .../java/org/influxdb/impl/InfluxDBImpl.java | 44 +++++---- .../org/influxdb/impl/InfluxDBService.java | 31 ++++-- .../org/influxdb/querybuilder/Appender.java | 2 + .../querybuilder/FunctionFactory.java | 4 + .../influxdb/querybuilder/Placeholder.java | 14 +++ .../querybuilder/api/BuiltQueryTest.java | 12 +++ 9 files changed, 168 insertions(+), 125 deletions(-) create mode 100644 src/main/java/org/influxdb/querybuilder/Placeholder.java diff --git a/QUERY_BUILDER.md b/QUERY_BUILDER.md index 5f500b8e4..d84e6d255 100644 --- a/QUERY_BUILDER.md +++ b/QUERY_BUILDER.md @@ -588,3 +588,19 @@ Query select = select().raw("an expression on select").from(dbName, "cpu").where ```sqlite-psql SELECT an expression on select FROM h2o_feet WHERE an expression as condition; ``` + +Binding parameters + +If your Query is based on user input, it is good practice to use parameter binding to avoid [injection attacks](https://en.wikipedia.org/wiki/SQL_injection). +You can create queries with parameter binding: + +```java +Query query = select().from(DATABASE,"h2o_feet").where(gt("water_level", FunctionFactory.placeholder("level"))) + .bindParameter("level", 8); +``` + +```sqlite-psql +SELECT * FROM h2o_feet WHERE water_level > $level; +``` + +The values of bindParameter() calls are bound to the placeholders in the query (`level`). diff --git a/src/main/java/org/influxdb/dto/BoundParameterQuery.java b/src/main/java/org/influxdb/dto/BoundParameterQuery.java index 0c7b08b90..1f197289e 100644 --- a/src/main/java/org/influxdb/dto/BoundParameterQuery.java +++ b/src/main/java/org/influxdb/dto/BoundParameterQuery.java @@ -1,77 +1,9 @@ package org.influxdb.dto; -import com.squareup.moshi.JsonWriter; -import java.io.IOException; -import java.nio.charset.Charset; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; - -import org.influxdb.InfluxDBIOException; - -import okio.Buffer; - public final class BoundParameterQuery extends Query { - private final Map params = new HashMap<>(); - private BoundParameterQuery(final String command, final String database) { - super(command, database, true); - } - - public String getParameterJsonWithUrlEncoded() { - try { - String jsonParameterObject = createJsonObject(params); - String urlEncodedJsonParameterObject = encode(jsonParameterObject); - return urlEncodedJsonParameterObject; - } catch (IOException e) { - throw new InfluxDBIOException(e); - } - } - - private String createJsonObject(final Map parameterMap) throws IOException { - Buffer b = new Buffer(); - JsonWriter writer = JsonWriter.of(b); - writer.beginObject(); - for (Entry pair : parameterMap.entrySet()) { - String name = pair.getKey(); - Object value = pair.getValue(); - if (value instanceof Number) { - Number number = (Number) value; - writer.name(name).value(number); - } else if (value instanceof String) { - writer.name(name).value((String) value); - } else if (value instanceof Boolean) { - writer.name(name).value((Boolean) value); - } else { - writer.name(name).value(String.valueOf(value)); - } - } - writer.endObject(); - return b.readString(Charset.forName("utf-8")); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + params.hashCode(); - return result; - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) { - return true; - } - if (!super.equals(obj)) { - return false; - } - BoundParameterQuery other = (BoundParameterQuery) obj; - if (!params.equals(other.params)) { - return false; - } - return true; + super(command, database); } public static class QueryBuilder { @@ -93,7 +25,7 @@ public QueryBuilder bind(final String placeholder, final Object value) { if (query == null) { query = new BoundParameterQuery(influxQL, null); } - query.params.put(placeholder, value); + query.bindParameter(placeholder, value); return this; } diff --git a/src/main/java/org/influxdb/dto/Query.java b/src/main/java/org/influxdb/dto/Query.java index 5c4921b8c..ebed08e7e 100644 --- a/src/main/java/org/influxdb/dto/Query.java +++ b/src/main/java/org/influxdb/dto/Query.java @@ -1,8 +1,18 @@ package org.influxdb.dto; +import com.squareup.moshi.JsonWriter; +import okio.Buffer; +import org.influxdb.InfluxDBIOException; +import org.influxdb.querybuilder.Appendable; + +import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; +import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; /** * Represents a Query against Influxdb. @@ -15,6 +25,7 @@ public class Query { private final String command; private final String database; private final boolean requiresPost; + protected final Map params = new HashMap<>(); /** * @param command the query command @@ -68,38 +79,43 @@ public boolean requiresPost() { return requiresPost; } - @SuppressWarnings("checkstyle:avoidinlineconditionals") - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((command == null) ? 0 : command.hashCode()); - result = prime * result - + ((database == null) ? 0 : database.hashCode()); - return result; + public Query bindParameter(final String placeholder, final Object value) { + params.put(placeholder, value); + return this; + } + + public boolean hasBoundParameters() { + return !params.isEmpty(); + } + + public String getParameterJsonWithUrlEncoded() { + try { + String jsonParameterObject = createJsonObject(params); + String urlEncodedJsonParameterObject = encode(jsonParameterObject); + return urlEncodedJsonParameterObject; + } catch (IOException e) { + throw new InfluxDBIOException(e); + } } - @SuppressWarnings("checkstyle:needbraces") @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - Query other = (Query) obj; - if (command == null) { - if (other.command != null) - return false; - } else if (!command.equals(other.command)) + public boolean equals(final Object o) { + if (o == null || getClass() != o.getClass()) { return false; - if (database == null) { - if (other.database != null) - return false; - } else if (!database.equals(other.database)) - return false; - return true; + } + + Query query = (Query) o; + return Objects.equals(command, query.command) && Objects.equals(database, query.database) && params.equals( + query.params); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = Objects.hashCode(command); + result = prime * result + Objects.hashCode(database); + result = prime * result + params.hashCode(); + return result; } /** @@ -115,4 +131,30 @@ public static String encode(final String command) { throw new IllegalStateException("Every JRE must support UTF-8", e); } } + + private String createJsonObject(final Map parameterMap) throws IOException { + Buffer b = new Buffer(); + JsonWriter writer = JsonWriter.of(b); + writer.beginObject(); + for (Map.Entry pair : parameterMap.entrySet()) { + String name = pair.getKey(); + Object value = pair.getValue(); + if (value instanceof Number) { + Number number = (Number) value; + writer.name(name).value(number); + } else if (value instanceof String) { + writer.name(name).value((String) value); + } else if (value instanceof Boolean) { + writer.name(name).value((Boolean) value); + } else if (value instanceof Appendable) { + StringBuilder stringBuilder = new StringBuilder(); + ((Appendable) value).appendTo(stringBuilder); + writer.name(name).value(stringBuilder.toString()); + } else { + writer.name(name).value(String.valueOf(value)); + } + } + writer.endObject(); + return b.readString(Charset.forName("utf-8")); + } } diff --git a/src/main/java/org/influxdb/impl/InfluxDBImpl.java b/src/main/java/org/influxdb/impl/InfluxDBImpl.java index 825e0708a..23427a23d 100644 --- a/src/main/java/org/influxdb/impl/InfluxDBImpl.java +++ b/src/main/java/org/influxdb/impl/InfluxDBImpl.java @@ -16,7 +16,6 @@ import org.influxdb.InfluxDBException; import org.influxdb.InfluxDBIOException; import org.influxdb.dto.BatchPoints; -import org.influxdb.dto.BoundParameterQuery; import org.influxdb.dto.Point; import org.influxdb.dto.Pong; import org.influxdb.dto.Query; @@ -637,13 +636,17 @@ public void query(final Query query, final int chunkSize, final BiConsumer onNext, final Runnable onComplete, final Consumer onFailure) { Call call; - if (query instanceof BoundParameterQuery) { - BoundParameterQuery boundParameterQuery = (BoundParameterQuery) query; - call = this.influxDBService.query(getDatabase(query), query.getCommandWithUrlEncoded(), chunkSize, - boundParameterQuery.getParameterJsonWithUrlEncoded()); + if (query.hasBoundParameters()) { + if (query.requiresPost()) { + call = this.influxDBService.postQuery(getDatabase(query), query.getCommandWithUrlEncoded(), chunkSize, + query.getParameterJsonWithUrlEncoded()); + } else { + call = this.influxDBService.query(getDatabase(query), query.getCommandWithUrlEncoded(), chunkSize, + query.getParameterJsonWithUrlEncoded()); + } } else { if (query.requiresPost()) { - call = this.influxDBService.query(getDatabase(query), query.getCommandWithUrlEncoded(), chunkSize, null); + call = this.influxDBService.postQuery(getDatabase(query), query.getCommandWithUrlEncoded(), chunkSize); } else { call = this.influxDBService.query(getDatabase(query), query.getCommandWithUrlEncoded(), chunkSize); } @@ -716,18 +719,21 @@ public void onFailure(final Call call, final Throwable t) { @Override public QueryResult query(final Query query, final TimeUnit timeUnit) { Call call; - if (query instanceof BoundParameterQuery) { - BoundParameterQuery boundParameterQuery = (BoundParameterQuery) query; - call = this.influxDBService.query(getDatabase(query), - TimeUtil.toTimePrecision(timeUnit), query.getCommandWithUrlEncoded(), - boundParameterQuery.getParameterJsonWithUrlEncoded()); + if (query.hasBoundParameters()) { + if (query.requiresPost()) { + call = this.influxDBService.postQuery(getDatabase(query), TimeUtil.toTimePrecision(timeUnit), + query.getCommandWithUrlEncoded(), query.getParameterJsonWithUrlEncoded()); + } else { + call = this.influxDBService.query(getDatabase(query), TimeUtil.toTimePrecision(timeUnit), + query.getCommandWithUrlEncoded(), query.getParameterJsonWithUrlEncoded()); + } } else { if (query.requiresPost()) { - call = this.influxDBService.query(getDatabase(query), - TimeUtil.toTimePrecision(timeUnit), query.getCommandWithUrlEncoded(), null); + call = this.influxDBService.postQuery(getDatabase(query), + TimeUtil.toTimePrecision(timeUnit), query.getCommandWithUrlEncoded()); } else { call = this.influxDBService.query(getDatabase(query), - TimeUtil.toTimePrecision(timeUnit), query.getCommandWithUrlEncoded()); + TimeUtil.toTimePrecision(timeUnit), query.getCommandWithUrlEncoded(), null); } } return executeQuery(call); @@ -788,10 +794,14 @@ public boolean databaseExists(final String name) { */ private Call callQuery(final Query query) { Call call; - if (query instanceof BoundParameterQuery) { - BoundParameterQuery boundParameterQuery = (BoundParameterQuery) query; + if (query.hasBoundParameters()) { + if (query.requiresPost()) { call = this.influxDBService.postQuery(getDatabase(query), query.getCommandWithUrlEncoded(), - boundParameterQuery.getParameterJsonWithUrlEncoded()); + query.getParameterJsonWithUrlEncoded()); + } else { + call = this.influxDBService.query(getDatabase(query), null, query.getCommandWithUrlEncoded(), + query.getParameterJsonWithUrlEncoded()); + } } else { if (query.requiresPost()) { call = this.influxDBService.postQuery(getDatabase(query), query.getCommandWithUrlEncoded()); diff --git a/src/main/java/org/influxdb/impl/InfluxDBService.java b/src/main/java/org/influxdb/impl/InfluxDBService.java index ce7a811b4..061a76615 100644 --- a/src/main/java/org/influxdb/impl/InfluxDBService.java +++ b/src/main/java/org/influxdb/impl/InfluxDBService.java @@ -47,12 +47,7 @@ public Call writePoints(@Query(DB) String database, @GET("query") public Call query(@Query(DB) String db, - @Query(EPOCH) String epoch, @Query(value = Q, encoded = true) String query); - - @POST("query") - @FormUrlEncoded - public Call query(@Query(DB) String db, - @Query(EPOCH) String epoch, @Field(value = Q, encoded = true) String query, + @Query(EPOCH) String epoch, @Query(value = Q, encoded = true) String query, @Query(value = PARAMS, encoded = true) String params); @GET("query") @@ -66,9 +61,26 @@ public Call postQuery(@Query(DB) String db, @POST("query") @FormUrlEncoded - public Call postQuery(@Query(DB) String db, + public Call postQuery(@Query(DB) String db, @Query(EPOCH) String epoch, + @Field(value = Q, encoded = true) String query); + + @POST("query") + @FormUrlEncoded + public Call postQuery(@Query(DB) String db, @Query(EPOCH) String epoch, @Field(value = Q, encoded = true) String query, @Query(value = PARAMS, encoded = true) String params); + @Streaming + @POST("query?chunked=true") + @FormUrlEncoded + public Call postQuery(@Query(DB) String db, @Field(value = Q, encoded = true) String query, + @Query(CHUNK_SIZE) int chunkSize); + + @Streaming + @POST("query?chunked=true") + @FormUrlEncoded + public Call postQuery(@Query(DB) String db, @Field(value = Q, encoded = true) String query, + @Query(CHUNK_SIZE) int chunkSize, @Query(value = PARAMS, encoded = true) String params); + @POST("query") @FormUrlEncoded public Call postQuery(@Field(value = Q, encoded = true) String query); @@ -79,8 +91,7 @@ public Call query(@Query(DB) String db, @Query(value = Q, encoded @Query(CHUNK_SIZE) int chunkSize); @Streaming - @POST("query?chunked=true") - @FormUrlEncoded - public Call query(@Query(DB) String db, @Field(value = Q, encoded = true) String query, + @GET("query?chunked=true") + public Call query(@Query(DB) String db, @Query(value = Q, encoded = true) String query, @Query(CHUNK_SIZE) int chunkSize, @Query(value = PARAMS, encoded = true) String params); } diff --git a/src/main/java/org/influxdb/querybuilder/Appender.java b/src/main/java/org/influxdb/querybuilder/Appender.java index 3dab5c02f..8c7e34bfd 100644 --- a/src/main/java/org/influxdb/querybuilder/Appender.java +++ b/src/main/java/org/influxdb/querybuilder/Appender.java @@ -62,6 +62,8 @@ public static StringBuilder appendValue(final Object value, final StringBuilder stringBuilder.append(')'); } else if (value instanceof Column) { appendName(((Column) value).getName(), stringBuilder); + } else if (value instanceof Placeholder) { + stringBuilder.append('$').append(((Placeholder) value).getName()); } else if (value instanceof String) { stringBuilder.append("'").append(value).append("'"); } else if (value != null) { diff --git a/src/main/java/org/influxdb/querybuilder/FunctionFactory.java b/src/main/java/org/influxdb/querybuilder/FunctionFactory.java index 19541c46a..ba5bfaba3 100644 --- a/src/main/java/org/influxdb/querybuilder/FunctionFactory.java +++ b/src/main/java/org/influxdb/querybuilder/FunctionFactory.java @@ -61,6 +61,10 @@ public static Object column(final String name) { return new Column(name); } + public static Object placeholder(final String name) { + return new Placeholder(name); + } + private static void convertToColumns(final Object... arguments) { for (int i = 0; i < arguments.length; i++) { arguments[i] = convertToColumn(arguments[i]); diff --git a/src/main/java/org/influxdb/querybuilder/Placeholder.java b/src/main/java/org/influxdb/querybuilder/Placeholder.java new file mode 100644 index 000000000..8b21cd880 --- /dev/null +++ b/src/main/java/org/influxdb/querybuilder/Placeholder.java @@ -0,0 +1,14 @@ +package org.influxdb.querybuilder; + +public class Placeholder { + + private final String name; + + Placeholder(final String name) { + this.name = name; + } + + public String getName() { + return name; + } +} diff --git a/src/test/java/org/influxdb/querybuilder/api/BuiltQueryTest.java b/src/test/java/org/influxdb/querybuilder/api/BuiltQueryTest.java index 2f9565add..1fcadfd74 100644 --- a/src/test/java/org/influxdb/querybuilder/api/BuiltQueryTest.java +++ b/src/test/java/org/influxdb/querybuilder/api/BuiltQueryTest.java @@ -10,10 +10,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import org.influxdb.dto.Query; +import org.influxdb.querybuilder.FunctionFactory; import org.influxdb.querybuilder.RawText; import org.influxdb.querybuilder.Where; import org.junit.jupiter.api.Test; +import org.junit.platform.runner.JUnitPlatform; +import org.junit.runner.RunWith; +@RunWith(JUnitPlatform.class) public class BuiltQueryTest { private static final String DATABASE = "testdb"; @@ -973,4 +977,12 @@ public void multipleDatabaseBackReferenceing() { assertEquals(query.getDatabase(), select.getDatabase()); } + @Test + public void testBoundParameters() { + Query query = select().column("a").from(DATABASE, "b") + .where(eq("c", FunctionFactory.placeholder("d"))).bindParameter("d", 3); + assertEquals("SELECT a FROM b WHERE c = $d;", query.getCommand()); + assertEquals(Query.encode("{\"d\":3}"), query.getParameterJsonWithUrlEncoded()); + assertEquals(DATABASE, query.getDatabase()); + } } From feb26abcd84953f7072b12dc17f83b89a37c6d65 Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Wed, 26 Mar 2025 09:06:32 +0100 Subject: [PATCH 192/200] [maven-release-plugin] prepare release influxdb-java-2.25 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2bfa0359a..b38781972 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.influxdb influxdb-java jar - 2.25-SNAPSHOT + 2.25 influxdb java bindings Java API to access the InfluxDB REST API http://www.influxdb.org @@ -24,7 +24,7 @@ scm:git:git@github.com:influxdata/influxdb-java.git scm:git:git@github.com:influxdata/influxdb-java.git git@github.com:influxdata/influxdb-java.git - HEAD + influxdb-java-2.25 From cf21d90d6132e500dd5845874c73adb0e32213d9 Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Wed, 26 Mar 2025 09:06:37 +0100 Subject: [PATCH 193/200] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b38781972..3d2b083d5 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.influxdb influxdb-java jar - 2.25 + 2.26-SNAPSHOT influxdb java bindings Java API to access the InfluxDB REST API http://www.influxdb.org From 3e40a7d43e3673724ebb6b2136cb53778c8d78ec Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Wed, 26 Mar 2025 09:20:26 +0100 Subject: [PATCH 194/200] docs: update CHANGELOG.md for version 2.25 Also fixed deploying the client into OSS repository by increasing timeout. --- CHANGELOG.md | 5 +++++ pom.xml | 1 + 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce4bebb29..0cdc03965 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 2.25 [2025-03-26] + +### Improvements +- Add support for parameter binding to built queries [PR #1010](https://github.com/influxdata/influxdb-java/pull/1010) + ## 2.24 [2023-12-14] ### Improvements diff --git a/pom.xml b/pom.xml index 3d2b083d5..4fa5111b3 100644 --- a/pom.xml +++ b/pom.xml @@ -165,6 +165,7 @@ ossrh https://oss.sonatype.org/ true + 15 From 508d2769e47c1745e0cd8ea57585bcabbedb30be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Mon, 4 Aug 2025 15:26:57 +0200 Subject: [PATCH 195/200] fix: migrate Maven OSS repository to Central Portal (#1013) --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 4fa5111b3..0f322990e 100644 --- a/pom.xml +++ b/pom.xml @@ -52,11 +52,11 @@ ossrh - https://oss.sonatype.org/content/repositories/snapshots + https://central.sonatype.com/repository/maven-snapshots ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ + https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/ @@ -163,7 +163,7 @@ true ossrh - https://oss.sonatype.org/ + https://ossrh-staging-api.central.sonatype.com/ true 15 From 738acd5e8eb813d16fa3e6e10bb22dc011d04e95 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Jan 2026 15:25:57 -0600 Subject: [PATCH 196/200] chore(deps): bump org.msgpack:msgpack-core from 0.9.8 to 0.9.11 (#1014) Bumps [org.msgpack:msgpack-core](https://github.com/msgpack/msgpack-java) from 0.9.8 to 0.9.11. - [Release notes](https://github.com/msgpack/msgpack-java/releases) - [Changelog](https://github.com/msgpack/msgpack-java/blob/main/RELEASE_NOTES.md) - [Commits](https://github.com/msgpack/msgpack-java/compare/v0.9.8...v0.9.11) --- updated-dependencies: - dependency-name: org.msgpack:msgpack-core dependency-version: 0.9.11 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0f322990e..4a5b3636a 100644 --- a/pom.xml +++ b/pom.xml @@ -309,7 +309,7 @@ org.msgpack msgpack-core - 0.9.8 + 0.9.11 From d30cbd2ee085915b1e5c234caee59e735671f285 Mon Sep 17 00:00:00 2001 From: Eran Leshem <1707552+eranl@users.noreply.github.com> Date: Mon, 26 Jan 2026 14:56:26 +0200 Subject: [PATCH 197/200] Support java records as measurement classes (#983) --- MANUAL.md | 20 +- pom.xml | 49 ++ .../java/org/influxdb/annotation/Exclude.java | 3 + .../org/influxdb/annotation/Measurement.java | 4 + .../influxdb/impl/InfluxDBResultMapper.java | 192 +++- .../impl/InfluxDBRecordResultMapperTest.java | 579 +++++++++++++ .../java/com/android/tools/r8/RecordTag.java | 9 + ...ndroidDesugaredRecordResultMapperTest.java | 819 ++++++++++++++++++ 8 files changed, 1631 insertions(+), 44 deletions(-) create mode 100644 src/test-jdk17/java/org/influxdb/impl/InfluxDBRecordResultMapperTest.java create mode 100644 src/test/java/com/android/tools/r8/RecordTag.java create mode 100644 src/test/java/org/influxdb/impl/InfluxDBAndroidDesugaredRecordResultMapperTest.java diff --git a/MANUAL.md b/MANUAL.md index 92b245b21..99e1248b5 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -323,7 +323,7 @@ public class Cpu { } ``` -2. Add @Measurement,@TimeColumn and @Column annotations (column names default to field names unless otherwise specified): +2. Add @Measurement, @TimeColumn and @Column annotations (column names default to field names unless otherwise specified): ```Java @Measurement(name = "cpu") @@ -364,6 +364,24 @@ public class Cpu { } ``` +Or (if you're on JDK14+ and/or [Android SDK34+](https://android-developers.googleblog.com/2023/06/records-in-android-studio-flamingo.html)): + +```Java +@Measurement(name = "cpu", allFields = true) +public record Cpu( + @TimeColumn + Instant time, + @Column(name = "host", tag = true) + String hostname, + @Column(tag = true) + String region, + Double idle, + Boolean happydevop, + @Column(name = "uptimesecs") + Long uptimeSecs +) {} +``` + 3. Call _InfluxDBResultMapper.toPOJO(...)_ to map the QueryResult to your POJO: ```java diff --git a/pom.xml b/pom.xml index 4a5b3636a..338d236c6 100644 --- a/pom.xml +++ b/pom.xml @@ -84,6 +84,10 @@ 1.8 1.8 + + + -parameters + @@ -405,5 +409,50 @@ + + + java17 + + 17 + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + add-test-source + generate-test-sources + + add-test-source + + + + src/test-jdk17/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + true + + + 17 + 17 + + + -parameters + --add-opens=java.base/java.lang=ALL-UNNAMED + --add-opens=java.base/java.util=ALL-UNNAMED + + + + + + diff --git a/src/main/java/org/influxdb/annotation/Exclude.java b/src/main/java/org/influxdb/annotation/Exclude.java index 01e6f52e6..23e076797 100644 --- a/src/main/java/org/influxdb/annotation/Exclude.java +++ b/src/main/java/org/influxdb/annotation/Exclude.java @@ -28,6 +28,9 @@ /** * When a POJO annotated with {@code @Measurement(allFields = true)} is loaded or saved, * this annotation can be used to exclude some of its fields. + *

+ * Note: this is not considered when loading record measurements. + * * @see Measurement#allFields() * * @author Eran Leshem diff --git a/src/main/java/org/influxdb/annotation/Measurement.java b/src/main/java/org/influxdb/annotation/Measurement.java index fa9d19fd5..6ea8142e0 100644 --- a/src/main/java/org/influxdb/annotation/Measurement.java +++ b/src/main/java/org/influxdb/annotation/Measurement.java @@ -44,6 +44,10 @@ /** * If {@code true}, then all non-static fields of this measurement will be loaded or saved, * regardless of any {@code @Column} annotations. + *

+ * Note: When loading record measurements, this is always implied to be true, + * since the record's canonical constructor is used to populate the record. + * * @see Exclude */ boolean allFields() default false; diff --git a/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java b/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java index 5a4d3af85..2cfdeced7 100644 --- a/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java +++ b/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java @@ -26,21 +26,29 @@ import org.influxdb.annotation.Measurement; import org.influxdb.dto.QueryResult; +import java.lang.reflect.Constructor; import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; +import java.lang.reflect.Parameter; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.time.Instant; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; import java.time.temporal.ChronoField; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; import java.util.LinkedList; import java.util.List; +import java.util.Map; import java.util.Map.Entry; import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; /** * Main class responsible for mapping a QueryResult to a POJO. @@ -59,12 +67,26 @@ private static class ClassInfo { private static final ConcurrentMap CLASS_INFO_CACHE = new ConcurrentHashMap<>(); + /** + * Data structure used to cache records used as measurements. + */ + private static class RecordInfo { + Constructor constructor; + ConcurrentMap constructorParamIndexes; + } + private static final + ConcurrentMap RECORD_INFO = new ConcurrentHashMap<>(); + private static final int FRACTION_MIN_WIDTH = 0; private static final int FRACTION_MAX_WIDTH = 9; private static final boolean ADD_DECIMAL_POINT = true; + // Support both standard and Android desugared records + private static final Collection RECORD_CLASS_NAMES = + new HashSet<>(Arrays.asList("java.lang.Record", "com.android.tools.r8.RecordTag")); + /** - * When a query is executed without {@link TimeUnit}, InfluxDB returns the time + * When a query is executed without {@link TimeUnit}, InfluxDB returns the {@code time} * column as a RFC3339 date. */ private static final DateTimeFormatter RFC3339_FORMATTER = new DateTimeFormatterBuilder() @@ -88,7 +110,7 @@ private static class ClassInfo { * same order as received from InfluxDB. * * @throws InfluxDBMapperException If {@link QueryResult} parameter contain errors, - * clazz parameter is not annotated with @Measurement or it was not + * {@code clazz} parameter is not annotated with @Measurement or it was not * possible to define the values of your POJO (e.g. due to an unsupported field type). */ public List toPOJO(final QueryResult queryResult, final Class clazz) throws InfluxDBMapperException { @@ -111,7 +133,7 @@ public List toPOJO(final QueryResult queryResult, final Class clazz) t * same order as received from InfluxDB. * * @throws InfluxDBMapperException If {@link QueryResult} parameter contain errors, - * clazz parameter is not annotated with @Measurement or it was not + * {@code clazz} parameter is not annotated with @Measurement or it was not * possible to define the values of your POJO (e.g. due to an unsupported field type). */ public List toPOJO(final QueryResult queryResult, final Class clazz, @@ -137,7 +159,7 @@ public List toPOJO(final QueryResult queryResult, final Class clazz, * same order as received from InfluxDB. * * @throws InfluxDBMapperException If {@link QueryResult} parameter contain errors, - * clazz parameter is not annotated with @Measurement or it was not + * {@code clazz} parameter is not annotated with @Measurement or it was not * possible to define the values of your POJO (e.g. due to an unsupported field type). */ public List toPOJO(final QueryResult queryResult, final Class clazz, final String measurementName) @@ -162,7 +184,7 @@ public List toPOJO(final QueryResult queryResult, final Class clazz, f * same order as received from InfluxDB. * * @throws InfluxDBMapperException If {@link QueryResult} parameter contain errors, - * clazz parameter is not annotated with @Measurement or it was not + * {@code clazz} parameter is not annotated with @Measurement or it was not * possible to define the values of your POJO (e.g. due to an unsupported field type). */ public List toPOJO(final QueryResult queryResult, final Class clazz, final String measurementName, @@ -174,19 +196,20 @@ public List toPOJO(final QueryResult queryResult, final Class clazz, f Objects.requireNonNull(clazz, "clazz"); throwExceptionIfResultWithError(queryResult); - cacheMeasurementClass(clazz); - List result = new LinkedList(); + if (isRecordClass(clazz)) { + cacheRecordClass(clazz); + } else { + cacheMeasurementClass(clazz); + } + + List result = new LinkedList<>(); queryResult.getResults().stream() .filter(internalResult -> Objects.nonNull(internalResult) && Objects.nonNull(internalResult.getSeries())) - .forEach(internalResult -> { - internalResult.getSeries().stream() - .filter(series -> series.getName().equals(measurementName)) - .forEachOrdered(series -> { - parseSeriesAs(series, clazz, result, precision); - }); - }); + .forEach(internalResult -> internalResult.getSeries().stream() + .filter(series -> series.getName().equals(measurementName)) + .forEachOrdered(series -> parseSeriesAs(series, clazz, result, precision))); return result; } @@ -253,6 +276,49 @@ void cacheMeasurementClass(final Class... classVarAgrs) { } } + static void cacheRecordClass(final Class clazz) { + if (RECORD_INFO.containsKey(clazz.getName())) { + return; + } + + Map components = Arrays.stream(clazz.getDeclaredFields()) + .filter(field -> !Modifier.isStatic(field.getModifiers())) + .collect(Collectors.toMap(Field::getName, Field::getGenericType)); + boolean found = false; + for (Constructor constructor : clazz.getDeclaredConstructors()) { + Parameter[] parameters = constructor.getParameters(); + Map parameterTypes = Arrays.stream(parameters) + .collect(Collectors.toMap(Parameter::getName, Parameter::getParameterizedType)); + if (!parameterTypes.equals(components)) { + continue; + } + + if (found) { + throw new InfluxDBMapperException(String.format( + "Multiple constructors match set of components for record %s", clazz.getName())); + } + + RecordInfo recordInfo = new RecordInfo(); + recordInfo.constructor = constructor; + + try { + ConcurrentMap constructorParamIndexes = new ConcurrentHashMap<>(parameters.length); + for (int i = 0; i < parameters.length; i++) { + Field field = clazz.getDeclaredField(parameters[i].getName()); + Column colAnnotation = field.getAnnotation(Column.class); + String propertyName = getFieldName(field, colAnnotation); + constructorParamIndexes.put(propertyName, i); + } + recordInfo.constructorParamIndexes = constructorParamIndexes; + } catch (NoSuchFieldException e) { + throw new InfluxDBMapperException(e); + } + + RECORD_INFO.putIfAbsent(clazz.getName(), recordInfo); + found = true; + } + } + private static String getFieldName(final Field field, final Column colAnnotation) { if (colAnnotation != null && !colAnnotation.name().isEmpty()) { return colAnnotation.name(); @@ -281,45 +347,86 @@ List parseSeriesAs(final QueryResult.Series series, final Class clazz, final TimeUnit precision) { int columnSize = series.getColumns().size(); - ClassInfo classInfo = CLASS_INFO_CACHE.get(clazz.getName()); - try { - T object = null; - for (List row : series.getValues()) { - for (int i = 0; i < columnSize; i++) { - Field correspondingField = classInfo.fieldMap.get(series.getColumns().get(i)/*InfluxDB columnName*/); - if (correspondingField != null) { - if (object == null) { - object = clazz.newInstance(); + if (isRecordClass(clazz)) { + RecordInfo recordInfo = RECORD_INFO.get(clazz.getName()); + try { + T object = null; + for (List row : series.getValues()) { + Object[] constructorParams = new Object[recordInfo.constructor.getParameterTypes().length]; + for (int i = 0; i < columnSize; i++) { + String columnName = series.getColumns().get(i); /*InfluxDB columnName*/ + addParam(clazz, precision, recordInfo, constructorParams, columnName, row.get(i)); + } + // When the "GROUP BY" clause is used, "tags" are returned as Map and + // accordingly with InfluxDB documentation + // https://docs.influxdata.com/influxdb/v1.2/concepts/glossary/#tag-value + // "tag" values are always String. + if (series.getTags() != null) { + for (Entry entry : series.getTags().entrySet()) { + addParam(clazz, precision, recordInfo, constructorParams, entry.getKey()/*InfluxDB columnName*/, + entry.getValue()); } - setFieldValue(object, correspondingField, row.get(i), precision, - classInfo.typeMappers.get(correspondingField)); } + + //noinspection unchecked + result.add((T) recordInfo.constructor.newInstance(constructorParams)); } - // When the "GROUP BY" clause is used, "tags" are returned as Map and - // accordingly with InfluxDB documentation - // https://docs.influxdata.com/influxdb/v1.2/concepts/glossary/#tag-value - // "tag" values are always String. - if (series.getTags() != null && !series.getTags().isEmpty()) { - for (Entry entry : series.getTags().entrySet()) { - Field correspondingField = classInfo.fieldMap.get(entry.getKey()/*InfluxDB columnName*/); + } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) { + throw new InfluxDBMapperException(e); + } + } else { + ClassInfo classInfo = CLASS_INFO_CACHE.get(clazz.getName()); + try { + T object = null; + for (List row : series.getValues()) { + for (int i = 0; i < columnSize; i++) { + Field correspondingField = classInfo.fieldMap.get(series.getColumns().get(i)/*InfluxDB columnName*/); if (correspondingField != null) { - // I don't think it is possible to reach here without a valid "object" - setFieldValue(object, correspondingField, entry.getValue(), precision, + if (object == null) { + object = clazz.newInstance(); + } + setFieldValue(object, correspondingField, row.get(i), precision, classInfo.typeMappers.get(correspondingField)); } } + // When the "GROUP BY" clause is used, "tags" are returned as Map and + // accordingly with InfluxDB documentation + // https://docs.influxdata.com/influxdb/v1.2/concepts/glossary/#tag-value + // "tag" values are always String. + if (series.getTags() != null && !series.getTags().isEmpty()) { + for (Entry entry : series.getTags().entrySet()) { + Field correspondingField = classInfo.fieldMap.get(entry.getKey()/*InfluxDB columnName*/); + if (correspondingField != null) { + // I don't think it is possible to reach here without a valid "object" + setFieldValue(object, correspondingField, entry.getValue(), precision, + classInfo.typeMappers.get(correspondingField)); + } + } + } + if (object != null) { + result.add(object); + object = null; + } } - if (object != null) { - result.add(object); - object = null; - } + } catch (InstantiationException | IllegalAccessException e) { + throw new InfluxDBMapperException(e); } - } catch (InstantiationException | IllegalAccessException e) { - throw new InfluxDBMapperException(e); } return result; } + private static void addParam(final Class clazz, final TimeUnit precision, final RecordInfo recordInfo, + final Object[] constructorParams, final String columnName, final Object value) { + Parameter parameter = recordInfo.constructor.getParameters() + [recordInfo.constructorParamIndexes.get(columnName).intValue()]; + constructorParams[recordInfo.constructorParamIndexes.get(columnName).intValue()] = + adaptValue(parameter.getType(), value, precision, parameter.getName(), clazz.getName()); + } + + private static boolean isRecordClass(final Class clazz) { + return RECORD_CLASS_NAMES.contains(clazz.getSuperclass().getName()); + } + /** * InfluxDB client returns any number as Double. * See ... @@ -350,7 +457,7 @@ private static Object adaptValue(final Class fieldType, final Object value, f return Instant.from(RFC3339_FORMATTER.parse(String.valueOf(value))); } if (value instanceof Long) { - return Instant.ofEpochMilli(toMillis((long) value, precision)); + return Instant.ofEpochMilli(toMillis(((Long) value).longValue(), precision)); } if (value instanceof Double) { return Instant.ofEpochMilli(toMillis(((Double) value).longValue(), precision)); @@ -379,8 +486,7 @@ private static Object adaptValue(final Class fieldType, final Object value, f } catch (ClassCastException e) { String msg = "Class '%s' field '%s' was defined with a different field type and caused a ClassCastException. " + "The correct type is '%s' (current field value: '%s')."; - throw new InfluxDBMapperException( - String.format(msg, className, fieldName, value.getClass().getName(), value)); + throw new InfluxDBMapperException(String.format(msg, className, fieldName, value.getClass().getName(), value), e); } throw new InfluxDBMapperException( diff --git a/src/test-jdk17/java/org/influxdb/impl/InfluxDBRecordResultMapperTest.java b/src/test-jdk17/java/org/influxdb/impl/InfluxDBRecordResultMapperTest.java new file mode 100644 index 000000000..c16fa24b0 --- /dev/null +++ b/src/test-jdk17/java/org/influxdb/impl/InfluxDBRecordResultMapperTest.java @@ -0,0 +1,579 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2017 azeti Networks AG () + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + * associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT + * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +package org.influxdb.impl; + +import org.influxdb.InfluxDBMapperException; +import org.influxdb.annotation.Column; +import org.influxdb.annotation.Measurement; +import org.influxdb.annotation.TimeColumn; +import org.influxdb.dto.QueryResult; +import org.junit.Assert; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.platform.runner.JUnitPlatform; +import org.junit.runner.RunWith; + +import java.time.Instant; +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +/** + * @author Eran Leshem + */ +@SuppressWarnings({"removal", "deprecation"}) +@RunWith(JUnitPlatform.class) +public class InfluxDBRecordResultMapperTest { + + private final InfluxDBResultMapper mapper = new InfluxDBResultMapper(); + + @Test + public void testToRecord_HappyPath() { + // Given... + var columnList = Arrays.asList("time", "uuid"); + List firstSeriesResult = Arrays.asList(Instant.now().toEpochMilli(), UUID.randomUUID().toString()); + + var series = new QueryResult.Series(); + series.setColumns(columnList); + series.setName("CustomMeasurement"); + series.setValues(List.of(firstSeriesResult)); + + var internalResult = new QueryResult.Result(); + internalResult.setSeries(List.of(series)); + + var queryResult = new QueryResult(); + queryResult.setResults(List.of(internalResult)); + + //When... + var myList = mapper.toPOJO(queryResult, MyCustomMeasurement.class); + + // Then... + Assertions.assertEquals(1, myList.size(), "there must be one entry in the result list"); + } + + @Test + public void testThrowExceptionIfMissingAnnotation() { + Assertions.assertThrows(IllegalArgumentException.class, () -> mapper.throwExceptionIfMissingAnnotation(String.class)); + } + + @Test + public void testThrowExceptionIfError_InfluxQueryResultHasError() { + var queryResult = new QueryResult(); + queryResult.setError("main queryresult error"); + + Assertions.assertThrows(InfluxDBMapperException.class, () -> mapper.throwExceptionIfResultWithError(queryResult)); + } + + @Test + public void testThrowExceptionIfError_InfluxQueryResultSeriesHasError() { + var seriesResult = new QueryResult.Result(); + seriesResult.setError("series error"); + + var queryResult = new QueryResult(); + queryResult.setResults(List.of(seriesResult)); + + Assertions.assertThrows(InfluxDBMapperException.class, () -> mapper.throwExceptionIfResultWithError(queryResult)); + } + + @Test + public void testGetMeasurementName_testStateMeasurement() { + Assertions.assertEquals("CustomMeasurement", mapper.getMeasurementName(MyCustomMeasurement.class)); + } + + @Test + public void testParseSeriesAs_testTwoValidSeries() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurement.class); + + var columnList = Arrays.asList("time", "uuid"); + + List firstSeriesResult = Arrays.asList(Instant.now().toEpochMilli(), UUID.randomUUID().toString()); + List secondSeriesResult = Arrays.asList(Instant.now().plusSeconds(1).toEpochMilli(), + UUID.randomUUID().toString()); + + var series = new QueryResult.Series(); + series.setColumns(columnList); + series.setValues(Arrays.asList(firstSeriesResult, secondSeriesResult)); + + //When... + List result = new LinkedList<>(); + mapper.parseSeriesAs(series, MyCustomMeasurement.class, result); + + //Then... + Assertions.assertTrue(result.size() == 2, "there must be two series in the result list"); + + Assertions.assertEquals(firstSeriesResult.get(0), result.get(0).time().toEpochMilli(), + "Field 'time' (1st series) is not valid"); + Assertions.assertEquals(firstSeriesResult.get(1), result.get(0).uuid(), "Field 'uuid' (1st series) is not valid"); + + Assertions.assertEquals(secondSeriesResult.get(0), result.get(1).time().toEpochMilli(), + "Field 'time' (2nd series) is not valid"); + Assertions.assertEquals(secondSeriesResult.get(1), result.get(1).uuid(), "Field 'uuid' (2nd series) is not valid"); + } + + @Test + public void testParseSeriesAs_testNonNullAndValidValues() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurementWithPrimitives.class); + + var columnList = Arrays.asList("time", "uuid", + "doubleObject", "longObject", "integerObject", + "doublePrimitive", "longPrimitive", "integerPrimitive", + "booleanObject", "booleanPrimitive"); + + // InfluxDB client returns the time representation as Double. + Double now = Long.valueOf(System.currentTimeMillis()).doubleValue(); + + // InfluxDB client returns any number as Double. + // See https://github.com/influxdata/influxdb-java/issues/153#issuecomment-259681987 + // for more information. + + var series = new QueryResult.Series(); + series.setColumns(columnList); + var uuidAsString = UUID.randomUUID().toString(); + List seriesResult = Arrays.asList(now, uuidAsString, + new Double("1.01"), new Double("2"), new Double("3"), + new Double("1.01"), new Double("4"), new Double("5"), + "false", "true"); + series.setValues(List.of(seriesResult)); + + //When... + List result = new LinkedList<>(); + mapper.parseSeriesAs(series, MyCustomMeasurementWithPrimitives.class, result); + + //Then... + var myObject = result.get(0); + Assertions.assertEquals(now.longValue(), myObject.time().toEpochMilli(), "field 'time' does not match"); + Assertions.assertEquals(uuidAsString, myObject.uuid(), "field 'uuid' does not match"); + + Assertions.assertEquals(asDouble(seriesResult.get(2)), myObject.doubleObject(), + "field 'doubleObject' does not match"); + Assertions.assertEquals(Long.valueOf(asDouble(seriesResult.get(3)).longValue()), myObject.longObject(), + "field 'longObject' does not match"); + Assertions.assertEquals(Integer.valueOf(asDouble(seriesResult.get(4)).intValue()), myObject.integerObject(), + "field 'integerObject' does not match"); + + Assertions.assertTrue( + Double.compare(asDouble(seriesResult.get(5)).doubleValue(), myObject.doublePrimitive()) == 0, + "field 'doublePrimitive' does not match"); + + Assertions.assertTrue(asDouble(seriesResult.get(6)).longValue() == myObject.longPrimitive(), + "field 'longPrimitive' does not match"); + + Assertions.assertTrue(asDouble(seriesResult.get(7)).intValue() == myObject.integerPrimitive(), + "field 'integerPrimitive' does not match"); + + Assertions.assertEquals( + Boolean.valueOf(String.valueOf(seriesResult.get(8))), myObject.booleanObject(), + "field 'booleanObject' does not match"); + + Assertions.assertEquals( + Boolean.valueOf(String.valueOf(seriesResult.get(9))).booleanValue(), myObject.booleanPrimitive(), + "field 'booleanPrimitive' does not match"); + } + + private static Double asDouble(Object obj) { + return (Double) obj; + } + + @Test + public void testFieldValueModified_DateAsISO8601() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurement.class); + + var columnList = List.of("time"); + + var series = new QueryResult.Series(); + series.setColumns(columnList); + List firstSeriesResult = List.of("2017-06-19T09:29:45.655123Z"); + series.setValues(List.of(firstSeriesResult)); + + //When... + List result = new LinkedList<>(); + mapper.parseSeriesAs(series, MyCustomMeasurement.class, result); + + //Then... + Assertions.assertTrue(result.size() == 1); + } + + @Test + public void testFieldValueModified_DateAsInteger() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurement.class); + + var columnList = List.of("time"); + + var series = new QueryResult.Series(); + series.setColumns(columnList); + List firstSeriesResult = List.of(1_000); + series.setValues(List.of(firstSeriesResult)); + + //When... + List result = new LinkedList<>(); + mapper.parseSeriesAs(series, MyCustomMeasurement.class, result); + + //Then... + Assertions.assertTrue(result.size() == 1); + } + + @Test + public void testUnsupportedField() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyRecordWithUnsupportedField.class); + + var columnList = List.of("bar"); + + var series = new QueryResult.Series(); + series.setColumns(columnList); + List firstSeriesResult = List.of("content representing a Date"); + series.setValues(List.of(firstSeriesResult)); + + //When... + List result = new LinkedList<>(); + Assertions.assertThrows(InfluxDBMapperException.class, + () -> mapper.parseSeriesAs(series, MyRecordWithUnsupportedField.class, result)); + } + + /** + * for more information. + */ + @Test + public void testToRecord_SeriesFromQueryResultIsNull() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurement.class); + + var internalResult = new QueryResult.Result(); + internalResult.setSeries(null); + + var queryResult = new QueryResult(); + queryResult.setResults(List.of(internalResult)); + + // When... + var myList = mapper.toPOJO(queryResult, MyCustomMeasurement.class); + + // Then... + Assertions.assertTrue( myList.isEmpty(), "there must NO entry in the result list"); + } + + @Test + public void testToRecord_QueryResultCreatedByGroupByClause() { + // Given... + InfluxDBResultMapper.cacheRecordClass(GroupByCarrierDeviceOS.class); + + // InfluxDB client returns the time representation as Double. + Double now = Long.valueOf(System.currentTimeMillis()).doubleValue(); + + // When the "GROUP BY" clause is used, "tags" are returned as Map + Map firstSeriesTagMap = new HashMap<>(2); + firstSeriesTagMap.put("CARRIER", "000/00"); + firstSeriesTagMap.put("DEVICE_OS_VERSION", "4.4.2"); + + Map secondSeriesTagMap = new HashMap<>(2); + secondSeriesTagMap.put("CARRIER", "000/01"); + secondSeriesTagMap.put("DEVICE_OS_VERSION", "9.3.5"); + + var firstSeries = new QueryResult.Series(); + var columnList = Arrays.asList("time", "median", "min", "max"); + firstSeries.setColumns(columnList); + List firstSeriesResult = Arrays.asList(now, new Double("233.8"), new Double("0.0"), + new Double("3090744.0")); + firstSeries.setValues(List.of(firstSeriesResult)); + firstSeries.setTags(firstSeriesTagMap); + firstSeries.setName("tb_network"); + + var secondSeries = new QueryResult.Series(); + secondSeries.setColumns(columnList); + List secondSeriesResult = Arrays.asList(now, new Double("552.0"), new Double("135.0"), + new Double("267705.0")); + secondSeries.setValues(List.of(secondSeriesResult)); + secondSeries.setTags(secondSeriesTagMap); + secondSeries.setName("tb_network"); + + var internalResult = new QueryResult.Result(); + internalResult.setSeries(Arrays.asList(firstSeries, secondSeries)); + + var queryResult = new QueryResult(); + queryResult.setResults(List.of(internalResult)); + + // When... + var myList = mapper.toPOJO(queryResult, GroupByCarrierDeviceOS.class); + + // Then... + var firstGroupByEntry = myList.get(0); + Assertions.assertEquals("000/00", firstGroupByEntry.carrier(), "field 'carrier' does not match"); + Assertions.assertEquals("4.4.2", firstGroupByEntry.deviceOsVersion(), "field 'deviceOsVersion' does not match"); + + var secondGroupByEntry = myList.get(1); + Assertions.assertEquals("000/01", secondGroupByEntry.carrier(), "field 'carrier' does not match"); + Assertions.assertEquals("9.3.5", secondGroupByEntry.deviceOsVersion(), "field 'deviceOsVersion' does not match"); + } + + @Test + public void testToRecord_ticket363() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurement.class); + + var columnList = List.of("time"); + + var series = new QueryResult.Series(); + series.setColumns(columnList); + List firstSeriesResult = List.of("2000-01-01T00:00:00.000000001Z"); + series.setValues(List.of(firstSeriesResult)); + + // When... + List result = new LinkedList<>(); + mapper.parseSeriesAs(series, MyCustomMeasurement.class, result); + + // Then... + Assertions.assertEquals(1, result.size(), "incorrect number of elemets"); + Assertions.assertEquals(1, result.get(0).time().getNano(), "incorrect value for the nanoseconds field"); + } + + @Test + void testToRecord_Precision() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurement.class); + + var series = new QueryResult.Series(); + series.setName("CustomMeasurement"); + var columnList = List.of("time"); + series.setColumns(columnList); + List firstSeriesResult = List.of(1_500_000L); + series.setValues(List.of(firstSeriesResult)); + + var internalResult = new QueryResult.Result(); + internalResult.setSeries(List.of(series)); + + var queryResult = new QueryResult(); + queryResult.setResults(List.of(internalResult)); + + // When... + var result = mapper.toPOJO(queryResult, MyCustomMeasurement.class, TimeUnit.SECONDS); + + // Then... + Assertions.assertEquals(1, result.size(), "incorrect number of elements"); + Assertions.assertEquals(1_500_000_000L, result.get(0).time().toEpochMilli(), + "incorrect value for the millis field"); + } + + @Test + void testToRecord_SetMeasureName() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurement.class); + + var series = new QueryResult.Series(); + series.setName("MySeriesName"); + var columnList = List.of("uuid"); + series.setColumns(columnList); + List firstSeriesResult = Collections.singletonList(UUID.randomUUID().toString()); + series.setValues(List.of(firstSeriesResult)); + + var internalResult = new QueryResult.Result(); + internalResult.setSeries(List.of(series)); + + var queryResult = new QueryResult(); + queryResult.setResults(List.of(internalResult)); + + //When... + var result = + mapper.toPOJO(queryResult, MyCustomMeasurement.class, "MySeriesName"); + + //Then... + Assertions.assertTrue(result.size() == 1); + } + + @Test + public void testToRecord_HasTimeColumn() { + // Given... + InfluxDBResultMapper.cacheRecordClass(HasTimeColumnMeasurement.class); + + var columnList = List.of("time"); + + var series = new QueryResult.Series(); + series.setColumns(columnList); + List> valuesList = Arrays.asList( + List.of("2015-08-17T19:00:00-05:00"), // Chicago (UTC-5) + List.of("2015-08-17T19:00:00.000000001-05:00"), // Chicago (UTC-5) + List.of("2000-01-01T00:00:00-00:00"), + List.of("2000-01-02T00:00:00+00:00") + ); + series.setValues(valuesList); + + // When... + List result = new LinkedList<>(); + mapper.parseSeriesAs(series, HasTimeColumnMeasurement.class, result); + + // Then... + Assertions.assertEquals(4, result.size(), "incorrect number of elemets"); + // Note: RFC3339 timestamp with TZ from InfluxDB are parsed into an Instant (UTC) + Assertions.assertTrue(result.get(0).time().equals(Instant.parse("2015-08-18T00:00:00Z"))); + Assertions.assertTrue(result.get(1).time().equals(Instant.parse("2015-08-18T00:00:00.000000001Z"))); + // RFC3339 section 4.3 https://tools.ietf.org/html/rfc3339#section-4.3 + Assertions.assertTrue(result.get(2).time().equals(Instant.parse("2000-01-01T00:00:00Z"))); + Assertions.assertTrue(result.get(3).time().equals(Instant.parse("2000-01-02T00:00:00Z"))); + + } + + @Test + public void testToRecord_ticket573() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurement.class); + + var columnList = List.of("time"); + + var series = new QueryResult.Series(); + series.setColumns(columnList); + List> valuesList = Arrays.asList( + List.of("2015-08-17T19:00:00-05:00"), // Chicago (UTC-5) + List.of("2015-08-17T19:00:00.000000001-05:00"), // Chicago (UTC-5) + List.of("2000-01-01T00:00:00-00:00"), + List.of("2000-01-02T00:00:00+00:00") + ); + series.setValues(valuesList); + + // When... + List result = new LinkedList<>(); + mapper.parseSeriesAs(series, MyCustomMeasurement.class, result); + + // Then... + Assertions.assertEquals(4, result.size(), "incorrect number of elemets"); + // Note: RFC3339 timestamp with TZ from InfluxDB are parsed into an Instant (UTC) + Assertions.assertTrue(result.get(0).time().equals(Instant.parse("2015-08-18T00:00:00Z"))); + Assertions.assertTrue(result.get(1).time().equals(Instant.parse("2015-08-18T00:00:00.000000001Z"))); + // RFC3339 section 4.3 https://tools.ietf.org/html/rfc3339#section-4.3 + Assertions.assertTrue(result.get(2).time().equals(Instant.parse("2000-01-01T00:00:00Z"))); + Assertions.assertTrue(result.get(3).time().equals(Instant.parse("2000-01-02T00:00:00Z"))); + } + + @Test + public void testMultipleConstructors() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MultipleConstructors.class); + + var columnList = List.of("i", "s"); + + var series = new QueryResult.Series(); + series.setColumns(columnList); + List firstSeriesResult = List.of(9.0, "str"); + series.setValues(List.of(firstSeriesResult)); + + //When... + List result = new LinkedList<>(); + mapper.parseSeriesAs(series, MultipleConstructors.class, result); + + //Then... + Assertions.assertTrue(result.size() == 1); + + Assert.assertEquals(9, result.get(0).i()); + Assert.assertEquals("str", result.get(0).s()); + } + + @Test + public void testConflictingConstructors() { + Assert.assertThrows(InfluxDBMapperException.class, + () -> InfluxDBResultMapper.cacheRecordClass(ConflictingConstructors.class)); + } + + @Measurement(name = "HasTimeColumnMeasurement") + record HasTimeColumnMeasurement( + @TimeColumn + Instant time, + Integer value) {} + + @Measurement(name = "CustomMeasurement") + record MyCustomMeasurement( + Instant time, + String uuid, + Double doubleObject, + Long longObject, + Integer integerObject, + Boolean booleanObject, + + @SuppressWarnings("unused") + String nonColumn1, + + @SuppressWarnings("unused") + Random rnd) {} + + @Measurement(name = "CustomMeasurement") + record MyCustomMeasurementWithPrimitives( + Instant time, + String uuid, + Double doubleObject, + Long longObject, + Integer integerObject, + double doublePrimitive, + long longPrimitive, + int integerPrimitive, + Boolean booleanObject, + boolean booleanPrimitive, + + @SuppressWarnings("unused") + String nonColumn1, + + @SuppressWarnings("unused") + Random rnd) {} + + @Measurement(name = "foo") + record MyRecordWithUnsupportedField( + @Column(name = "bar") + Date myDate) {} + + /** + * Class created based on example from this issue + */ + @Measurement(name = "tb_network") + record GroupByCarrierDeviceOS( + Instant time, + + @Column(name = "CARRIER", tag = true) + String carrier, + + @Column(name = "DEVICE_OS_VERSION", tag = true) + String deviceOsVersion, + + Double median, + Double min, + Double max) {} + + record MultipleConstructors(int i, String s) { + MultipleConstructors(String i, String s) { + this(Integer.parseInt(i), s); + } + + MultipleConstructors(int i, String s, double d) { + this(i, s); + } + } + + record ConflictingConstructors(int i, String s) { + private ConflictingConstructors(String s, int i) { + this(i, s); + } + } +} diff --git a/src/test/java/com/android/tools/r8/RecordTag.java b/src/test/java/com/android/tools/r8/RecordTag.java new file mode 100644 index 000000000..51aacedbb --- /dev/null +++ b/src/test/java/com/android/tools/r8/RecordTag.java @@ -0,0 +1,9 @@ +package com.android.tools.r8; + +/** + * Simulates the super class of Android-desugared records. + * + * @author Eran Leshem + **/ +public class RecordTag { +} diff --git a/src/test/java/org/influxdb/impl/InfluxDBAndroidDesugaredRecordResultMapperTest.java b/src/test/java/org/influxdb/impl/InfluxDBAndroidDesugaredRecordResultMapperTest.java new file mode 100644 index 000000000..f1dc21dce --- /dev/null +++ b/src/test/java/org/influxdb/impl/InfluxDBAndroidDesugaredRecordResultMapperTest.java @@ -0,0 +1,819 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2017 azeti Networks AG () + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + * associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT + * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +package org.influxdb.impl; + +import com.android.tools.r8.RecordTag; +import org.influxdb.InfluxDBMapperException; +import org.influxdb.annotation.Column; +import org.influxdb.annotation.Measurement; +import org.influxdb.annotation.TimeColumn; +import org.influxdb.dto.QueryResult; +import org.junit.Assert; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.platform.runner.JUnitPlatform; +import org.junit.runner.RunWith; + +import java.time.Instant; +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +/** + * Test measurement classes simulate Android desugared records. + * + * @author Eran Leshem + */ +@SuppressWarnings({"removal", "deprecation"}) +@RunWith(JUnitPlatform.class) +public class InfluxDBAndroidDesugaredRecordResultMapperTest { + + private final InfluxDBResultMapper mapper = new InfluxDBResultMapper(); + + @Test + public void testToRecord_HappyPath() { + // Given... + List columnList = Arrays.asList("time", "uuid"); + List firstSeriesResult = Arrays.asList(Instant.now().toEpochMilli(), UUID.randomUUID().toString()); + + QueryResult.Series series = new QueryResult.Series(); + series.setColumns(columnList); + series.setName("CustomMeasurement"); + series.setValues(Arrays.asList(firstSeriesResult)); + + QueryResult.Result internalResult = new QueryResult.Result(); + internalResult.setSeries(Arrays.asList(series)); + + QueryResult queryResult = new QueryResult(); + queryResult.setResults(Arrays.asList(internalResult)); + + //When... + List myList = mapper.toPOJO(queryResult, MyCustomMeasurement.class); + + // Then... + Assertions.assertEquals(1, myList.size(), "there must be one entry in the result list"); + } + + @Test + public void testThrowExceptionIfMissingAnnotation() { + Assertions.assertThrows(IllegalArgumentException.class, + () -> mapper.throwExceptionIfMissingAnnotation(String.class)); + } + + @Test + public void testThrowExceptionIfError_InfluxQueryResultHasError() { + QueryResult queryResult = new QueryResult(); + queryResult.setError("main queryresult error"); + + Assertions.assertThrows(InfluxDBMapperException.class, () -> mapper.throwExceptionIfResultWithError(queryResult)); + } + + @Test + public void testThrowExceptionIfError_InfluxQueryResultSeriesHasError() { + QueryResult.Result seriesResult = new QueryResult.Result(); + seriesResult.setError("series error"); + + QueryResult queryResult = new QueryResult(); + queryResult.setResults(Arrays.asList(seriesResult)); + + Assertions.assertThrows(InfluxDBMapperException.class, () -> mapper.throwExceptionIfResultWithError(queryResult)); + } + + @Test + public void testGetMeasurementName_testStateMeasurement() { + Assertions.assertEquals("CustomMeasurement", mapper.getMeasurementName(MyCustomMeasurement.class)); + } + + @Test + public void testParseSeriesAs_testTwoValidSeries() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurement.class); + + List columnList = Arrays.asList("time", "uuid"); + + List firstSeriesResult = Arrays.asList(Instant.now().toEpochMilli(), UUID.randomUUID().toString()); + List secondSeriesResult = Arrays.asList(Instant.now().plusSeconds(1).toEpochMilli(), + UUID.randomUUID().toString()); + + QueryResult.Series series = new QueryResult.Series(); + series.setColumns(columnList); + series.setValues(Arrays.asList(firstSeriesResult, secondSeriesResult)); + + //When... + List result = new LinkedList<>(); + mapper.parseSeriesAs(series, MyCustomMeasurement.class, result); + + //Then... + Assertions.assertTrue(result.size() == 2, "there must be two series in the result list"); + + Assertions.assertEquals(firstSeriesResult.get(0), result.get(0).time().toEpochMilli(), + "Field 'time' (1st series) is not valid"); + Assertions.assertEquals(firstSeriesResult.get(1), result.get(0).uuid(), "Field 'uuid' (1st series) is not valid"); + + Assertions.assertEquals(secondSeriesResult.get(0), result.get(1).time().toEpochMilli(), + "Field 'time' (2nd series) is not valid"); + Assertions.assertEquals(secondSeriesResult.get(1), result.get(1).uuid(), "Field 'uuid' (2nd series) is not valid"); + } + + @Test + public void testParseSeriesAs_testNonNullAndValidValues() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurementWithPrimitives.class); + + List columnList = Arrays.asList("time", "uuid", + "doubleObject", "longObject", "integerObject", + "doublePrimitive", "longPrimitive", "integerPrimitive", + "booleanObject", "booleanPrimitive"); + + // InfluxDB client returns the time representation as Double. + Double now = Long.valueOf(System.currentTimeMillis()).doubleValue(); + + // InfluxDB client returns any number as Double. + // See https://github.com/influxdata/influxdb-java/issues/153#issuecomment-259681987 + // for more information. + + QueryResult.Series series = new QueryResult.Series(); + series.setColumns(columnList); + String uuidAsString = UUID.randomUUID().toString(); + List seriesResult = Arrays.asList(now, uuidAsString, + new Double("1.01"), new Double("2"), new Double("3"), + new Double("1.01"), new Double("4"), new Double("5"), + "false", "true"); + series.setValues(Arrays.asList(seriesResult)); + + //When... + List result = new LinkedList<>(); + mapper.parseSeriesAs(series, MyCustomMeasurementWithPrimitives.class, result); + + //Then... + MyCustomMeasurementWithPrimitives myObject = result.get(0); + Assertions.assertEquals(now.longValue(), myObject.time().toEpochMilli(), "field 'time' does not match"); + Assertions.assertEquals(uuidAsString, myObject.uuid(), "field 'uuid' does not match"); + + Assertions.assertEquals(asDouble(seriesResult.get(2)), myObject.doubleObject(), + "field 'doubleObject' does not match"); + Assertions.assertEquals(Long.valueOf(asDouble(seriesResult.get(3)).longValue()), myObject.longObject(), + "field 'longObject' does not match"); + Assertions.assertEquals(Integer.valueOf(asDouble(seriesResult.get(4)).intValue()), myObject.integerObject(), + "field 'integerObject' does not match"); + + Assertions.assertTrue( + Double.compare(asDouble(seriesResult.get(5)).doubleValue(), myObject.doublePrimitive()) == 0, + "field 'doublePrimitive' does not match"); + + Assertions.assertTrue(asDouble(seriesResult.get(6)).longValue() == myObject.longPrimitive(), + "field 'longPrimitive' does not match"); + + Assertions.assertTrue(asDouble(seriesResult.get(7)).intValue() == myObject.integerPrimitive(), + "field 'integerPrimitive' does not match"); + + Assertions.assertEquals( + Boolean.valueOf(String.valueOf(seriesResult.get(8))), myObject.booleanObject(), + "field 'booleanObject' does not match"); + + Assertions.assertEquals( + Boolean.valueOf(String.valueOf(seriesResult.get(9))).booleanValue(), myObject.booleanPrimitive(), + "field 'booleanPrimitive' does not match"); + } + + private static Double asDouble(Object obj) { + return (Double) obj; + } + + @Test + public void testFieldValueModified_DateAsISO8601() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurement.class); + + List columnList = Arrays.asList("time"); + + QueryResult.Series series = new QueryResult.Series(); + series.setColumns(columnList); + List firstSeriesResult = Arrays.asList("2017-06-19T09:29:45.655123Z"); + series.setValues(Arrays.asList(firstSeriesResult)); + + //When... + List result = new LinkedList<>(); + mapper.parseSeriesAs(series, MyCustomMeasurement.class, result); + + //Then... + Assertions.assertTrue(result.size() == 1); + } + + @Test + public void testFieldValueModified_DateAsInteger() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurement.class); + + List columnList = Arrays.asList("time"); + + QueryResult.Series series = new QueryResult.Series(); + series.setColumns(columnList); + List firstSeriesResult = Arrays.asList(1_000); + series.setValues(Arrays.asList(firstSeriesResult)); + + //When... + List result = new LinkedList<>(); + mapper.parseSeriesAs(series, MyCustomMeasurement.class, result); + + //Then... + Assertions.assertTrue(result.size() == 1); + } + + @Test + public void testUnsupportedField() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyRecordWithUnsupportedField.class); + + List columnList = Arrays.asList("bar"); + + QueryResult.Series series = new QueryResult.Series(); + series.setColumns(columnList); + List firstSeriesResult = Arrays.asList("content representing a Date"); + series.setValues(Arrays.asList(firstSeriesResult)); + + //When... + List result = new LinkedList<>(); + Assertions.assertThrows(InfluxDBMapperException.class, + () -> mapper.parseSeriesAs(series, MyRecordWithUnsupportedField.class, result)); + } + + /** + * for more information. + */ + @Test + public void testToRecord_SeriesFromQueryResultIsNull() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurement.class); + + QueryResult.Result internalResult = new QueryResult.Result(); + internalResult.setSeries(null); + + QueryResult queryResult = new QueryResult(); + queryResult.setResults(Arrays.asList(internalResult)); + + // When... + List myList = mapper.toPOJO(queryResult, MyCustomMeasurement.class); + + // Then... + Assertions.assertTrue(myList.isEmpty(), "there must NO entry in the result list"); + } + + @Test + public void testToRecord_QueryResultCreatedByGroupByClause() { + // Given... + InfluxDBResultMapper.cacheRecordClass(GroupByCarrierDeviceOS.class); + + // InfluxDB client returns the time representation as Double. + Double now = Long.valueOf(System.currentTimeMillis()).doubleValue(); + + // When the "GROUP BY" clause is used, "tags" are returned as Map + Map firstSeriesTagMap = new HashMap<>(2); + firstSeriesTagMap.put("CARRIER", "000/00"); + firstSeriesTagMap.put("DEVICE_OS_VERSION", "4.4.2"); + + Map secondSeriesTagMap = new HashMap<>(2); + secondSeriesTagMap.put("CARRIER", "000/01"); + secondSeriesTagMap.put("DEVICE_OS_VERSION", "9.3.5"); + + QueryResult.Series firstSeries = new QueryResult.Series(); + List columnList = Arrays.asList("time", "median", "min", "max"); + firstSeries.setColumns(columnList); + List firstSeriesResult = Arrays.asList(now, new Double("233.8"), new Double("0.0"), + new Double("3090744.0")); + firstSeries.setValues(Arrays.asList(firstSeriesResult)); + firstSeries.setTags(firstSeriesTagMap); + firstSeries.setName("tb_network"); + + QueryResult.Series secondSeries = new QueryResult.Series(); + secondSeries.setColumns(columnList); + List secondSeriesResult = Arrays.asList(now, new Double("552.0"), new Double("135.0"), + new Double("267705.0")); + secondSeries.setValues(Arrays.asList(secondSeriesResult)); + secondSeries.setTags(secondSeriesTagMap); + secondSeries.setName("tb_network"); + + QueryResult.Result internalResult = new QueryResult.Result(); + internalResult.setSeries(Arrays.asList(firstSeries, secondSeries)); + + QueryResult queryResult = new QueryResult(); + queryResult.setResults(Arrays.asList(internalResult)); + + // When... + List myList = mapper.toPOJO(queryResult, GroupByCarrierDeviceOS.class); + + // Then... + GroupByCarrierDeviceOS firstGroupByEntry = myList.get(0); + Assertions.assertEquals("000/00", firstGroupByEntry.carrier(), "field 'carrier' does not match"); + Assertions.assertEquals("4.4.2", firstGroupByEntry.deviceOsVersion(), "field 'deviceOsVersion' does not match"); + + GroupByCarrierDeviceOS secondGroupByEntry = myList.get(1); + Assertions.assertEquals("000/01", secondGroupByEntry.carrier(), "field 'carrier' does not match"); + Assertions.assertEquals("9.3.5", secondGroupByEntry.deviceOsVersion(), "field 'deviceOsVersion' does not match"); + } + + @Test + public void testToRecord_ticket363() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurement.class); + + List columnList = Arrays.asList("time"); + + QueryResult.Series series = new QueryResult.Series(); + series.setColumns(columnList); + List firstSeriesResult = Arrays.asList("2000-01-01T00:00:00.000000001Z"); + series.setValues(Arrays.asList(firstSeriesResult)); + + // When... + List result = new LinkedList<>(); + mapper.parseSeriesAs(series, MyCustomMeasurement.class, result); + + // Then... + Assertions.assertEquals(1, result.size(), "incorrect number of elemets"); + Assertions.assertEquals(1, result.get(0).time().getNano(), "incorrect value for the nanoseconds field"); + } + + @Test + void testToRecord_Precision() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurement.class); + + QueryResult.Series series = new QueryResult.Series(); + series.setName("CustomMeasurement"); + List columnList = Arrays.asList("time"); + series.setColumns(columnList); + List firstSeriesResult = Arrays.asList(1_500_000L); + series.setValues(Arrays.asList(firstSeriesResult)); + + QueryResult.Result internalResult = new QueryResult.Result(); + internalResult.setSeries(Arrays.asList(series)); + + QueryResult queryResult = new QueryResult(); + queryResult.setResults(Arrays.asList(internalResult)); + + // When... + List result = mapper.toPOJO(queryResult, MyCustomMeasurement.class, TimeUnit.SECONDS); + + // Then... + Assertions.assertEquals(1, result.size(), "incorrect number of elements"); + Assertions.assertEquals(1_500_000_000L, result.get(0).time().toEpochMilli(), + "incorrect value for the millis field"); + } + + @Test + void testToRecord_SetMeasureName() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurement.class); + + QueryResult.Series series = new QueryResult.Series(); + series.setName("MySeriesName"); + List columnList = Arrays.asList("uuid"); + series.setColumns(columnList); + List firstSeriesResult = Collections.singletonList(UUID.randomUUID().toString()); + series.setValues(Arrays.asList(firstSeriesResult)); + + QueryResult.Result internalResult = new QueryResult.Result(); + internalResult.setSeries(Arrays.asList(series)); + + QueryResult queryResult = new QueryResult(); + queryResult.setResults(Arrays.asList(internalResult)); + + //When... + List result = + mapper.toPOJO(queryResult, MyCustomMeasurement.class, "MySeriesName"); + + //Then... + Assertions.assertTrue(result.size() == 1); + } + + @Test + public void testToRecord_HasTimeColumn() { + // Given... + InfluxDBResultMapper.cacheRecordClass(HasTimeColumnMeasurement.class); + + List columnList = Arrays.asList("time"); + + QueryResult.Series series = new QueryResult.Series(); + series.setColumns(columnList); + List> valuesList = Arrays.asList( + Arrays.asList("2015-08-17T19:00:00-05:00"), // Chicago (UTC-5) + Arrays.asList("2015-08-17T19:00:00.000000001-05:00"), // Chicago (UTC-5) + Arrays.asList("2000-01-01T00:00:00-00:00"), + Arrays.asList("2000-01-02T00:00:00+00:00") + ); + series.setValues(valuesList); + + // When... + List result = new LinkedList<>(); + mapper.parseSeriesAs(series, HasTimeColumnMeasurement.class, result); + + // Then... + Assertions.assertEquals(4, result.size(), "incorrect number of elemets"); + // Note: RFC3339 timestamp with TZ from InfluxDB are parsed into an Instant (UTC) + Assertions.assertTrue(result.get(0).time().equals(Instant.parse("2015-08-18T00:00:00Z"))); + Assertions.assertTrue(result.get(1).time().equals(Instant.parse("2015-08-18T00:00:00.000000001Z"))); + // RFC3339 section 4.3 https://tools.ietf.org/html/rfc3339#section-4.3 + Assertions.assertTrue(result.get(2).time().equals(Instant.parse("2000-01-01T00:00:00Z"))); + Assertions.assertTrue(result.get(3).time().equals(Instant.parse("2000-01-02T00:00:00Z"))); + + } + + @Test + public void testToRecord_ticket573() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MyCustomMeasurement.class); + + List columnList = Arrays.asList("time"); + + QueryResult.Series series = new QueryResult.Series(); + series.setColumns(columnList); + List> valuesList = Arrays.asList( + Arrays.asList("2015-08-17T19:00:00-05:00"), // Chicago (UTC-5) + Arrays.asList("2015-08-17T19:00:00.000000001-05:00"), // Chicago (UTC-5) + Arrays.asList("2000-01-01T00:00:00-00:00"), + Arrays.asList("2000-01-02T00:00:00+00:00") + ); + series.setValues(valuesList); + + // When... + List result = new LinkedList<>(); + mapper.parseSeriesAs(series, MyCustomMeasurement.class, result); + + // Then... + Assertions.assertEquals(4, result.size(), "incorrect number of elemets"); + // Note: RFC3339 timestamp with TZ from InfluxDB are parsed into an Instant (UTC) + Assertions.assertTrue(result.get(0).time().equals(Instant.parse("2015-08-18T00:00:00Z"))); + Assertions.assertTrue(result.get(1).time().equals(Instant.parse("2015-08-18T00:00:00.000000001Z"))); + // RFC3339 section 4.3 https://tools.ietf.org/html/rfc3339#section-4.3 + Assertions.assertTrue(result.get(2).time().equals(Instant.parse("2000-01-01T00:00:00Z"))); + Assertions.assertTrue(result.get(3).time().equals(Instant.parse("2000-01-02T00:00:00Z"))); + } + + @Test + public void testMultipleConstructors() { + // Given... + InfluxDBResultMapper.cacheRecordClass(MultipleConstructors.class); + + List columnList = Arrays.asList("i", "s"); + + QueryResult.Series series = new QueryResult.Series(); + series.setColumns(columnList); + List firstSeriesResult = Arrays.asList(9.0, "str"); + series.setValues(Arrays.asList(firstSeriesResult)); + + //When... + List result = new LinkedList<>(); + mapper.parseSeriesAs(series, MultipleConstructors.class, result); + + //Then... + Assertions.assertTrue(result.size() == 1); + + Assert.assertEquals(9, result.get(0).i()); + Assert.assertEquals("str", result.get(0).s()); + } + + @Test + public void testConflictingConstructors() { + Assert.assertThrows(InfluxDBMapperException.class, + () -> InfluxDBResultMapper.cacheRecordClass(ConflictingConstructors.class)); + } + + @Measurement(name = "HasTimeColumnMeasurement") + static final class HasTimeColumnMeasurement extends RecordTag { + @TimeColumn + private final Instant time; + private final Integer value; + + HasTimeColumnMeasurement(Instant time, Integer value) { + this.time = time; + this.value = value; + } + + public Instant time() { + return time; + } + + public Integer value() { + return value; + } + } + + @Measurement(name = "CustomMeasurement") + static final class MyCustomMeasurement extends RecordTag { + private final Instant time; + private final String uuid; + private final Double doubleObject; + private final Long longObject; + private final Integer integerObject; + private final Boolean booleanObject; + + @SuppressWarnings("unused") + private final String nonColumn1; + + @SuppressWarnings("unused") + private final Random rnd; + + MyCustomMeasurement( + Instant time, + String uuid, + Double doubleObject, + Long longObject, + Integer integerObject, + Boolean booleanObject, + + @SuppressWarnings("unused") + String nonColumn1, + + @SuppressWarnings("unused") + Random rnd) { + this.time = time; + this.uuid = uuid; + this.doubleObject = doubleObject; + this.longObject = longObject; + this.integerObject = integerObject; + this.booleanObject = booleanObject; + this.nonColumn1 = nonColumn1; + this.rnd = rnd; + } + + public Instant time() { + return time; + } + + public String uuid() { + return uuid; + } + + public Double doubleObject() { + return doubleObject; + } + + public Long longObject() { + return longObject; + } + + public Integer integerObject() { + return integerObject; + } + + public Boolean booleanObject() { + return booleanObject; + } + + @SuppressWarnings("unused") + public String nonColumn1() { + return nonColumn1; + } + + @SuppressWarnings("unused") + public Random rnd() { + return rnd; + } + } + + @Measurement(name = "CustomMeasurement") + static final class MyCustomMeasurementWithPrimitives extends RecordTag { + private final Instant time; + private final String uuid; + private final Double doubleObject; + private final Long longObject; + private final Integer integerObject; + private final double doublePrimitive; + private final long longPrimitive; + private final int integerPrimitive; + private final Boolean booleanObject; + private final boolean booleanPrimitive; + + @SuppressWarnings("unused") + private final String nonColumn1; + + @SuppressWarnings("unused") + private final Random rnd; + + MyCustomMeasurementWithPrimitives( + Instant time, + String uuid, + Double doubleObject, + Long longObject, + Integer integerObject, + double doublePrimitive, + long longPrimitive, + int integerPrimitive, + Boolean booleanObject, + boolean booleanPrimitive, + + @SuppressWarnings("unused") + String nonColumn1, + + @SuppressWarnings("unused") + Random rnd) { + this.time = time; + this.uuid = uuid; + this.doubleObject = doubleObject; + this.longObject = longObject; + this.integerObject = integerObject; + this.doublePrimitive = doublePrimitive; + this.longPrimitive = longPrimitive; + this.integerPrimitive = integerPrimitive; + this.booleanObject = booleanObject; + this.booleanPrimitive = booleanPrimitive; + this.nonColumn1 = nonColumn1; + this.rnd = rnd; + } + + public Instant time() { + return time; + } + + public String uuid() { + return uuid; + } + + public Double doubleObject() { + return doubleObject; + } + + public Long longObject() { + return longObject; + } + + public Integer integerObject() { + return integerObject; + } + + public double doublePrimitive() { + return doublePrimitive; + } + + public long longPrimitive() { + return longPrimitive; + } + + public int integerPrimitive() { + return integerPrimitive; + } + + public Boolean booleanObject() { + return booleanObject; + } + + public boolean booleanPrimitive() { + return booleanPrimitive; + } + + @SuppressWarnings("unused") + public String nonColumn1() { + return nonColumn1; + } + + @SuppressWarnings("unused") + public Random rnd() { + return rnd; + } + } + + @Measurement(name = "foo") + static final class MyRecordWithUnsupportedField extends RecordTag { + @Column(name = "bar") + private final Date myDate; + + MyRecordWithUnsupportedField(Date myDate) { + this.myDate = myDate; + } + + public Date myDate() { + return myDate; + } + } + + /** + * Class created based on example from this issue + */ + @Measurement(name = "tb_network") + static final class GroupByCarrierDeviceOS extends RecordTag { + private final Instant time; + + @Column(name = "CARRIER", tag = true) + private final String carrier; + + @Column(name = "DEVICE_OS_VERSION", tag = true) + private final String deviceOsVersion; + + private final Double median; + private final Double min; + private final Double max; + + GroupByCarrierDeviceOS( + Instant time, + String carrier, + String deviceOsVersion, + Double median, + Double min, + Double max) { + this.time = time; + this.carrier = carrier; + this.deviceOsVersion = deviceOsVersion; + this.median = median; + this.min = min; + this.max = max; + } + + public Instant time() { + return time; + } + + public String carrier() { + return carrier; + } + + public String deviceOsVersion() { + return deviceOsVersion; + } + + public Double median() { + return median; + } + + public Double min() { + return min; + } + + public Double max() { + return max; + } + } + + static final class MultipleConstructors extends RecordTag { + private final int i; + private final String s; + + MultipleConstructors(int i, String s) { + this.i = i; + this.s = s; + } + + MultipleConstructors(String i, String s) { + this(Integer.parseInt(i), s); + } + + MultipleConstructors(int i, String s, double d) { + this(i, s); + } + + int i() { + return i; + } + + String s() { + return s; + } + } + + + static final class ConflictingConstructors extends RecordTag { + private final int i; + private final String s; + + private ConflictingConstructors(int i, String s) { + this.i = i; + this.s = s; + } + + private ConflictingConstructors(String s, int i) { + this(i, s); + } + + public int i() { + return i; + } + + public String s() { + return s; + } + } +} \ No newline at end of file From 5cb61c79f87fdc7af83999c97bea434ab0af33cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Jan 2026 14:35:21 -0600 Subject: [PATCH 198/200] chore(deps-dev): bump org.assertj:assertj-core from 3.25.2 to 3.27.7 (#1018) Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.25.2 to 3.27.7. - [Release notes](https://github.com/assertj/assertj/releases) - [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.25.2...assertj-build-3.27.7) --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-version: 3.27.7 dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 338d236c6..7fca565f1 100644 --- a/pom.xml +++ b/pom.xml @@ -279,7 +279,7 @@ org.assertj assertj-core - 3.25.2 + 3.27.7 test From 455ee29387e20191ecc7bd51ef0b0d786527b527 Mon Sep 17 00:00:00 2001 From: Qiu Yucheng <2847117296@qq.com> Date: Thu, 26 Feb 2026 17:12:53 +0800 Subject: [PATCH 199/200] fix(Point): prevent ThreadLocal memory leak in StringBuilder (#1019) (#1020) Introduced a maximum capacity threshold (64KB) for the cached StringBuilder. If the capacity exceeds this threshold, the StringBuilder is discarded and replaced to prevent Old Gen exhaustion in long-lived threads. Co-authored-by: qiuyucheng --- src/main/java/org/influxdb/dto/Point.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/influxdb/dto/Point.java b/src/main/java/org/influxdb/dto/Point.java index 277ce4c99..1663913dc 100755 --- a/src/main/java/org/influxdb/dto/Point.java +++ b/src/main/java/org/influxdb/dto/Point.java @@ -50,6 +50,7 @@ public class Point { }); private static final int DEFAULT_STRING_BUILDER_SIZE = 1024; + private static final int MAX_STRING_BUILDER_SIZE = 64 * 1024; private static final ThreadLocal CACHED_STRINGBUILDERS = ThreadLocal.withInitial(() -> new StringBuilder(DEFAULT_STRING_BUILDER_SIZE)); @@ -554,7 +555,12 @@ public String lineProtocol(final TimeUnit precision) { // setLength(0) is used for reusing cached StringBuilder instance per thread // it reduces GC activity and performs better then new StringBuilder() StringBuilder sb = CACHED_STRINGBUILDERS.get(); - sb.setLength(0); + if (sb.capacity() > MAX_STRING_BUILDER_SIZE) { + sb = new StringBuilder(DEFAULT_STRING_BUILDER_SIZE); + CACHED_STRINGBUILDERS.set(sb); + } else { + sb.setLength(0); + } escapeKey(sb, measurement); concatenatedTags(sb); From 6d99c7ec34767839c5881e4da0015dafab437136 Mon Sep 17 00:00:00 2001 From: Eran Leshem <1707552+eranl@users.noreply.github.com> Date: Sun, 1 Mar 2026 16:48:38 +0200 Subject: [PATCH 200/200] Add build-helper-maven-plugin version (#1021) --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 7fca565f1..21ec65cf4 100644 --- a/pom.xml +++ b/pom.xml @@ -420,6 +420,7 @@ org.codehaus.mojo build-helper-maven-plugin + 3.3.0 add-test-source