lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Cowan <co...@aconex.com>
Subject Re: Gentle Prod: LUCENE-1626 (flexible getPositionIncrementGap)
Date Tue, 18 Aug 2009 00:44:33 GMT
Mark Miller wrote:
> Why wouldn't people overriding the method be declaring it as protected 
> as well?

I'm talking about _existing_ code... i.e. if someone already has:

public class CrazyAnalyzer ... {
	public int getPositionIncrementGap(String field) {
	  return random.nextInt(100);
	}
}

then my change (making gPIG(String) protected) won't break it. It will 
also continue to behave as expected due to the default impl of 
gPIG(String, int).

Presumably people who are implementing new analyzers after this would 
make it protected, but it won't break back-compat of existing public 
overrides.

Paul


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message