You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Josh Micich <jo...@gmail.com> on 2008/02/14 08:22:47 UTC
Reduce visibility of HSSFFormulaEvaluator protected methods
HSSFFormulaEvaluator has several protected methods, which suggests the
presence of a subclass, but no subclass exists within POI. My guess
is that this is a mistake and these methods really should be private
(indeed one comment even says as much).
The reason this has become a problem is that one recent bug fix (44413
concerning circular references) was more complicated than necessary
due to these methods having too high scope. The most simple approach
would have been to add an extra parameter to a few methods, but this
was not a safe thing to do since some of the methods are protected.
The alternate approach taken was to use a ThreadLocal (passing
parameters implicitly) which added unnecessary complexity.
If it was really intended for clients to subclass
HSSFFormulaEvaluator, it would be better to formalise the required API
with an interface. Inheritance across projects/jars makes for less
maintainable code.
-Josh Micich
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: Reduce visibility of HSSFFormulaEvaluator protected methods
Posted by Nick Burch <ni...@torchbox.com>.
On Wed, 13 Feb 2008, Josh Micich wrote:
> HSSFFormulaEvaluator has several protected methods, which suggests the
> presence of a subclass, but no subclass exists within POI. My guess is
> that this is a mistake and these methods really should be private
> (indeed one comment even says as much).
It looks likely that that's the case to me too
Amol and Avik - svn blame has you down for a lot of the code in
HSSFFormulaEvaluator. Do either of you know why we couldn't make more of
it private?
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org