Bug 44894

Summary: [patch] move some logic from EventRecordFactory to RecordFactory
Product: POI Reporter: Josh Micich <josh>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: minor    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: svn diff of 2 changed files

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.