You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Mark Miller <ma...@gmail.com> on 2009/05/22 14:46:32 UTC

whackiness in dispatch filter

In SolrDispatchFilter there is now a parsers field of 

protected final WeakHashMap<SolrConfig, SolrRequestParsers> parsers = 
new WeakHashMap<SolrConfig, SolrRequestParsers>();


It was <SolrCore, SolrRequestParsers> in Solr 1.3. Whats the reason for 
the change? Below, in doFilter we are still actually using SolrCore 
rather than SolrConfig. Offhand I'm not sure why the compiler does not 
complain, but it seems a little odd:

          SolrRequestParsers parser = null;
          parser = parsers.get(core);
          if( parser == null ) {
            parser = new SolrRequestParsers(config);
            parsers.put( core.getSolrConfig(), parser );
          }

-- 
- Mark

http://www.lucidimagination.com