Skip to content

Commit

Permalink
HHH-19104 Envers - Reset ReflectionTools cache on disintegration
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet authored and yrodiere committed Feb 6, 2025
1 parent d20cc57 commit ecc2151
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.hibernate.envers.event.spi.EnversPreCollectionRemoveEventListenerImpl;
import org.hibernate.envers.event.spi.EnversPreCollectionUpdateEventListenerImpl;
import org.hibernate.envers.event.spi.EnversPreUpdateEventListenerImpl;
import org.hibernate.envers.internal.tools.ReflectionTools;
import org.hibernate.event.service.spi.EventListenerRegistry;
import org.hibernate.event.spi.EventType;
import org.hibernate.integrator.spi.Integrator;
Expand Down Expand Up @@ -117,6 +118,6 @@ public void integrate(

@Override
public void disintegrate(SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry) {
// nothing to do
ReflectionTools.reset();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,9 @@ public static <T> Class<T> loadClass(String name, ClassLoaderService classLoader
throw new ClassLoadingException( "Unable to load class [" + name + "]", e );
}
}

public static void reset() {
SETTER_CACHE.clear();
GETTER_CACHE.clear();
}
}

0 comments on commit ecc2151

Please sign in to comment.