Skip to content

Commit

Permalink
Fix NioSocketChannel usage in graalvm native-image (#13938)
Browse files Browse the repository at this point in the history
Motivation:

Using NioSocketChannel is currently broken in graalvm native-image
builds. Trying to use it throws:
java.lang.NoSuchMethodException:
io.netty.channel.socket.nio.NioSocketChannel.<init>()

Modification:
Add it to the graalvm metadata json

Result:
Graalvm will include this method as reachable via reflection.
  • Loading branch information
ianopolous committed Mar 28, 2024
1 parent 314d59b commit 7f23c95
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -5,6 +5,12 @@
{ "name": "<init>", "parameterTypes": [] }
]
},
{
"name": "io.netty.channel.socket.nio.NioSocketChannel",
"methods": [
{ "name": "<init>", "parameterTypes": [] }
]
},
{
"name": "sun.nio.ch.SelectorImpl",
"fields": [
Expand Down

0 comments on commit 7f23c95

Please sign in to comment.