From dba488131818821292333c965c1021afd9fa9108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= <141109+sdeleuze@users.noreply.github.com> Date: Thu, 6 Feb 2025 09:15:45 +0100 Subject: [PATCH] Refine the CGLIB error message with native See gh-34370 --- .../org/springframework/cglib/core/AbstractClassGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-core/src/main/java/org/springframework/cglib/core/AbstractClassGenerator.java b/spring-core/src/main/java/org/springframework/cglib/core/AbstractClassGenerator.java index 0301591b2b63..2d1ff69e839a 100644 --- a/spring-core/src/main/java/org/springframework/cglib/core/AbstractClassGenerator.java +++ b/spring-core/src/main/java/org/springframework/cglib/core/AbstractClassGenerator.java @@ -360,7 +360,7 @@ protected Class generate(ClassLoaderData data) { // SPRING PATCH BEGIN if (inNativeImage) { throw new UnsupportedOperationException("CGLIB runtime enhancement not supported on native image. " + - "Make sure to enable Spring AOT processing in order to pre-generate this class: " + getClassName()); + "Make sure to enable Spring AOT processing to pre-generate '" + getClassName() + "' at build time."); } // SPRING PATCH END byte[] b = strategy.generate(this);