From 3117a435471968441ff0ddf2654697b7cf325bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20L=C3=B3pez?= Date: Fri, 24 Jan 2020 15:40:39 +0100 Subject: [PATCH] Initialize some classes at runtime to improve GraalVM support (#9963) Motivation: Deploying a Micronaut application as GraalVM native image to AWS Lambda with custom runtime fails when using Micronaut Http Client. This PR initializes at runtime some classes needed to fix the issue. There is more information in our original issue in Micronaut https://github.com/micronaut-projects/micronaut-core/issues/2335#issuecomment-570151944 At this moment I've added those classes into Micronaut (https://github.com/micronaut-projects/micronaut-core/pull/2680/commits/b383d3ab14a8fb9368758f889f361e76994ac963) as a workaround but this should be included in Netty so it's available for everyone. Modification: Mark 3 classes to be initialized at runtime for GraalVM. Result: Mark 3 classes to be initialized at runtime for GraalVM. --- .../native-image/io.netty/common/native-image.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/resources/META-INF/native-image/io.netty/common/native-image.properties b/common/src/main/resources/META-INF/native-image/io.netty/common/native-image.properties index 4caafe753f..6ee95c7c43 100644 --- a/common/src/main/resources/META-INF/native-image/io.netty/common/native-image.properties +++ b/common/src/main/resources/META-INF/native-image/io.netty/common/native-image.properties @@ -12,4 +12,4 @@ # License for the specific language governing permissions and limitations # under the License. -Args = --initialize-at-run-time=io.netty.util.AbstractReferenceCounted +Args = --initialize-at-run-time=io.netty.util.AbstractReferenceCounted,io.netty.util.concurrent.GlobalEventExecutor,io.netty.util.concurrent.ImmediateEventExecutor,io.netty.util.concurrent.ScheduledFutureTask