Skip to content

Commit c5a404a

Browse files
stuartwdouglasalesj
authored andcommitted
WELD-1031 Use correct ProtectionDomain
1 parent 4faea71 commit c5a404a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

impl/src/main/java/org/jboss/weld/bean/proxy/ProxyFactory.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ public class ProxyFactory<T> {
9595
private final ClassLoader classLoader;
9696
private final String baseProxyName;
9797
private final Bean<?> bean;
98-
private final Class<?> proxiedBeanType;
9998
private final String contextId;
99+
private final Class<?> proxiedBeanType;
100100

101101
public static final String CONSTRUCTED_FLAG_NAME = "constructed";
102102

@@ -341,7 +341,6 @@ private void addDefaultAdditionalInterfaces() {
341341
* implement
342342
*/
343343
protected void addAdditionalInterfaces(Set<Class<?>> interfaces) {
344-
345344
}
346345

347346
private Class<T> createProxyClass(String proxyClassName) throws Exception {
@@ -379,9 +378,8 @@ private Class<T> createProxyClass(String proxyClassName) throws Exception {
379378
// TODO: change the ProxyServices SPI to allow the container to figure out
380379
// which PD to use
381380

382-
383381
ProtectionDomain domain = proxiedBeanType.getProtectionDomain();
384-
if (proxiedBeanType.getPackage() == null || proxiedBeanType.equals(Object.class)) {
382+
if(proxiedBeanType.getPackage() == null || proxiedBeanType.equals(Object.class)) {
385383
domain = ProxyFactory.class.getProtectionDomain();
386384
}
387385
Class<T> proxyClass = cast(ClassFileUtils.toClass(proxyClassType, classLoader, domain));

0 commit comments

Comments
 (0)