lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: [important] call for 1.3 planning
Date Mon, 26 May 2008 16:50:53 GMT

: I don't know exactly what Hoss has in mind, but for one thing it would mean we
: would need to support this in the future.

As a general rule, and time you make *any* class public if it was 
previously protected (or non-final if it was previously final) you need to 
do a holistic review of all the protected and private methods/variables in 
that class to assess:
  1) does the current access level make sense if people subclass this class?
  2) does the access level of anything else in this class need to change 
     in order for this to be useful to a subclass?
  3) is this an API we are willing to support in the future?

As a general rule, you also shouldn't have a class that you expect/allow 
people to subclass without also having at least one subclass in the code 
base -- if nothing else: a subclass that exists just in a test to prove 
that subclassing "works".

This is just the basics for making a vanilla class non-final (and or 
public) ... it doesn't even get into the bigger API questions we should 
ask before making a whole new type of "pluggable" class.


View raw message