Skip to content

Commit

Permalink
WELD-2796 For built-in beans, the proxy's originalClass should be the…
Browse files Browse the repository at this point in the history
… implemented type
  • Loading branch information
manovotn committed Aug 21, 2024
1 parent ffd8a83 commit c669c19
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion impl/src/main/java/org/jboss/weld/bean/proxy/ProxyFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,16 @@ public Class<T> getProxyClass() {
proxyClassName = proxyClassName.replaceFirst(JAKARTA, WELD_PROXY_PREFIX);
}
Class<T> proxyClass = null;
Class<?> originalClass = bean != null ? bean.getBeanClass() : proxiedBeanType;
Class<?> originalClass;
if (bean == null) {
originalClass = proxiedBeanType;
} else {
if (bean instanceof AbstractBuiltInBean<?>) {
originalClass = ((AbstractBuiltInBean<?>) bean).getType();
} else {
originalClass = bean.getBeanClass();
}
}
BeanLogger.LOG.generatingProxyClass(proxyClassName);
try {
// First check to see if we already have this proxy class
Expand Down

0 comments on commit c669c19

Please sign in to comment.