Skip to content

Commit 493b248

Browse files
authored
Initialize ObjectId, ClientMetadataHelper at runtime, GraalVM (#1078)
JAVA-4856
1 parent 44d7045 commit 493b248

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

driver-core/src/resources/META-INF/native-image/org.mongodb/mongodb-driver-core/native-image.properties bson/src/main/resources/META-INF/native-image/org.mongodb/bson/native-image.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
Args = --initialize-at-run-time=com.mongodb.UnixServerAddress,com.mongodb.internal.connection.SnappyCompressor
16+
Args = --initialize-at-run-time=org.bson.types.ObjectId

driver-core/build.gradle

-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ ext {
2727
pomName = 'MongoDB Java Driver Core'
2828
}
2929

30-
// Add native-image.properties
31-
sourceSets.main.resources.srcDirs = ['src/resources']
32-
3330
configurations {
3431
consumableTestRuntimeOnly {
3532
extendsFrom testRuntimeOnly
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#
2+
# Copyright 2008-present MongoDB, Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
Args = --initialize-at-run-time=com.mongodb.UnixServerAddress,com.mongodb.internal.connection.SnappyCompressor,org.bson.types.ObjectId,com.mongodb.internal.connection.ClientMetadataHelper

0 commit comments

Comments
 (0)