Skip to content

Commit

Permalink
Properly rearrange metadata based on the metadata origins
Browse files Browse the repository at this point in the history
Goes to mongodb-crypt from driver-core/src/main/resources/META-INF/native-image/reflect-config.json:

{
  "name":"boolean",
  "fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}]
},
{
  "name":"com.sun.crypto.provider.AESCipher$General",
  "methods":[{"name":"<init>","parameterTypes":[] }]
},
{
  "name":"com.sun.crypto.provider.HmacCore$HmacSHA256",
  "methods":[{"name":"<init>","parameterTypes":[] }]
},
{
  "name":"com.sun.crypto.provider.HmacCore$HmacSHA512",
  "methods":[{"name":"<init>","parameterTypes":[] }]
},
{
  "name":"int",
  "fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}]
},
{
  "name":"java.lang.Throwable",
  "methods":[{"name":"addSuppressed","parameterTypes":["java.lang.Throwable"] }]
},
{
  "name":"java.lang.reflect.Method",
  "methods":[{"name":"isVarArgs","parameterTypes":[] }]
},
{
  "name":"java.nio.Buffer"
},
{
  "name":"long",
  "fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}]
},
// NativePRNG also stays in driver-core
{
  "name":"sun.security.provider.NativePRNG",
  "methods":[{"name":"<init>","parameterTypes":[] }, {"name":"<init>","parameterTypes":["java.security.SecureRandomParameters"] }]
},
{
  "name":"sun.security.provider.SHA2$SHA256",
  "methods":[{"name":"<init>","parameterTypes":[] }]
},
{
  "name":"sun.security.provider.SHA5$SHA512",
  "methods":[{"name":"<init>","parameterTypes":[] }]
},
{
  "name":"void",
  "fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}]
},

Goes to mongodb-crypt from graalvm-native-image-app/src/main/resources/META-INF/native-image/reflect-config.json

{
  "name":"org.slf4j.Logger"
},

Goes to graalvm-native-image-app/build/native/agent-output/run/reflect-config.json from driver-core/src/main/resources/META-INF/native-image/reflect-config.json

{
  "name":"com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl",
  "methods":[{"name":"<init>","parameterTypes":[] }]
},
{
  "name":"java.io.FilePermission"
},
{
  "name":"java.lang.RuntimePermission"
},
{
  "name":"java.net.NetPermission"
},
{
  "name":"java.net.SocketPermission"
},
{
  "name":"java.net.URLPermission",
  "methods":[{"name":"<init>","parameterTypes":["java.lang.String","java.lang.String"] }]
},
{
  "name":"java.security.AllPermission"
},
{
  "name":"java.security.SecurityPermission"
},
{
  "name":"java.util.PropertyPermission"
},
{
  "name":"java.util.concurrent.atomic.AtomicBoolean",
  "fields":[{"name":"value"}]
},
{
  "name":"java.util.concurrent.atomic.AtomicReference",
  "fields":[{"name":"value"}]
},
{
  "name":"javax.smartcardio.CardPermission"
},

Goes to bson/src/main/resources/META-INF/native-image/reflect-config.json from driver-core/src/main/resources/META-INF/native-image/reflect-config.json

{
  "name":"java.lang.Object",
  "queryAllDeclaredMethods":true
},

Goes to bson/src/main/resources/META-INF/native-image/reflect-config.json from graalvm-native-image-app/src/main/resources/META-INF/native-image/reflect-config.json

{
  "name":"org.slf4j.Logger"
},

Goes to driver-core/src/main/resources/META-INF/native-image/reflect-config.json from graalvm-native-image-app/src/main/resources/META-INF/native-image/reflect-config.json

{
  "name":"org.slf4j.Logger"
},

JAVA-5219
  • Loading branch information
stIncMale committed May 1, 2024
1 parent a244a63 commit 3bc66d2
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 60 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{
"name":"java.lang.Object",
"queryAllDeclaredMethods":true
},
{
"name":"org.slf4j.Logger"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -133,27 +133,13 @@
"fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}],
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"int",
"fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}]
},
{
"name":"java.io.FilePermission"
},
{
"name":"java.lang.Object",
"queryAllDeclaredMethods":true
},
{
"name":"java.lang.Record"
},
{
"name":"java.lang.RuntimePermission"
},
{
"name":"java.lang.Thread",
"fields":[{"name":"threadLocalRandomProbe"}]
Expand All @@ -166,54 +152,24 @@
"name":"java.lang.reflect.Method",
"methods":[{"name":"isVarArgs","parameterTypes":[] }]
},
{
"name":"java.net.NetPermission"
},
{
"name":"java.net.Socket",
"methods":[{"name":"setOption","parameterTypes":["java.net.SocketOption","java.lang.Object"] }]
},
{
"name":"java.net.SocketPermission"
},
{
"name":"java.net.URLPermission",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String","java.lang.String"] }]
},
{
"name":"java.nio.Buffer"
},
{
"name":"java.security.AllPermission"
},
{
"name":"java.security.SecureRandomParameters"
},
{
"name":"java.security.SecurityPermission"
},
{
"name":"java.util.PropertyPermission"
},
{
"name":"java.util.concurrent.ForkJoinTask",
"fields":[{"name":"aux"}, {"name":"status"}]
},
{
"name":"java.util.concurrent.atomic.AtomicBoolean",
"fields":[{"name":"value"}]
},
{
"name":"java.util.concurrent.atomic.AtomicReference",
"fields":[{"name":"value"}]
},
{
"name":"java.util.concurrent.atomic.Striped64",
"fields":[{"name":"base"}, {"name":"cellsBusy"}]
},
{
"name":"javax.smartcardio.CardPermission"
},
{
"name":"jdk.internal.misc.Unsafe"
},
Expand Down Expand Up @@ -244,5 +200,17 @@
{
"name":"void",
"fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}]
},
{
"name":"org.bson.codecs.kotlin.DataClassCodecProvider"
},
{
"name":"org.bson.codecs.kotlinx.KotlinSerializerCodecProvider"
},
{
"name":"org.bson.codecs.record.RecordCodecProvider"
},
{
"name":"org.slf4j.Logger"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,44 @@
"methods":[{"name":"valueOf","parameterTypes":["java.lang.String"] }]
},
{
"name":"org.slf4j.Logger"
"name":"com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"java.io.FilePermission"
},
{
"name":"java.lang.RuntimePermission"
},
{
"name":"java.net.NetPermission"
},
{
"name":"java.net.SocketPermission"
},
{
"name":"java.net.URLPermission",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String","java.lang.String"] }]
},
{
"name":"java.security.AllPermission"
},
{
"name":"java.security.SecurityPermission"
},
{
"name":"java.util.PropertyPermission"
},
{
"name":"java.util.concurrent.atomic.AtomicBoolean",
"fields":[{"name":"value"}]
},
{
"name":"java.util.concurrent.atomic.AtomicReference",
"fields":[{"name":"value"}]
},
{
"name":"javax.smartcardio.CardPermission"
},
{
"name":"reactivestreams.tour.Address",
Expand Down

0 comments on commit 3bc66d2

Please sign in to comment.