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 Chris Hostetter <ho...@fucit.org> on 2009/12/01 02:54:49 UTC
Re: SolrCache not using generics?
: 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.
-Hoss