Skip to content

Commit

Permalink
Register methods & classes reflectively accessed by java.io.Console
Browse files Browse the repository at this point in the history
  • Loading branch information
zakkak committed Nov 22, 2024
1 parent 296ffde commit 6a76562
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package io.quarkus.deployment;

import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveMethodBuildItem;

public class ConsoleProcessor {
@BuildStep
void registerResources(BuildProducer<ReflectiveMethodBuildItem> methods, BuildProducer<ReflectiveClassBuildItem> classes) {
classes.produce(ReflectiveClassBuildItem.builder("jdk.jshell.execution.impl.ConsoleImpl$ConsoleProviderImpl")
.build());
methods.produce(
new ReflectiveMethodBuildItem("Reflectively accessed transitively through java.io.Console's class initializer",
"jdk.jshell.execution.impl.ConsoleImpl$ConsoleProviderImpl",
"provider", new String[0]));
classes.produce(ReflectiveClassBuildItem.builder("jdk.internal.org.jline.JdkConsoleProviderImpl")
.build());
methods.produce(
new ReflectiveMethodBuildItem("Reflectively accessed transitively through java.io.Console's class initializer",
"jdk.internal.org.jline.JdkConsoleProviderImpl",
"provider", new String[0]));
}
}

0 comments on commit 6a76562

Please sign in to comment.