lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Cowan <>
Subject Re: Gentle Prod: LUCENE-1626 (flexible getPositionIncrementGap)
Date Tue, 18 Aug 2009 00:26:49 GMT
Mark Miller wrote:
> Hmm ... I don't think it should become protected - is there a good 
> reason for this? - it should probably remain public to preserve back 
> compat.

Not sure how making it protected breaks backcompat. If people are 
calling it directly (in their own inverter? Not sure if that would ever 
happen) they'd be getting the wrong result after the change, because the 
(String, int) version actually becomes the correct public API to find 
the gap. Otherwise people might write their own analyzer just overriding 
the new method, and one particular inverter implementation would ignore 
their change.

If people are overriding the method in their own analyzers (which is 
presumably happening... that's what it's for) making it protected won't 
break compat -- people who are overriding the method must be declaring 
their overridden ones as public now, and overriding a protected method 
with a public one is perfectly acceptable (just not vice-versa).



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message