We currently have several Util classes that serve the purpose of reducing
duplicated code between HSSF and XSSF.

I rambled about this all little on bug 58787 [1], but figured a mail list
was more appropriate for discussion.

There are certainly some good cases for having Util classes, but sometimes
the best thing is to have the functionality right in the class. The problem
is there is no place to put code that would be used by all implementing
classes besides a utility.

Perhaps we should convert Workbook, Sheet, Row, and Cell (and really
everything) to abstract classes so that generic code can be written in one
place rather than duplicated across implementing classes. I don't know if
this means we want to insert another level into the inheritance tree, such
as interface ICell -> abstract Cell -> implementing class HSSFCell. If we
don't want to separate interface from abstract class, we could make Cell
abstract, which wouldn't affect backwards compatibility.

This applies to Common SL as well, and is something to keep in mind for all
classes.

Thoughts?

[1] https://bz.apache.org/bugzilla/show_bug.cgi?id=58787#c8

Reply via email to