Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

ISPN-2567 ClassCastException from org.infinispan.query.impl.Lifecycle…


Check if the component is not the REMOVED_REGISTRY_COMPONENT before casting to SearchFactoryIntegrator.
  • Loading branch information...
1 parent cd8d0e5 commit 992a73d7dc1f6b047b74fefa793a60ed415e7143 @anistor anistor committed with danberindei
6 query/src/main/java/org/infinispan/query/impl/
@@ -244,9 +244,9 @@ private SearchFactoryIntegrator getSearchFactory(Properties indexingProperties,
public void cacheStopping(ComponentRegistry cr, String cacheName) {
//TODO move this to cacheStopped event (won't work right now as the ComponentRegistry is half empty at that point: ISPN-1006)
- SearchFactoryIntegrator searchFactoryImplementor = cr.getComponent(SearchFactoryIntegrator.class);
- if (searchFactoryImplementor != null && searchFactoryImplementor != REMOVED_REGISTRY_COMPONENT) {
- searchFactoriesToShutdown.put(cacheName, searchFactoryImplementor);
+ Object searchFactoryIntegrator = cr.getComponent(SearchFactoryIntegrator.class);
+ if (searchFactoryIntegrator != null && searchFactoryIntegrator != REMOVED_REGISTRY_COMPONENT) {
+ searchFactoriesToShutdown.put(cacheName, (SearchFactoryIntegrator) searchFactoryIntegrator);
//free some memory by de-registering the SearchFactory
cr.registerComponent(REMOVED_REGISTRY_COMPONENT, SearchFactoryIntegrator.class);

0 comments on commit 992a73d

Please sign in to comment.
Something went wrong with that request. Please try again.