lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: svn commit: r792861 - in /lucene/solr/trunk/src: java/org/apache/solr/core/RequestHandlers.java java/org/apache/solr/core/SolrCore.java webapp/web/admin/index.jsp webapp/web/admin/replication/header.jsp
Date Mon, 13 Jul 2009 05:31:37 GMT

: > Also, may want to use instanceof instead of == for class comparison, in case
: > subclasses are used.
: 
: should we do that ?

i already did.

: I did it intentionally. The user who makes that call knows the class
: of the handler. If there is another handler which extends the class he
: may get that instance which may not be desirable

inheritence is an "is a" relationship -- if a class is special enough that 
people expecting instances of it won't function properly when given a 
subclass, then that special class should be final.

In this specific case: if i subclass ReplicationHandler to record some 
extra stats, or have some additional side effect, that shouldn't make that 
link vanish.




-Hoss


Mime
View raw message