forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Register methods & classes reflectively accessed by java.io.Console
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
core/deployment/src/main/java/io/quarkus/deployment/ConsoleProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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])); | ||
} | ||
} |