Skip to content

Commit

Permalink
minor bug fix when using unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas authored and pmuir committed Aug 26, 2010
1 parent e208d73 commit 39cde6d
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -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());
}
Expand Down

0 comments on commit 39cde6d

Please sign in to comment.