Skip to content

Commit

Permalink
Kotlin: Updated driver metadata (#1461)
Browse files Browse the repository at this point in the history
Added Kotlin version to the driver platform metadata.

JAVA-5539
  • Loading branch information
rozza committed Aug 7, 2024
1 parent a0add9c commit 720c322
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ public class MongoClient(private val wrapped: JMongoClient) : Closeable {
val builder =
if (mongoDriverInformation == null) MongoDriverInformation.builder()
else MongoDriverInformation.builder(mongoDriverInformation)
return MongoClient(JMongoClients.create(settings, builder.driverName("kotlin").build()))
return MongoClient(
JMongoClients.create(
settings, builder.driverName("kotlin").driverPlatform("kotlin/${KotlinVersion.CURRENT}").build()))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ public class MongoClient(private val wrapped: JMongoClient) : Closeable {
val builder =
if (mongoDriverInformation == null) MongoDriverInformation.builder()
else MongoDriverInformation.builder(mongoDriverInformation)
return MongoClient(JMongoClients.create(settings, builder.driverName("kotlin").build()))
return MongoClient(
JMongoClients.create(
settings, builder.driverName("kotlin").driverPlatform("kotlin/${KotlinVersion.CURRENT}").build()))
}
}

Expand Down

0 comments on commit 720c322

Please sign in to comment.