From c4bfc05bedae6945f0ce7da738b67f6cdfebdbcb Mon Sep 17 00:00:00 2001 From: Matej Novotny Date: Wed, 17 May 2023 13:34:52 +0200 Subject: [PATCH] Arc - log a WARN if we encounter unproxyable JDK class since we cannot transform it either --- .../src/main/java/io/quarkus/arc/processor/Methods.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/Methods.java b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/Methods.java index cfede7633304b..c6c3c7e4df94a 100644 --- a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/Methods.java +++ b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/Methods.java @@ -123,10 +123,16 @@ private static boolean skipForClientProxy(MethodInfo method, boolean transformUn .add(NameAndDescriptor.fromMethodInfo(method)); return false; } - + // in case we want to transform classes but are unable to, we log a WARN LOGGER.warn(String.format( "Final method %s.%s() is ignored during proxy generation and should never be invoked upon the proxy instance!", className, method.name())); + } else { + // JDK classes with final method are not proxyable and not transformable, we skip those methods and log a WARN + LOGGER.warn(String.format( + "JDK class %s with final method %s() cannot be proxied and is not transformable. " + + "This method will be ignored during proxy generation and should never be invoked upon the proxy instance!", + className, method.name())); } return true; }