From fbf080af871d0c57d9f17743ed58e83e20de0a05 Mon Sep 17 00:00:00 2001 From: Anindya Chatterjee Date: Mon, 19 Feb 2024 23:03:08 +0530 Subject: [PATCH 01/10] Squashed commit of the following: commit 75d82226f89bc022af2e2ba52fea5fcc52144a57 Author: Anindya Chatterjee Date: Mon Feb 19 23:02:09 2024 +0530 update workflow commit 69bd68aad973f1f046d5421273bdbe33888ab0b5 Author: Anindya Chatterjee Date: Mon Feb 19 22:55:20 2024 +0530 Update CHANGELOG.md commit 7b7f014afad979f9e74f840953009c4e9598f0ed Author: Anindya Chatterjee Date: Mon Feb 19 21:29:38 2024 +0530 Release 4.2.1 commit 9ec33075b7cf1ba13fdc80e6dca9d7c6276eafed Merge: 77c8d4c2 78130924 Author: Anindya Chatterjee Date: Mon Feb 19 21:13:25 2024 +0530 Merge branch 'develop' into release commit 78130924c94c8f4396938981bbc637aee2f45b91 Merge: 20a10eeb 029d5cfc Author: Anindya Chatterjee Date: Fri Feb 16 21:33:52 2024 +0530 Merge branch 'main' into develop commit 20a10eeb4e9580c3c6d9a86e6a31285adc64973a Author: Anindya Chatterjee <696662+anidotnet@users.noreply.github.com> Date: Fri Jan 19 10:02:04 2024 +0530 Publish 4.2.1 SNAPSHOT for 8-Jan (#898) * merged to main (#890) * Update CHANGELOG.md * Update release.yml * Update release.yml * Update CHANGELOG.md * Update pom.xml * Update pom.xml (#891) * Update README.md * Bump uk.co.jemos.podam:podam from 8.0.0.RELEASE to 8.0.1.RELEASE (#893) Bumps [uk.co.jemos.podam:podam](https://github.com/mtedone/podam) from 8.0.0.RELEASE to 8.0.1.RELEASE. - [Release notes](https://github.com/mtedone/podam/releases) - [Commits](https://github.com/mtedone/podam/compare/8.0.0.RELEASE...8.0.1.RELEASE) --- updated-dependencies: - dependency-name: uk.co.jemos.podam:podam 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> * Bump joda-time:joda-time from 2.12.5 to 2.12.6 (#894) Bumps [joda-time:joda-time](https://github.com/JodaOrg/joda-time) from 2.12.5 to 2.12.6. - [Release notes](https://github.com/JodaOrg/joda-time/releases) - [Changelog](https://github.com/JodaOrg/joda-time/blob/main/RELEASE-NOTES.txt) - [Commits](https://github.com/JodaOrg/joda-time/compare/v2.12.5...v2.12.6) --- updated-dependencies: - dependency-name: joda-time:joda-time 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> * Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.3 to 3.2.5 (#896) Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.3 to 3.2.5. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.3...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> * Bump org.slf4j:slf4j-api from 2.0.10 to 2.0.11 (#895) Bumps org.slf4j:slf4j-api from 2.0.10 to 2.0.11. --- updated-dependencies: - dependency-name: org.slf4j:slf4j-api 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> * Bump org.mockito:mockito-core from 5.8.0 to 5.9.0 (#897) Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.8.0 to 5.9.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v5.8.0...v5.9.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-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> --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 3bc6918dbfc69163f4a744496fe44729a69ad285 Merge: d981831d 87793b1f Author: Anindya Chatterjee Date: Sat Jan 6 17:40:17 2024 +0530 Merge branch 'main' into develop commit 77c8d4c21ff242c670bf48489bdf7968dc428f3c Merge: 94334252 86ab638e Author: Anindya Chatterjee Date: Sat Jan 6 16:40:42 2024 +0530 Merge branch 'main' into release commit 94334252b43a95705d58991370609e1514811289 Merge: 54ce9c27 00c8448a Author: Anindya Chatterjee Date: Sat Jan 6 16:00:31 2024 +0530 Merge branch 'main' into release commit 54ce9c27239faf89d6fdcb67584cca0442029a06 Merge: 753dac24 52381dfa Author: Anindya Chatterjee Date: Fri Jan 5 22:41:24 2024 +0530 Merge branch 'main' into release commit 753dac2414da3d92f799ebb09763c42b647f615f Merge: 246875ee 40dfd18f Author: Anindya Chatterjee Date: Fri Jan 5 22:35:10 2024 +0530 Merge branch 'main' into release commit 246875eec0003c31935293fd49e7420f0a69699c Merge: f33d56b5 1bd1074b Author: Anindya Chatterjee Date: Fri Jan 5 22:05:53 2024 +0530 Merge branch 'main' into release commit f33d56b506a2334243a4173a3c80c475f573c22d Merge: 3431fe16 7d3ccf7d Author: Anindya Chatterjee Date: Fri Jan 5 21:55:03 2024 +0530 Merge branch 'main' into release commit 3431fe169705e0b71b3ec566e93400ce6dc8832c Merge: 3293c3fd 77cfe1b1 Author: Anindya Chatterjee Date: Fri Jan 5 21:27:48 2024 +0530 Merge branch 'main' into release commit 3293c3fde1373bb3295d3bb00a7db05d43e7905e Merge: 741b1fc8 ce445627 Author: Anindya Chatterjee Date: Fri Jan 5 13:25:48 2024 +0530 Merge branch 'main' into release commit 741b1fc8f6a45f2d98cb7fe776c689236de8afce Merge: 82635050 53b256dc Author: Anindya Chatterjee Date: Fri Jan 5 11:56:38 2024 +0530 Merge branch 'main' into release commit 82635050de6bcbce39bbdc4093c38c3ae4c80675 Merge: 04249886 ffcf79fc Author: Anindya Chatterjee Date: Fri Jan 5 11:02:11 2024 +0530 Merge branch 'main' into release commit 04249886ed6c18e05906712646aadb788503b83d Merge: f9a8f490 0e5a0cbc Author: Anindya Chatterjee Date: Fri Jan 5 10:49:15 2024 +0530 Merge branch 'main' into release commit f9a8f490d264efcd10f899d765ece9894c43426b Author: Anindya Chatterjee <696662+anidotnet@users.noreply.github.com> Date: Fri Jan 5 01:05:15 2024 +0530 Update pom.xml commit e19ddb89e1314c4a9b2f647fd748b54eb2877ccc Merge: 1968b782 5acb37ef Author: Anindya Chatterjee Date: Thu Jan 4 23:22:42 2024 +0530 Merge branch 'main' into release commit 1968b7826dc1860440a2402f3b483ef74e10dc5e Author: Anindya Chatterjee Date: Thu Jan 4 22:28:21 2024 +0530 Update CHANGELOG.md commit 23ddb14d8c3f34cb1df100268bf5f4a75c9e1fff Author: Anindya Chatterjee Date: Thu Jan 4 22:24:08 2024 +0530 Update release.yml commit 2b33c6db04ba015514474d9bf1263de4afb28480 Author: Anindya Chatterjee Date: Thu Jan 4 22:19:01 2024 +0530 Update release.yml commit 457007a690300a458840ac4d88366bf61ddbd534 Merge: 539f49d8 1f004b57 Author: Anindya Chatterjee Date: Thu Jan 4 22:15:53 2024 +0530 Merge branch 'main' into release commit 539f49d8c8cb6469f5ba2696711406479894b795 Merge: 7f4c1398 d6db0823 Author: Anindya Chatterjee Date: Thu Jan 4 22:08:34 2024 +0530 Merge branch 'main' into release commit 7f4c13983cee21f8c35a41d289243a94323d5905 Author: Anindya Chatterjee Date: Thu Jan 4 21:16:20 2024 +0530 Update CHANGELOG.md commit d981831dc1cd884a81efe576d404af2574b11ab0 Merge: bd705845 0990ae12 Author: Anindya Chatterjee Date: Tue Jan 2 11:05:47 2024 +0530 Merge branch 'main' into develop commit bd7058457f5d89835116ef3157380faa911e8084 Merge: 6a4673b9 6a247539 Author: Anindya Chatterjee Date: Sun Oct 1 22:19:50 2023 +0530 Merge branch 'main' into develop commit 6a4673b9a6146ac90a2ee59390a6b623f4b56f22 Author: Anindya Chatterjee <696662+anidotnet@users.noreply.github.com> Date: Sun Oct 1 13:49:07 2023 +0000 Update pom.xml --- .github/workflows/release.yml | 2 ++ .github/workflows/snapshot.yml | 2 ++ CHANGELOG.md | 9 +++++++++ nitrite-bom/pom.xml | 2 +- nitrite-jackson-mapper/pom.xml | 2 +- nitrite-mvstore-adapter/pom.xml | 2 +- nitrite-rocksdb-adapter/pom.xml | 2 +- nitrite-spatial/pom.xml | 2 +- nitrite-support/pom.xml | 2 +- nitrite/pom.xml | 2 +- pom.xml | 2 +- potassium-nitrite/pom.xml | 2 +- 12 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 272ebba5..edb94a0e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + ref: release - uses: fregante/setup-git-user@v2 - name: Set up JDK 11 uses: actions/setup-java@v4 diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 2299bf00..2e4bab89 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -23,6 +23,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + ref: develop - uses: fregante/setup-git-user@v2 - name: Set up JDK 11 uses: actions/setup-java@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2df34372..fd042275 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## Release 4.2.1 - Feb 19, 2024 + +### Issue Fixes + +- Fix for #901 +- Fix for #902 +- Version upgrade for several dependencies + ## Release 4.2.0 - Jan 6, 2024 ### New Changes @@ -206,3 +214,4 @@ ## First Release - Apr 25, 2017 - Initial release + diff --git a/nitrite-bom/pom.xml b/nitrite-bom/pom.xml index 99255161..8ec54c47 100644 --- a/nitrite-bom/pom.xml +++ b/nitrite-bom/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1-SNAPSHOT + 4.2.1 nitrite-bom diff --git a/nitrite-jackson-mapper/pom.xml b/nitrite-jackson-mapper/pom.xml index 0753b301..7c5f4197 100644 --- a/nitrite-jackson-mapper/pom.xml +++ b/nitrite-jackson-mapper/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1-SNAPSHOT + 4.2.1 nitrite-jackson-mapper diff --git a/nitrite-mvstore-adapter/pom.xml b/nitrite-mvstore-adapter/pom.xml index b3d43b47..22c318b2 100644 --- a/nitrite-mvstore-adapter/pom.xml +++ b/nitrite-mvstore-adapter/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1-SNAPSHOT + 4.2.1 nitrite-mvstore-adapter diff --git a/nitrite-rocksdb-adapter/pom.xml b/nitrite-rocksdb-adapter/pom.xml index ad0bfd45..677fb35b 100644 --- a/nitrite-rocksdb-adapter/pom.xml +++ b/nitrite-rocksdb-adapter/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1-SNAPSHOT + 4.2.1 nitrite-rocksdb-adapter diff --git a/nitrite-spatial/pom.xml b/nitrite-spatial/pom.xml index 5094d4da..fd58610d 100644 --- a/nitrite-spatial/pom.xml +++ b/nitrite-spatial/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1-SNAPSHOT + 4.2.1 nitrite-spatial diff --git a/nitrite-support/pom.xml b/nitrite-support/pom.xml index 130e4224..26e5b8ee 100644 --- a/nitrite-support/pom.xml +++ b/nitrite-support/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1-SNAPSHOT + 4.2.1 nitrite-support diff --git a/nitrite/pom.xml b/nitrite/pom.xml index 2dbdd71c..1c7fb5bc 100644 --- a/nitrite/pom.xml +++ b/nitrite/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1-SNAPSHOT + 4.2.1 nitrite diff --git a/pom.xml b/pom.xml index 28743671..209e0f2d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1-SNAPSHOT + 4.2.1 pom Nitrite Database diff --git a/potassium-nitrite/pom.xml b/potassium-nitrite/pom.xml index 0df7d902..1bddada6 100644 --- a/potassium-nitrite/pom.xml +++ b/potassium-nitrite/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1-SNAPSHOT + 4.2.1 potassium-nitrite From e79b7d1543c6f3e725ced0cc1175ffccd55118c5 Mon Sep 17 00:00:00 2001 From: Anindya Chatterjee Date: Mon, 19 Feb 2024 23:15:28 +0530 Subject: [PATCH 02/10] Version bumped to 4.2.2-SNAPSHOT --- nitrite-bom/pom.xml | 2 +- nitrite-jackson-mapper/pom.xml | 2 +- nitrite-mvstore-adapter/pom.xml | 2 +- nitrite-rocksdb-adapter/pom.xml | 2 +- nitrite-spatial/pom.xml | 2 +- nitrite-support/pom.xml | 2 +- nitrite/pom.xml | 2 +- pom.xml | 2 +- potassium-nitrite/pom.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/nitrite-bom/pom.xml b/nitrite-bom/pom.xml index 8ec54c47..c3e28959 100644 --- a/nitrite-bom/pom.xml +++ b/nitrite-bom/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1 + 4.2.2-SNAPSHOT nitrite-bom diff --git a/nitrite-jackson-mapper/pom.xml b/nitrite-jackson-mapper/pom.xml index 7c5f4197..df293eb8 100644 --- a/nitrite-jackson-mapper/pom.xml +++ b/nitrite-jackson-mapper/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1 + 4.2.2-SNAPSHOT nitrite-jackson-mapper diff --git a/nitrite-mvstore-adapter/pom.xml b/nitrite-mvstore-adapter/pom.xml index 22c318b2..910a6956 100644 --- a/nitrite-mvstore-adapter/pom.xml +++ b/nitrite-mvstore-adapter/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1 + 4.2.2-SNAPSHOT nitrite-mvstore-adapter diff --git a/nitrite-rocksdb-adapter/pom.xml b/nitrite-rocksdb-adapter/pom.xml index 677fb35b..aa194a07 100644 --- a/nitrite-rocksdb-adapter/pom.xml +++ b/nitrite-rocksdb-adapter/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1 + 4.2.2-SNAPSHOT nitrite-rocksdb-adapter diff --git a/nitrite-spatial/pom.xml b/nitrite-spatial/pom.xml index fd58610d..e18183f9 100644 --- a/nitrite-spatial/pom.xml +++ b/nitrite-spatial/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1 + 4.2.2-SNAPSHOT nitrite-spatial diff --git a/nitrite-support/pom.xml b/nitrite-support/pom.xml index 26e5b8ee..1b391494 100644 --- a/nitrite-support/pom.xml +++ b/nitrite-support/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1 + 4.2.2-SNAPSHOT nitrite-support diff --git a/nitrite/pom.xml b/nitrite/pom.xml index 1c7fb5bc..3ce14ef9 100644 --- a/nitrite/pom.xml +++ b/nitrite/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1 + 4.2.2-SNAPSHOT nitrite diff --git a/pom.xml b/pom.xml index 209e0f2d..7e91c4b9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1 + 4.2.2-SNAPSHOT pom Nitrite Database diff --git a/potassium-nitrite/pom.xml b/potassium-nitrite/pom.xml index 1bddada6..72068dd1 100644 --- a/potassium-nitrite/pom.xml +++ b/potassium-nitrite/pom.xml @@ -4,7 +4,7 @@ org.dizitart nitrite-java - 4.2.1 + 4.2.2-SNAPSHOT potassium-nitrite From 677cbaedd1b435c39c9174d95865718082d3a544 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 07:08:55 +0530 Subject: [PATCH 03/10] Bump org.jetbrains.kotlinx:kotlinx-serialization-json (#907) Bumps [org.jetbrains.kotlinx:kotlinx-serialization-json](https://github.com/Kotlin/kotlinx.serialization) from 1.6.2 to 1.6.3. - [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases) - [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md) - [Commits](https://github.com/Kotlin/kotlinx.serialization/compare/v1.6.2...v1.6.3) --- updated-dependencies: - dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-json 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 7e91c4b9..0a4c74f5 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ 1.16.1 2.15.1 1.9.22 - 1.6.2 + 1.6.3 1.18.30 1.18.20.0 4.13.2 From b09ac64ae57f4cd8e7d9adfce2231f1f3ebc7d1b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 07:09:05 +0530 Subject: [PATCH 04/10] Bump com.google.errorprone:error_prone_core from 2.24.1 to 2.25.0 (#908) Bumps [com.google.errorprone:error_prone_core](https://github.com/google/error-prone) from 2.24.1 to 2.25.0. - [Release notes](https://github.com/google/error-prone/releases) - [Commits](https://github.com/google/error-prone/compare/v2.24.1...v2.25.0) --- updated-dependencies: - dependency-name: com.google.errorprone:error_prone_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 0a4c74f5..60ba1eeb 100644 --- a/pom.xml +++ b/pom.xml @@ -78,7 +78,7 @@ 33.0.0-jre 1.6.8 - 2.24.1 + 2.25.0 0.8.11 3.2.5 3.12.1 From 338ab6950928a6ff5e16691abdef7c7d7013d546 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 07:40:53 +0530 Subject: [PATCH 05/10] Bump log4j.version from 2.22.1 to 2.23.0 (#910) Bumps `log4j.version` from 2.22.1 to 2.23.0. Updates `org.apache.logging.log4j:log4j-api` from 2.22.1 to 2.23.0 Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.22.1 to 2.23.0 Updates `org.apache.logging.log4j:log4j-core` from 2.22.1 to 2.23.0 --- updated-dependencies: - dependency-name: org.apache.logging.log4j:log4j-api dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.apache.logging.log4j:log4j-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 60ba1eeb..c6c27a60 100644 --- a/pom.xml +++ b/pom.xml @@ -67,7 +67,7 @@ 4.13.2 5.10.0 8.0.1.RELEASE - 2.22.1 + 2.23.0 4.2.0 2.12.7 2.0.3 From 5ae2040b7af039871d1464be6d8060d70f6e18d6 Mon Sep 17 00:00:00 2001 From: Anton Zhdanov Date: Mon, 26 Feb 2024 06:58:10 +0200 Subject: [PATCH 06/10] #911 kotlinx.serialization DocumentDecoder List element index fix (#913) --- .../dizitart/kno2/serialization/DocumentDecoder.kt | 3 ++- .../kno2/KotlinXSerializationMapperTest.kt | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/potassium-nitrite/src/main/kotlin/org/dizitart/kno2/serialization/DocumentDecoder.kt b/potassium-nitrite/src/main/kotlin/org/dizitart/kno2/serialization/DocumentDecoder.kt index 05572534..63b458b9 100644 --- a/potassium-nitrite/src/main/kotlin/org/dizitart/kno2/serialization/DocumentDecoder.kt +++ b/potassium-nitrite/src/main/kotlin/org/dizitart/kno2/serialization/DocumentDecoder.kt @@ -119,13 +119,14 @@ internal class DocumentDecoder(private val document: Document, descriptor: Seria @OptIn(ExperimentalSerializationApi::class) private class ListDecoder(private val list: ArrayDeque) : AbstractDecoder() { private var elementIndex = 0 + private val initialSize = list.size override val serializersModule: SerializersModule = EmptySerializersModule() override fun decodeValue(): Any = list.removeFirst() override fun decodeElementIndex(descriptor: SerialDescriptor): Int { - if (list.isEmpty() || elementIndex == descriptor.elementsCount) return CompositeDecoder.DECODE_DONE + if (list.isEmpty() || elementIndex == initialSize) return CompositeDecoder.DECODE_DONE return elementIndex++ } diff --git a/potassium-nitrite/src/test/kotlin/org/dizitart/kno2/KotlinXSerializationMapperTest.kt b/potassium-nitrite/src/test/kotlin/org/dizitart/kno2/KotlinXSerializationMapperTest.kt index 1c284a19..57c8b367 100644 --- a/potassium-nitrite/src/test/kotlin/org/dizitart/kno2/KotlinXSerializationMapperTest.kt +++ b/potassium-nitrite/src/test/kotlin/org/dizitart/kno2/KotlinXSerializationMapperTest.kt @@ -124,6 +124,20 @@ class KotlinXSerializationMapperTest { emptyList(), emptyArray(), ), + TestData( + TestData.SomePolymorphType.SomeTypeB("someValue"), + emptyMap(), + emptyMap(), + TestData.InnerObject(""), + "", + TestData.SomeValueClass("someString"), + 1, + 1.0, + "test", + TestData.SomeEnum.SomeValue, + emptyList(), + emptyArray(), + ), ), valueClass = TestData.SomeValueClass("someString"), someArray = arrayOf("someArrayData"), From be816a1969b99ba13b22e9e92499a2bbfff99bd5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 23:09:54 +0530 Subject: [PATCH 07/10] Bump org.rocksdb:rocksdbjni from 8.10.0 to 8.10.2 (#914) Bumps [org.rocksdb:rocksdbjni](https://github.com/facebook/rocksdb) from 8.10.0 to 8.10.2. - [Release notes](https://github.com/facebook/rocksdb/releases) - [Changelog](https://github.com/facebook/rocksdb/blob/v8.10.2/HISTORY.md) - [Commits](https://github.com/facebook/rocksdb/compare/v8.10.0...v8.10.2) --- updated-dependencies: - dependency-name: org.rocksdb:rocksdbjni 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 c6c27a60..4e95e6a5 100644 --- a/pom.xml +++ b/pom.xml @@ -55,7 +55,7 @@ 2.0.12 1.9.3 2.2.224 - 8.10.0 + 8.10.2 5.5.0 1.19.0 1.16.1 From b09e6633e5bfe11d396c07562c2783509ab349a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 09:34:38 +0530 Subject: [PATCH 08/10] Bump org.rocksdb:rocksdbjni from 8.10.2 to 8.11.3 (#919) Bumps [org.rocksdb:rocksdbjni](https://github.com/facebook/rocksdb) from 8.10.2 to 8.11.3. - [Release notes](https://github.com/facebook/rocksdb/releases) - [Changelog](https://github.com/facebook/rocksdb/blob/v8.11.3/HISTORY.md) - [Commits](https://github.com/facebook/rocksdb/compare/v8.10.2...v8.11.3) --- updated-dependencies: - dependency-name: org.rocksdb:rocksdbjni 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 4e95e6a5..05c612e3 100644 --- a/pom.xml +++ b/pom.xml @@ -55,7 +55,7 @@ 2.0.12 1.9.3 2.2.224 - 8.10.2 + 8.11.3 5.5.0 1.19.0 1.16.1 From 4caad0c8672e5c66a8ded6c7103256668bb7c51b Mon Sep 17 00:00:00 2001 From: Anindya Chatterjee <696662+anidotnet@users.noreply.github.com> Date: Fri, 1 Mar 2024 21:34:46 +0530 Subject: [PATCH 09/10] Fixes #916 (#918) * Fixes #916 * changelog updated --- CHANGELOG.md | 8 ++++ .../dizitart/no2/integration/NitriteTest.java | 41 +++++++++++++++++++ .../no2/mvstore/compat/v1/UpgradeUtil.java | 8 ++-- .../compat/v1/mvstore/fs/FilePathDisk.java | 3 +- .../java/org/dizitart/no2/NitriteTest.java | 32 +++++++++++---- .../dizitart/no2/integration/TestUtil.java | 15 +++++++ .../no2/spatial/SpatialIndexNegativeTest.java | 3 +- .../collection/operation/IndexOperations.java | 10 ++++- .../org/dizitart/no2/filters/TextFilter.java | 11 ++--- .../org/dizitart/no2/index/TextIndex.java | 2 +- .../no2/repository/AnnotationScanner.java | 8 +--- .../repository/DefaultObjectRepository.java | 3 +- .../repository/EntityDecoratorScanner.java | 8 +--- .../no2/repository/RepositoryOperations.java | 14 +++++-- .../DefaultTransactionalRepository.java | 2 +- 15 files changed, 125 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd042275..e9519b02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## Release 4.2.2 + +### Issue Fixes + +- Fix for #916 +- Fix for #911 +- Version upgrade for several dependencies + ## Release 4.2.1 - Feb 19, 2024 ### Issue Fixes diff --git a/nitrite-jackson-mapper/src/test/java/org/dizitart/no2/integration/NitriteTest.java b/nitrite-jackson-mapper/src/test/java/org/dizitart/no2/integration/NitriteTest.java index 2f86eafd..01043be8 100644 --- a/nitrite-jackson-mapper/src/test/java/org/dizitart/no2/integration/NitriteTest.java +++ b/nitrite-jackson-mapper/src/test/java/org/dizitart/no2/integration/NitriteTest.java @@ -24,6 +24,7 @@ import org.dizitart.no2.collection.Document; import org.dizitart.no2.collection.NitriteCollection; import org.dizitart.no2.common.mapper.JacksonMapperModule; +import org.dizitart.no2.exceptions.IndexingException; import org.dizitart.no2.exceptions.NitriteIOException; import org.dizitart.no2.exceptions.ValidationException; import org.dizitart.no2.index.IndexOptions; @@ -241,6 +242,24 @@ public void testGetCollectionInvalidName() { db.getCollection(META_MAP_NAME); } + @Test(expected = IndexingException.class) + public void testUniqueAndTextIndex() { + try (final Nitrite nitrite = Nitrite.builder() + .loadModule(new JacksonMapperModule()) + .openOrCreate()) { + nitrite.getRepository(EntityUniqueFullText.class); + } + } + + @Test(expected = IndexingException.class) + public void testNoUniqueAndTextIndex() { + try (final Nitrite nitrite = Nitrite.builder() + .loadModule(new JacksonMapperModule()) + .openOrCreate()) { + nitrite.getRepository(EntityNoUniqueFullText.class); + } + } + @Data @NoArgsConstructor @@ -263,4 +282,26 @@ public enum Status { public static class EmptyClass { } + + @Indices({ + @Index(fields = "value", type = IndexType.FULL_TEXT), + @Index(fields = "value") + }) + @Data + @NoArgsConstructor + @AllArgsConstructor + public static class EntityUniqueFullText { + private String value; + } + + @Indices({ + @Index(fields = "value", type = IndexType.FULL_TEXT), + @Index(fields = "value", type = IndexType.NON_UNIQUE) + }) + @Data + @NoArgsConstructor + @AllArgsConstructor + public static class EntityNoUniqueFullText { + private String value; + } } diff --git a/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/compat/v1/UpgradeUtil.java b/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/compat/v1/UpgradeUtil.java index 80d887e3..5099915a 100644 --- a/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/compat/v1/UpgradeUtil.java +++ b/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/compat/v1/UpgradeUtil.java @@ -38,8 +38,7 @@ import java.util.concurrent.ConcurrentSkipListSet; import java.util.concurrent.CopyOnWriteArrayList; -import static org.dizitart.no2.common.Constants.INDEX_PREFIX; -import static org.dizitart.no2.common.Constants.STORE_INFO; +import static org.dizitart.no2.common.Constants.*; import static org.dizitart.no2.common.util.ObjectUtils.convertToObjectArray; import static org.dizitart.no2.common.util.StringUtils.isNullOrEmpty; @@ -91,9 +90,12 @@ private static void copyData(MVMap oldMap, org.h2.mvstore.MVMap newMap) { if (key instanceof Compat.NitriteId) { newKey = nitriteId((Compat.NitriteId) key); + } else if (oldMap.getName().contains(INDEX_META_PREFIX)) { + // index meta map, wrap with Field + newKey = key == null ? Fields.withNames() : Fields.withNames((String) key); } else if (oldMap.getName().contains(INDEX_PREFIX)) { // index map, wrap with DBValue - newKey = newKey == null ? DBNull.getInstance() : new DBValue((Comparable) newKey); + newKey = key == null ? DBNull.getInstance() : new DBValue((Comparable) key); } Object newValue = migrateValue(entry.getValue()); diff --git a/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/compat/v1/mvstore/fs/FilePathDisk.java b/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/compat/v1/mvstore/fs/FilePathDisk.java index 3e434182..3b34b008 100644 --- a/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/compat/v1/mvstore/fs/FilePathDisk.java +++ b/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/compat/v1/mvstore/fs/FilePathDisk.java @@ -305,14 +305,13 @@ public InputStream newInputStream() throws IOException { } static void freeMemoryAndFinalize() { - IOUtils.trace("freeMemoryAndFinalize", (String)null, (Object)null); + IOUtils.trace("freeMemoryAndFinalize", null, null); Runtime var0 = Runtime.getRuntime(); long var1 = var0.freeMemory(); for(int var3 = 0; var3 < 16; ++var3) { var0.gc(); long var4 = var0.freeMemory(); - var0.runFinalization(); if (var4 == var1) { break; } diff --git a/nitrite-mvstore-adapter/src/test/java/org/dizitart/no2/NitriteTest.java b/nitrite-mvstore-adapter/src/test/java/org/dizitart/no2/NitriteTest.java index 888552d7..8fe84ef0 100644 --- a/nitrite-mvstore-adapter/src/test/java/org/dizitart/no2/NitriteTest.java +++ b/nitrite-mvstore-adapter/src/test/java/org/dizitart/no2/NitriteTest.java @@ -63,6 +63,7 @@ import static org.dizitart.no2.collection.Document.createDocument; import static org.dizitart.no2.common.Constants.INTERNAL_NAME_SEPARATOR; import static org.dizitart.no2.common.Constants.META_MAP_NAME; +import static org.dizitart.no2.common.util.Iterables.listOf; import static org.dizitart.no2.filters.Filter.ALL; import static org.dizitart.no2.filters.Filter.and; import static org.dizitart.no2.filters.FluentFilter.where; @@ -186,22 +187,27 @@ public void testReopen() throws ParseException { NitriteCollection testCollection = db.getCollection("test"); assertNotNull(testCollection); long prevSize = testCollection.find().size(); + ObjectRepository repository = db.getRepository(Receipt.class); + assertNotNull(repository); + long prevRepoSize = repository.size(); db.close(); - db = null; - db = TestUtil.createDb(fileName, "test-user", "test-password"); - + db = TestUtil.createDb(fileName, "test-user", "test-password", listOf(new Receipt.Converter())); assertNotNull(db); testCollection = db.getCollection("test"); assertNotNull(testCollection); long sizeNow = testCollection.find().size(); assertEquals(prevSize, sizeNow); + repository = db.getRepository(Receipt.class); + assertNotNull(repository); + long repoSizeNow = repository.size(); + assertEquals(prevRepoSize, repoSizeNow); db.close(); db = null; - db = TestUtil.createDb(fileName, "test-user", "test-password"); + db = TestUtil.createDb(fileName, "test-user", "test-password", listOf(new Receipt.Converter())); testCollection = db.getCollection("test"); testCollection.insert(createDocument("firstName", "fn12") @@ -209,15 +215,25 @@ public void testReopen() throws ParseException { .put("birthDay", simpleDateFormat.parse("2010-07-01T16:02:48.440Z")) .put("data", new byte[]{10, 20, 30}) .put("body", "a quick brown fox jump over the lazy dog")); + repository = db.getRepository(Receipt.class); + Receipt r = new Receipt(); + r.status = Receipt.Status.COMPLETED; + r.clientRef = "10"; + r.synced = false; + repository.insert(r); db.close(); db = null; - db = TestUtil.createDb(fileName, "test-user", "test-password"); + db = TestUtil.createDb(fileName, "test-user", "test-password", listOf(new Receipt.Converter())); testCollection = db.getCollection("test"); assertNotNull(testCollection); sizeNow = testCollection.find().size(); assertEquals(prevSize + 1, sizeNow); + repository = db.getRepository(Receipt.class); + assertNotNull(repository); + repoSizeNow = repository.size(); + assertEquals(prevRepoSize + 1, repoSizeNow); } @Test @@ -491,9 +507,7 @@ public void testReadCompatibility() throws IOException { Files.copy(stream, Paths.get(System.getProperty("java.io.tmpdir") + File.separator + "old.db")); String oldDbFile = System.getProperty("java.io.tmpdir") + File.separator + "old.db"; - Nitrite db = TestUtil.createDb(oldDbFile, "test-user", "test-password"); - SimpleNitriteMapper documentMapper = (SimpleNitriteMapper) db.getConfig().nitriteMapper(); - documentMapper.registerEntityConverter(new Receipt.Converter()); + Nitrite db = TestUtil.createDb(oldDbFile, "test-user", "test-password", listOf(new Receipt.Converter())); NitriteCollection collection = db.getCollection("test"); @@ -517,6 +531,8 @@ public void testReadCompatibility() throws IOException { assertNotNull(repository.getAttributes()); db.close(); + + //TODO: CHeck reopen with repo. That should also fails too. } @Test diff --git a/nitrite-mvstore-adapter/src/test/java/org/dizitart/no2/integration/TestUtil.java b/nitrite-mvstore-adapter/src/test/java/org/dizitart/no2/integration/TestUtil.java index f2f41101..0da8214d 100644 --- a/nitrite-mvstore-adapter/src/test/java/org/dizitart/no2/integration/TestUtil.java +++ b/nitrite-mvstore-adapter/src/test/java/org/dizitart/no2/integration/TestUtil.java @@ -25,6 +25,7 @@ import lombok.extern.slf4j.Slf4j; import org.dizitart.no2.Nitrite; import org.dizitart.no2.collection.Document; +import org.dizitart.no2.common.mapper.EntityConverter; import org.dizitart.no2.exceptions.ObjectMappingException; import org.dizitart.no2.mvstore.MVStoreModule; @@ -125,6 +126,20 @@ public static Nitrite createDb(String filePath, String user, String password) { .openOrCreate(user, password); } + public static Nitrite createDb(String filePath, String user, String password, + List> entityConverters) { + MVStoreModule storeModule = MVStoreModule.withConfig() + .filePath(filePath) + .compress(true) + .build(); + + return Nitrite.builder() + .loadModule(storeModule) + .loadModule(() -> new HashSet<>(entityConverters)) + .fieldSeparator(".") + .openOrCreate(user, password); + } + public static Document parse(String json) { try { ObjectMapper objectMapper = createObjectMapper(); diff --git a/nitrite-spatial/src/test/java/org/dizitart/no2/spatial/SpatialIndexNegativeTest.java b/nitrite-spatial/src/test/java/org/dizitart/no2/spatial/SpatialIndexNegativeTest.java index 313899fb..37dab2fe 100644 --- a/nitrite-spatial/src/test/java/org/dizitart/no2/spatial/SpatialIndexNegativeTest.java +++ b/nitrite-spatial/src/test/java/org/dizitart/no2/spatial/SpatialIndexNegativeTest.java @@ -22,6 +22,7 @@ import org.dizitart.no2.exceptions.IndexingException; import org.dizitart.no2.filters.FluentFilter; import org.dizitart.no2.index.IndexOptions; +import org.dizitart.no2.index.IndexType; import org.dizitart.no2.repository.Cursor; import org.junit.Test; import org.locationtech.jts.geom.Geometry; @@ -55,7 +56,7 @@ public void testNoIndex() throws ParseException { @Test(expected = IndexingException.class) public void testIndexExists() { collection.createIndex(IndexOptions.indexOptions(SPATIAL_INDEX), "location"); - collection.createIndex(IndexOptions.indexOptions(SPATIAL_INDEX), "location"); + collection.createIndex(IndexOptions.indexOptions(IndexType.UNIQUE), "location"); } @Test(expected = FilterException.class) diff --git a/nitrite/src/main/java/org/dizitart/no2/collection/operation/IndexOperations.java b/nitrite/src/main/java/org/dizitart/no2/collection/operation/IndexOperations.java index 3a6a6bc2..1e7edd2a 100644 --- a/nitrite/src/main/java/org/dizitart/no2/collection/operation/IndexOperations.java +++ b/nitrite/src/main/java/org/dizitart/no2/collection/operation/IndexOperations.java @@ -61,8 +61,14 @@ void createIndex(Fields fields, String indexType) { // if no index create index indexDescriptor = indexManager.createIndexDescriptor(fields, indexType); } else { - // if index already there throw - throw new IndexingException("Index already exists on fields: " + fields); + // if index already there check if it is of same type, if not throw exception + if (!indexDescriptor.getIndexType().equals(indexType)) { + throw new IndexingException("Index already exists on fields: " + fields + + " with type " + indexDescriptor.getIndexType()); + } else { + // if index is of same type, return + return; + } } buildIndex(indexDescriptor, false); diff --git a/nitrite/src/main/java/org/dizitart/no2/filters/TextFilter.java b/nitrite/src/main/java/org/dizitart/no2/filters/TextFilter.java index 8bec4d68..e1187501 100644 --- a/nitrite/src/main/java/org/dizitart/no2/filters/TextFilter.java +++ b/nitrite/src/main/java/org/dizitart/no2/filters/TextFilter.java @@ -34,8 +34,8 @@ * @author Anindya Chatterjee * @since 1.0 */ +@Setter public class TextFilter extends StringFilter { - @Setter private TextTokenizer textTokenizer; /** @@ -100,12 +100,7 @@ private LinkedHashSet searchExactByIndex(NitriteMap> List nitriteIds = (List) indexMap.get(word); if (nitriteIds != null) { for (NitriteId id : nitriteIds) { - Integer score = scoreMap.get(id); - if (score == null) { - scoreMap.put(id, 1); - } else { - scoreMap.put(id, score + 1); - } + scoreMap.merge(id, 1, Integer::sum); } } } @@ -185,7 +180,7 @@ private LinkedHashSet searchContains(NitriteMap> inde private LinkedHashSet sortedIdsByScore(Map unsortedMap) { List> list = new LinkedList<>(unsortedMap.entrySet()); - Collections.sort(list, (e1, e2) -> (e2.getValue()).compareTo(e1.getValue())); + list.sort((e1, e2) -> (e2.getValue()).compareTo(e1.getValue())); LinkedHashSet result = new LinkedHashSet<>(); for (Map.Entry entry : list) { diff --git a/nitrite/src/main/java/org/dizitart/no2/index/TextIndex.java b/nitrite/src/main/java/org/dizitart/no2/index/TextIndex.java index bc343cd9..74fd575f 100644 --- a/nitrite/src/main/java/org/dizitart/no2/index/TextIndex.java +++ b/nitrite/src/main/java/org/dizitart/no2/index/TextIndex.java @@ -152,7 +152,7 @@ public LinkedHashSet findNitriteIds(FindPlan findPlan) { textFilter.setTextTokenizer(textTokenizer); return textFilter.applyOnTextIndex(indexMap); } - throw new FilterException("Text index only supports a single TextFilter"); + throw new FilterException("TextFilter can only be applied on text index."); } private NitriteMap> findIndexMap() { diff --git a/nitrite/src/main/java/org/dizitart/no2/repository/AnnotationScanner.java b/nitrite/src/main/java/org/dizitart/no2/repository/AnnotationScanner.java index 03f85f4e..ca2d78c6 100644 --- a/nitrite/src/main/java/org/dizitart/no2/repository/AnnotationScanner.java +++ b/nitrite/src/main/java/org/dizitart/no2/repository/AnnotationScanner.java @@ -55,18 +55,14 @@ public AnnotationScanner(Class type, NitriteCollection collection, NitriteMap public void createIndices() { for (Index index : indices) { String[] fields = index.fields(); - if (!collection.hasIndex(fields)) { - collection.createIndex(indexOptions(index.type()), fields); - } + collection.createIndex(indexOptions(index.type()), fields); } } public void createIdIndex() { if (objectIdField != null) { String[] fieldNames = objectIdField.getEmbeddedFieldNames(); - if (!collection.hasIndex(fieldNames)) { - collection.createIndex(fieldNames); - } + collection.createIndex(fieldNames); } } diff --git a/nitrite/src/main/java/org/dizitart/no2/repository/DefaultObjectRepository.java b/nitrite/src/main/java/org/dizitart/no2/repository/DefaultObjectRepository.java index 52456382..bbe46847 100644 --- a/nitrite/src/main/java/org/dizitart/no2/repository/DefaultObjectRepository.java +++ b/nitrite/src/main/java/org/dizitart/no2/repository/DefaultObjectRepository.java @@ -236,6 +236,7 @@ private void initialize() { } else { operations = new RepositoryOperations(type, collection, nitriteConfig); } - operations.createIndices(); + operations.scanIndexes(); + operations.createIndexes(); } } diff --git a/nitrite/src/main/java/org/dizitart/no2/repository/EntityDecoratorScanner.java b/nitrite/src/main/java/org/dizitart/no2/repository/EntityDecoratorScanner.java index a9a071ab..426c2a2c 100644 --- a/nitrite/src/main/java/org/dizitart/no2/repository/EntityDecoratorScanner.java +++ b/nitrite/src/main/java/org/dizitart/no2/repository/EntityDecoratorScanner.java @@ -68,18 +68,14 @@ public void readEntity() { public void createIndices() { for (EntityIndex index : indices) { String[] fields = index.getFieldNames().toArray(new String[0]); - if (!collection.hasIndex(fields)) { - collection.createIndex(indexOptions(index.getIndexType()), fields); - } + collection.createIndex(indexOptions(index.getIndexType()), fields); } } public void createIdIndex() { if (objectIdField != null) { String[] fieldNames = objectIdField.getEmbeddedFieldNames(); - if (!collection.hasIndex(fieldNames)) { - collection.createIndex(fieldNames); - } + collection.createIndex(fieldNames); } } diff --git a/nitrite/src/main/java/org/dizitart/no2/repository/RepositoryOperations.java b/nitrite/src/main/java/org/dizitart/no2/repository/RepositoryOperations.java index 254c86cb..49f22d6d 100644 --- a/nitrite/src/main/java/org/dizitart/no2/repository/RepositoryOperations.java +++ b/nitrite/src/main/java/org/dizitart/no2/repository/RepositoryOperations.java @@ -60,17 +60,23 @@ public RepositoryOperations(EntityDecorator entityDecorator, NitriteCollectio validateCollection(); } - public void createIndices() { + public void scanIndexes() { if (annotationScanner != null) { annotationScanner.performScan(); - annotationScanner.createIndices(); - annotationScanner.createIdIndex(); objectIdField = annotationScanner.getObjectIdField(); } else if (entityDecoratorScanner != null) { entityDecoratorScanner.readEntity(); + objectIdField = entityDecoratorScanner.getObjectIdField(); + } + } + + public void createIndexes() { + if (annotationScanner != null) { + annotationScanner.createIndices(); + annotationScanner.createIdIndex(); + } else if (entityDecoratorScanner != null) { entityDecoratorScanner.createIndices(); entityDecoratorScanner.createIdIndex(); - objectIdField = entityDecoratorScanner.getObjectIdField(); } } diff --git a/nitrite/src/main/java/org/dizitart/no2/transaction/DefaultTransactionalRepository.java b/nitrite/src/main/java/org/dizitart/no2/transaction/DefaultTransactionalRepository.java index 52b27d54..f051c2b9 100644 --- a/nitrite/src/main/java/org/dizitart/no2/transaction/DefaultTransactionalRepository.java +++ b/nitrite/src/main/java/org/dizitart/no2/transaction/DefaultTransactionalRepository.java @@ -236,6 +236,6 @@ private void initialize() { } else { this.operations = new RepositoryOperations(type, backingCollection, nitriteConfig); } - this.operations.createIndices(); + this.operations.scanIndexes(); } } From 440f830a1487e9a29ab31879886fc8d1473b322f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 23:00:54 +0530 Subject: [PATCH 10/10] Bump org.mockito:mockito-core from 5.10.0 to 5.11.0 (#920) Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.10.0 to 5.11.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v5.10.0...v5.11.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-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 05c612e3..74741ba3 100644 --- a/pom.xml +++ b/pom.xml @@ -65,7 +65,7 @@ 1.18.30 1.18.20.0 4.13.2 - 5.10.0 + 5.11.0 8.0.1.RELEASE 2.23.0 4.2.0