lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: SolrCache not using generics?
Date Tue, 01 Dec 2009 01:54:49 GMT

: Subject: SolrCache not using generics?
: Maybe we can add generics to SolrCache or is there a design reason not to?

I assuming you are talking about the put/get and regenerator methods 
dealing with "Object" ?

Generics were probably never added is because of how the Caches get 
instantiated via reflection -- making them generic might make development 
simpler (eliminate the need for explicit casting) but the run time risk 
still exists that some code could shove something in a cache of a 
different type then you are expecting to get back out.

Of course: that risk exists with any Generic-ized class you don't 
instantiate yourself, so i don't see any downside to adding them.


View raw message