Skip to content

Commit

Permalink
Merge pull request #33440 from manovotn/clientProxyWithFinalMethods
Browse files Browse the repository at this point in the history
Arc - log a WARN if we encounter unproxyable JDK class since we cannot transform it either
  • Loading branch information
manovotn authored May 18, 2023
2 parents 0e63bfc + c4bfc05 commit 48d3265
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 48d3265

Please sign in to comment.