diff --git a/impl/src/main/java/org/jboss/weld/bean/proxy/ProxyFactory.java b/impl/src/main/java/org/jboss/weld/bean/proxy/ProxyFactory.java index d090f910d1c..c808c7f2080 100644 --- a/impl/src/main/java/org/jboss/weld/bean/proxy/ProxyFactory.java +++ b/impl/src/main/java/org/jboss/weld/bean/proxy/ProxyFactory.java @@ -170,9 +170,10 @@ public T create(BeanInstance beanInstance) { proxy = SecureReflections.newUnsafeInstance(proxyClass); //we need to inialize the ThreadLocal via reflection + // TODO: there is probably a better way to to this try { - Field sfield = proxyClass.getField(FIRST_SERIALIZATION_PHASE_COMPLETE_FIELD_NAME); + Field sfield = proxyClass.getDeclaredField(FIRST_SERIALIZATION_PHASE_COMPLETE_FIELD_NAME); sfield.setAccessible(true); sfield.set(proxy, new ThreadLocal()); }