poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Micich" <josh.mic...@gmail.com>
Subject Reduce visibility of HSSFFormulaEvaluator protected methods
Date Thu, 14 Feb 2008 07:22:47 GMT
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


Mime
View raw message