From 760b9b12d26e1abac32df022c87f5c23659654ba Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Sat, 31 Aug 2024 09:14:58 +0000 Subject: [PATCH 1/2] fix: upgrade org.mongodb:mongodb-driver-reactivestreams from 4.11.2 to 4.11.3 Snyk has created this PR to upgrade org.mongodb:mongodb-driver-reactivestreams from 4.11.2 to 4.11.3. See this package in maven: org.mongodb:mongodb-driver-reactivestreams See this project in Snyk: https://app.snyk.io/org/brambg/project/505c5a7f-784c-4b50-9a6a-22fc806fb68e?utm_source=github&utm_medium=referral&page=upgrade-pr --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1d02f12..84b018a 100644 --- a/pom.xml +++ b/pom.xml @@ -57,7 +57,7 @@ 1.8.1 1.2.17 1.5.0 - 4.11.2 + 4.11.3 2.7.2 0.27.1 3.25.4 From 3859316f3a8508de898cfccc846116e0a62bcd0e Mon Sep 17 00:00:00 2001 From: Bram Buitendijk Date: Tue, 3 Sep 2024 14:06:31 +0200 Subject: [PATCH 2/2] update some dependency versions; fix nullpointerexception; fixes #171 --- client/pom.xml | 7 +++++ common/pom.xml | 6 +++- pom.xml | 29 ++++++++++--------- .../knaw/huc/annorepo/AnnoRepoApplication.kt | 2 +- .../knaw/huc/annorepo/dao/ARContainerDAO.kt | 2 +- 5 files changed, 29 insertions(+), 17 deletions(-) diff --git a/client/pom.xml b/client/pom.xml index fd8cb39..7df6cd5 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -169,5 +169,12 @@ http://www.apache.org/licenses/LICENSE-2.0.txt + + + maven_central + Maven Central + https://repo.maven.apache.org/maven2/ + + diff --git a/common/pom.xml b/common/pom.xml index eb0c068..9688504 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -41,7 +41,11 @@ log4j-api-kotlin ${log4j-api-kotlin.version} - + + org.apache.logging.log4j + log4j-core + ${log4j-core.version} + com.google.protobuf diff --git a/pom.xml b/pom.xml index 84b018a..80c97c6 100644 --- a/pom.xml +++ b/pom.xml @@ -38,17 +38,17 @@ 6.0.53 1.2.4 - 5.1.4 + 6.0.1 4.6.2 4.0.5-1 4.0.7 1.4.1 1.66.0 2.17.2 - 2.13.4.1 + 2.17.2 2.17.2 2.0.1 - 3.1.0 + 4.0.0 2.3.1 4.10.0 20231013 @@ -57,28 +57,29 @@ 1.8.1 1.2.17 1.5.0 - 4.11.3 + 2.22.1 + 4.11.0 2.7.2 0.27.1 - 3.25.4 - 2.0.9 + 4.28.0 + 2.0.13 1.6.6 1.4.1 - 3.24.2 + 3.26.3 2.2.224 - 1.5.0 - 2.8.0 - 3.2.2 - 5.10.0 - 5.1.0 - 5.6.0 + 1.5.3 + 2.9.0 + 3.2.7 + 5.11.0 + 5.4.0 + 5.13.0 1.12.5 2.1.0 - 1.7.20 + 1.9.20 1.0.0.Alpha2 2.12.7 3.11.0 diff --git a/server/src/main/kotlin/nl/knaw/huc/annorepo/AnnoRepoApplication.kt b/server/src/main/kotlin/nl/knaw/huc/annorepo/AnnoRepoApplication.kt index 50f8b0b..9913d86 100644 --- a/server/src/main/kotlin/nl/knaw/huc/annorepo/AnnoRepoApplication.kt +++ b/server/src/main/kotlin/nl/knaw/huc/annorepo/AnnoRepoApplication.kt @@ -85,7 +85,7 @@ class AnnoRepoApplication : Application() { private fun getJobsBundle(): ConfiguredBundle { val expiredChoresCleanerJob = ExpiredChoresCleanerJob() - return JobsBundle(expiredChoresCleanerJob) + return JobsBundle(listOf(expiredChoresCleanerJob)) } @OptIn(ExperimentalStdlibApi::class) diff --git a/server/src/main/kotlin/nl/knaw/huc/annorepo/dao/ARContainerDAO.kt b/server/src/main/kotlin/nl/knaw/huc/annorepo/dao/ARContainerDAO.kt index d0a7e29..96cedcf 100644 --- a/server/src/main/kotlin/nl/knaw/huc/annorepo/dao/ARContainerDAO.kt +++ b/server/src/main/kotlin/nl/knaw/huc/annorepo/dao/ARContainerDAO.kt @@ -39,7 +39,7 @@ class ARContainerDAO(configuration: AnnoRepoConfiguration, client: MongoClient) } override fun getAnnotationFields(containerName: String): SortedMap = - getContainerMetadata(containerName)!!.fieldCounts.toSortedMap() + getContainerMetadata(containerName)?.fieldCounts?.toSortedMap() ?: emptyMap().toSortedMap() override fun getContainerMetadataCollection(): MongoCollection = mdb.getCollection(ARConst.CONTAINER_METADATA_COLLECTION)