Skip to content

Commit

Permalink
Bump kotlin.version from 2.0.20 to 2.1.10 (#676)
Browse files Browse the repository at this point in the history
* Bump kotlin.version from 2.0.20 to 2.1.10

Bumps `kotlin.version` from 2.0.20 to 2.1.10.

Updates `org.jetbrains.kotlin:kotlin-reflect` from 2.0.20 to 2.1.10
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](JetBrains/kotlin@v2.0.20...v2.1.10)

Updates `org.jetbrains.kotlin:kotlin-test-junit` from 2.0.20 to 2.1.10
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](JetBrains/kotlin@v2.0.20...v2.1.10)

Updates `org.jetbrains.kotlin:kotlin-test-junit5` from 2.0.20 to 2.1.10
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](JetBrains/kotlin@v2.0.20...v2.1.10)

Updates `org.jetbrains.kotlin:kotlin-maven-plugin` from 2.0.20 to 2.1.10

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-reflect
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.jetbrains.kotlin:kotlin-test-junit
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: org.jetbrains.kotlin:kotlin-test-junit5
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: org.jetbrains.kotlin:kotlin-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix: compilation, replace deprecated call and set explicit Locale

* chore: remove dead code

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dependabot[bot] authored Jan 28, 2025
1 parent 023757a commit f36f091
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import streams.service.sink.strategy.CUDIngestionStrategy.Companion.TO_KEY
import streams.utils.IngestionUtils.getLabelsAsString
import streams.utils.IngestionUtils.getNodeKeysAsString
import streams.utils.StreamsUtils

import java.util.Locale

enum class CUDOperations { create, merge, update, delete, match }

Expand Down Expand Up @@ -75,7 +75,7 @@ class CUDIngestionStrategy: IngestionStrategy {

private fun CUDRelationship.isValidOperation(): Boolean = from.op in LIST_VALID_CUD_NODE_REL && to.op in LIST_VALID_CUD_NODE_REL && op in LIST_VALID_CUD_REL

private fun NodeRelMetadata.getOperation() = op.toString().toUpperCase()
private fun NodeRelMetadata.getOperation() = op.toString().uppercase(Locale.ROOT)

private fun buildNodeLookupByIds(keyword: String = "MATCH", ids: Set<String>, labels: List<String>, identifier: String = "n", field: String = ""): String {
val fullField = if (field.isNotBlank()) "$field." else field
Expand Down Expand Up @@ -279,4 +279,4 @@ class CUDIngestionStrategy: IngestionStrategy {
}
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ package streams.service

import streams.kafka.connect.sink.Neo4jSinkConnectorConfig
import streams.service.sink.strategy.*
import java.util.Locale
import kotlin.reflect.jvm.javaType

class TopicValidationException(message: String): RuntimeException(message)

private fun TopicType.replaceKeyBy(replacePrefix: Pair<String, String>) = if (replacePrefix.first.isNullOrBlank())
this.key
else
Expand Down Expand Up @@ -42,7 +41,7 @@ data class Topics(val cypherTopics: Map<String, String> = emptyMap(),
dbName: String = "",
invalidTopics: List<String> = emptyList()): Topics {
val config = map
.filterKeys { if (dbName.isNotBlank()) it.toLowerCase().endsWith(".to.$dbName") else !it.contains(".to.") }
.filterKeys { if (dbName.isNotBlank()) it.lowercase(Locale.ROOT).endsWith(".to.$dbName") else !it.contains(".to.") }
.mapKeys { if (dbName.isNotBlank()) it.key.replace(".to.$dbName", "", true) else it.key }
val cypherTopicPrefix = TopicType.CYPHER.replaceKeyBy(replacePrefix)
val sourceIdKey = TopicType.CDC_SOURCE_ID.replaceKeyBy(replacePrefix)
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>11</java.version>
<kotlin.version>2.0.20</kotlin.version>
<kotlin.version>2.1.10</kotlin.version>
<kotlin.coroutines.version>1.9.0</kotlin.coroutines.version>
<neo4j.version>4.4.37</neo4j.version>
<!-- Version 3.4 is the minimal version introducing version for CVE-2023-25194 -->
Expand Down
3 changes: 2 additions & 1 deletion test-support/src/main/kotlin/streams/Assert.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package streams
import org.hamcrest.Matcher
import org.hamcrest.StringDescription
import org.neo4j.function.ThrowingSupplier
import java.util.Locale
import java.util.concurrent.TimeUnit

object Assert {
Expand All @@ -25,7 +26,7 @@ object Assert {
val description = StringDescription()
description.appendText(reason.apply(last)).appendText("\nExpected: ").appendDescriptionOf(matcher).appendText("\n but: ")
matcher.describeMismatch(last, description)
throw AssertionError("Timeout hit (" + timeout + " " + timeUnit.toString().toLowerCase() + ") while waiting for condition to match: " + description.toString())
throw AssertionError("Timeout hit (" + timeout + " " + timeUnit.toString().lowercase(Locale.ROOT) + ") while waiting for condition to match: " + description.toString())
} else {
return
}
Expand Down

0 comments on commit f36f091

Please sign in to comment.