From 5d1bc31c98111cef52f7c3eef1616a94c2d2597f Mon Sep 17 00:00:00 2001 From: "Andrew C. Oliver" Date: Sat, 27 Apr 2002 01:32:58 +0000 Subject: [PATCH] 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 --- src/java/org/apache/poi/hssf/record/RecordFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/poi/hssf/record/RecordFactory.java b/src/java/org/apache/poi/hssf/record/RecordFactory.java index 4a1ce1933..7df806e79 100644 --- a/src/java/org/apache/poi/hssf/record/RecordFactory.java +++ b/src/java/org/apache/poi/hssf/record/RecordFactory.java @@ -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 }; }