Bug 44894 - [patch] move some logic from EventRecordFactory to RecordFactory
[patch] move some logic from EventRecordFactory to RecordFactory
Status: RESOLVED FIXED
Product: POI
Classification: Unclassified
Component: HSSF
unspecified
PC Windows XP
: P2 minor (vote)
: ---
Assigned To: POI Developers List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-04-28 11:49 UTC by Josh Micich
Modified: 2008-08-04 14:16 UTC (History)
0 users



Attachments
svn diff of 2 changed files (18.98 KB, patch)
2008-04-28 11:51 UTC, Josh Micich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Micich 2008-04-28 11:49:03 UTC
This is some clean-up that's been due for a while.  I didn't apply directly because with the 3.1-beta release, I thought some others should perhaps eye-ball these changes first.

RecordFactory was deprecated a while ago, (EventRecordFactory is the preferred class) but the duplicate code has not been maintained properly.  This patch is a small step toward consolidating the list of record classes.

The biggest change is in EventRecordFactory (adding 30 odd missing record types).  In RecordFactory the method createRecord() would now call EventRecordFactory.createRecord().  After making that initial change, much of the old duplicate code can be deleted from RecordFactory.


BTW - Can someone please post a comment regarding the incentive behind moving to EventRecordFactory?  As far as I can understand the most important client of this logic (HSSFWorkBook) doesn't even use it.
Comment 1 Josh Micich 2008-04-28 11:51:43 UTC
Created attachment 21874 [details]
svn diff of 2 changed files
Comment 2 Nick Burch 2008-07-10 15:55:19 UTC
I guess this patch could be applied now?

I think the difference between RecordFactory and EventRecordFactory is when the records are created - in one go, or as required
Comment 3 Josh Micich 2008-08-04 14:16:37 UTC
Fixed in svn r682508/r682510

The duplicate logic referred to here was RecordFactory.createRecord() (and supporting methods).  This logic is more at home on RecordFactory.  EventRecordFactory has been greatly simplified.