Looks like there is a bug/oddity in RequestHandlers. If a Handler was lazy and implemented ResourceLoaderAware, you would get a null pointer exception. Seems 'handler' should be used rather than '_handler', except that RequestHandlers are not even allowed to implement ResourceLoaderAware? Should we just drop

         if( handler instanceof SolrCoreAware ) {
           ((SolrCoreAware)handler).inform( core );
         }

?

----------------------------------------------
   public synchronized SolrRequestHandler getWrappedHandler()
   {
     if( _handler == null ) {
       try {
SolrRequestHandler handler = core.createRequestHandler(_className);
         handler.init( _args );

         if( handler instanceof ResourceLoaderAware ) {
((ResourceLoaderAware)_handler).inform( core.getSolrConfig().getResourceLoader() );
         }

         if( handler instanceof SolrCoreAware ) {
           ((SolrCoreAware)handler).inform( core );
         }
         _handler = handler;
       }
       catch( Exception ex ) {
throw new SolrException( SolrException.ErrorCode.SERVER_ERROR, "lazy loading error", ex );
       }
     }
     return _handler;
   }

--
- Mark

http://www.lucidimagination.com



Reply via email to