Fixes previously failing unit test (class cast exception in creating workbook...tried to cast

to ExternSheet when it was an UnknownRecord due to omission from RecordFactory.
Points out an annoying feature of HSSF architecture..  SID is used for identification instead
of instanceof for the purpose of efficiency and...cleanliness but in the event of unknown
record you can have an unfortunate mismatch.  Not sure what an acceptable solution is.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352490 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew C. Oliver 2002-04-27 01:32:58 +00:00
parent 0173730c4e
commit 5d1bc31c98

View File

@ -106,7 +106,7 @@ public class RecordFactory
WindowTwoRecord.class, SelectionRecord.class, ContinueRecord.class,
LabelRecord.class, BlankRecord.class, ColumnInfoRecord.class,
MulRKRecord.class, MulBlankRecord.class, MergeCellsRecord.class,
FormulaRecord.class, BoolErrRecord.class
FormulaRecord.class, BoolErrRecord.class, ExternSheetRecord.class
};
} else {
records = new Class[]
@ -134,7 +134,7 @@ public class RecordFactory
WindowTwoRecord.class, SelectionRecord.class, ContinueRecord.class,
LabelRecord.class, BlankRecord.class, ColumnInfoRecord.class,
MulRKRecord.class, MulBlankRecord.class, MergeCellsRecord.class,
BoolErrRecord.class
BoolErrRecord.class, ExternSheetRecord.class
};
}