From fa90245b9646d4bb365b2f4c849b903dd970370a Mon Sep 17 00:00:00 2001 From: Josh Micich Date: Tue, 30 Sep 2008 02:30:53 +0000 Subject: [PATCH] Removed validateSid method from Record classes git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@700327 13f79535-47bb-0310-9956-ffa450edef68 --- .../record/AbstractEscherHolderRecord.java | 13 --------- .../poi/hssf/record/AreaFormatRecord.java | 13 --------- .../apache/poi/hssf/record/AreaRecord.java | 13 --------- .../poi/hssf/record/AxisLineFormatRecord.java | 13 --------- .../poi/hssf/record/AxisOptionsRecord.java | 13 --------- .../poi/hssf/record/AxisParentRecord.java | 13 --------- .../apache/poi/hssf/record/AxisRecord.java | 13 --------- .../poi/hssf/record/AxisUsedRecord.java | 13 --------- .../org/apache/poi/hssf/record/BOFRecord.java | 8 ----- .../apache/poi/hssf/record/BackupRecord.java | 8 ----- .../org/apache/poi/hssf/record/BarRecord.java | 13 --------- .../apache/poi/hssf/record/BeginRecord.java | 8 ----- .../apache/poi/hssf/record/BlankRecord.java | 14 --------- .../poi/hssf/record/BookBoolRecord.java | 8 ----- .../apache/poi/hssf/record/BoolErrRecord.java | 14 --------- .../poi/hssf/record/BottomMarginRecord.java | 15 +--------- .../poi/hssf/record/BoundSheetRecord.java | 6 ---- .../poi/hssf/record/CFHeaderRecord.java | 16 ---------- .../apache/poi/hssf/record/CFRuleRecord.java | 15 ---------- .../poi/hssf/record/CRNCountRecord.java | 6 ---- .../org/apache/poi/hssf/record/CRNRecord.java | 6 ---- .../poi/hssf/record/CalcCountRecord.java | 8 ----- .../poi/hssf/record/CalcModeRecord.java | 8 ----- .../hssf/record/CategorySeriesAxisRecord.java | 13 --------- .../poi/hssf/record/ChartFormatRecord.java | 8 ----- .../apache/poi/hssf/record/ChartRecord.java | 13 --------- .../hssf/record/ChartTitleFormatRecord.java | 7 ----- .../poi/hssf/record/CodepageRecord.java | 8 ----- .../poi/hssf/record/ColumnInfoRecord.java | 8 ----- .../record/CommonObjectDataSubRecord.java | 13 --------- .../poi/hssf/record/ContinueRecord.java | 14 --------- .../apache/poi/hssf/record/CountryRecord.java | 8 ----- .../apache/poi/hssf/record/DBCellRecord.java | 8 ----- .../org/apache/poi/hssf/record/DSFRecord.java | 8 ----- .../apache/poi/hssf/record/DVALRecord.java | 8 ----- .../org/apache/poi/hssf/record/DVRecord.java | 6 ---- .../org/apache/poi/hssf/record/DatRecord.java | 13 --------- .../poi/hssf/record/DataFormatRecord.java | 13 --------- .../poi/hssf/record/DateWindow1904Record.java | 8 ----- .../hssf/record/DefaultColWidthRecord.java | 8 ----- .../DefaultDataLabelTextPropertiesRecord.java | 13 --------- .../hssf/record/DefaultRowHeightRecord.java | 8 ----- .../apache/poi/hssf/record/DeltaRecord.java | 8 ----- .../poi/hssf/record/DimensionsRecord.java | 8 ----- .../apache/poi/hssf/record/DrawingRecord.java | 13 --------- .../org/apache/poi/hssf/record/EOFRecord.java | 8 ----- .../record/EmbeddedObjectRefSubRecord.java | 13 --------- .../org/apache/poi/hssf/record/EndRecord.java | 9 ------ .../apache/poi/hssf/record/EndSubRecord.java | 13 --------- .../poi/hssf/record/ExtSSTInfoSubRecord.java | 6 ---- .../apache/poi/hssf/record/ExtSSTRecord.java | 8 ----- .../poi/hssf/record/ExtendedFormatRecord.java | 8 ----- .../poi/hssf/record/ExternSheetRecord.java | 12 -------- .../poi/hssf/record/ExternalNameRecord.java | 13 --------- .../poi/hssf/record/FilePassRecord.java | 8 ----- .../poi/hssf/record/FileSharingRecord.java | 6 ---- .../poi/hssf/record/FnGroupCountRecord.java | 8 ----- .../poi/hssf/record/FontBasisRecord.java | 13 --------- .../poi/hssf/record/FontIndexRecord.java | 13 --------- .../apache/poi/hssf/record/FontRecord.java | 8 ----- .../apache/poi/hssf/record/FooterRecord.java | 8 ----- .../apache/poi/hssf/record/FormatRecord.java | 8 ----- .../apache/poi/hssf/record/FormulaRecord.java | 12 -------- .../apache/poi/hssf/record/FrameRecord.java | 13 --------- .../apache/poi/hssf/record/GridsetRecord.java | 8 ----- .../poi/hssf/record/GroupMarkerSubRecord.java | 13 --------- .../apache/poi/hssf/record/GutsRecord.java | 8 ----- .../apache/poi/hssf/record/HCenterRecord.java | 8 ----- .../apache/poi/hssf/record/HeaderRecord.java | 8 ----- .../apache/poi/hssf/record/HideObjRecord.java | 8 ----- .../record/HorizontalPageBreakRecord.java | 7 ----- .../poi/hssf/record/HyperlinkRecord.java | 8 ----- .../apache/poi/hssf/record/IndexRecord.java | 8 ----- .../poi/hssf/record/InterfaceEndRecord.java | 8 ----- .../poi/hssf/record/InterfaceHdrRecord.java | 8 ----- .../poi/hssf/record/IterationRecord.java | 8 ----- .../apache/poi/hssf/record/LabelRecord.java | 14 --------- .../poi/hssf/record/LabelSSTRecord.java | 9 ------ .../poi/hssf/record/LeftMarginRecord.java | 15 +--------- .../apache/poi/hssf/record/LegendRecord.java | 13 --------- .../poi/hssf/record/LineFormatRecord.java | 13 --------- .../poi/hssf/record/LinkedDataRecord.java | 13 --------- .../org/apache/poi/hssf/record/MMSRecord.java | 8 ----- .../poi/hssf/record/MergeCellsRecord.java | 7 ----- .../poi/hssf/record/MulBlankRecord.java | 15 ---------- .../apache/poi/hssf/record/MulRKRecord.java | 15 ---------- .../apache/poi/hssf/record/NameRecord.java | 12 -------- .../apache/poi/hssf/record/NoteRecord.java | 13 --------- .../hssf/record/NoteStructureSubRecord.java | 13 --------- .../hssf/record/NumberFormatIndexRecord.java | 13 --------- .../apache/poi/hssf/record/NumberRecord.java | 15 ---------- .../org/apache/poi/hssf/record/ObjRecord.java | 13 --------- .../poi/hssf/record/ObjectLinkRecord.java | 13 --------- .../poi/hssf/record/ObjectProtectRecord.java | 8 ----- .../apache/poi/hssf/record/PaletteRecord.java | 8 ----- .../apache/poi/hssf/record/PaneRecord.java | 13 --------- .../poi/hssf/record/PasswordRecord.java | 6 ---- .../poi/hssf/record/PasswordRev4Record.java | 8 ----- .../poi/hssf/record/PlotAreaRecord.java | 13 --------- .../poi/hssf/record/PlotGrowthRecord.java | 13 --------- .../poi/hssf/record/PrecisionRecord.java | 8 ----- .../poi/hssf/record/PrintGridlinesRecord.java | 8 ----- .../poi/hssf/record/PrintHeadersRecord.java | 8 ----- .../poi/hssf/record/PrintSetupRecord.java | 9 ------ .../apache/poi/hssf/record/ProtectRecord.java | 8 ----- .../poi/hssf/record/ProtectionRev4Record.java | 8 ----- .../org/apache/poi/hssf/record/RKRecord.java | 8 ----- .../poi/hssf/record/RecalcIdRecord.java | 8 ----- .../org/apache/poi/hssf/record/Record.java | 10 ------- .../apache/poi/hssf/record/RefModeRecord.java | 8 ----- .../poi/hssf/record/RefreshAllRecord.java | 8 ----- .../poi/hssf/record/RightMarginRecord.java | 13 +-------- .../org/apache/poi/hssf/record/RowRecord.java | 8 ----- .../org/apache/poi/hssf/record/SCLRecord.java | 13 --------- .../org/apache/poi/hssf/record/SSTRecord.java | 17 ----------- .../poi/hssf/record/SaveRecalcRecord.java | 8 ----- .../hssf/record/ScenarioProtectRecord.java | 8 ----- .../poi/hssf/record/SelectionRecord.java | 6 ---- .../record/SeriesChartGroupIndexRecord.java | 13 --------- .../poi/hssf/record/SeriesIndexRecord.java | 13 --------- .../poi/hssf/record/SeriesLabelsRecord.java | 13 --------- .../poi/hssf/record/SeriesListRecord.java | 13 --------- .../apache/poi/hssf/record/SeriesRecord.java | 13 --------- .../poi/hssf/record/SeriesTextRecord.java | 13 --------- .../hssf/record/SeriesToChartGroupRecord.java | 13 --------- .../hssf/record/SharedValueRecordBase.java | 6 ---- .../hssf/record/SheetPropertiesRecord.java | 13 --------- .../apache/poi/hssf/record/StringRecord.java | 15 ---------- .../apache/poi/hssf/record/StyleRecord.java | 8 ----- .../apache/poi/hssf/record/SupBookRecord.java | 6 ---- .../apache/poi/hssf/record/TabIdRecord.java | 8 ----- .../poi/hssf/record/TextObjectBaseRecord.java | 13 --------- .../apache/poi/hssf/record/TextRecord.java | 13 --------- .../apache/poi/hssf/record/TickRecord.java | 13 --------- .../poi/hssf/record/TopMarginRecord.java | 15 +--------- .../poi/hssf/record/UncalcedRecord.java | 6 ---- .../apache/poi/hssf/record/UnicodeString.java | 13 +-------- .../apache/poi/hssf/record/UnitsRecord.java | 13 --------- .../apache/poi/hssf/record/UnknownRecord.java | 7 ----- .../poi/hssf/record/UseSelFSRecord.java | 8 ----- .../apache/poi/hssf/record/VCenterRecord.java | 8 ----- .../poi/hssf/record/ValueRangeRecord.java | 13 --------- .../hssf/record/VerticalPageBreakRecord.java | 7 ----- .../apache/poi/hssf/record/WSBoolRecord.java | 8 ----- .../poi/hssf/record/WindowOneRecord.java | 8 ----- .../poi/hssf/record/WindowProtectRecord.java | 8 ----- .../poi/hssf/record/WindowTwoRecord.java | 8 ----- .../poi/hssf/record/WriteAccessRecord.java | 8 ----- .../poi/hssf/record/WriteProtectRecord.java | 8 ----- .../poi/hssf/record/TestAreaFormatRecord.java | 18 ++---------- .../poi/hssf/record/TestAreaRecord.java | 18 ++---------- .../hssf/record/TestAxisLineFormatRecord.java | 19 ++---------- .../hssf/record/TestAxisOptionsRecord.java | 19 ++---------- .../poi/hssf/record/TestAxisParentRecord.java | 19 ++---------- .../poi/hssf/record/TestAxisRecord.java | 20 ++----------- .../poi/hssf/record/TestAxisUsedRecord.java | 19 ++---------- .../apache/poi/hssf/record/TestBarRecord.java | 19 ++---------- .../record/TestCategorySeriesAxisRecord.java | 19 ++---------- .../poi/hssf/record/TestChartRecord.java | 19 ++---------- .../record/TestCommonObjectDataSubRecord.java | 19 ++---------- .../apache/poi/hssf/record/TestDatRecord.java | 19 ++---------- .../poi/hssf/record/TestDataFormatRecord.java | 19 ++---------- ...tDefaultDataLabelTextPropertiesRecord.java | 19 ++---------- .../poi/hssf/record/TestEndSubRecord.java | 20 ++----------- .../hssf/record/TestExtendedFormatRecord.java | 10 +------ .../poi/hssf/record/TestFontBasisRecord.java | 17 ++--------- .../poi/hssf/record/TestFontIndexRecord.java | 19 ++---------- .../poi/hssf/record/TestFontRecord.java | 15 ++-------- .../poi/hssf/record/TestFrameRecord.java | 19 ++---------- .../poi/hssf/record/TestLegendRecord.java | 18 ++---------- .../poi/hssf/record/TestLineFormatRecord.java | 19 ++---------- .../poi/hssf/record/TestLinkedDataRecord.java | 3 -- .../poi/hssf/record/TestNoteRecord.java | 14 ++------- .../record/TestNoteStructureSubRecord.java | 20 +++---------- .../record/TestNumberFormatIndexRecord.java | 19 ++---------- .../poi/hssf/record/TestObjectLinkRecord.java | 29 ++----------------- .../poi/hssf/record/TestPaneRecord.java | 19 ++---------- .../poi/hssf/record/TestPlotAreaRecord.java | 26 ++--------------- .../poi/hssf/record/TestPlotGrowthRecord.java | 19 ++---------- .../apache/poi/hssf/record/TestSCLRecord.java | 19 ++---------- .../TestSeriesChartGroupIndexRecord.java | 20 ++----------- .../hssf/record/TestSeriesIndexRecord.java | 21 ++------------ .../hssf/record/TestSeriesLabelsRecord.java | 18 ++---------- .../poi/hssf/record/TestSeriesListRecord.java | 18 ++---------- .../poi/hssf/record/TestSeriesRecord.java | 18 ++---------- .../poi/hssf/record/TestSeriesTextRecord.java | 28 ++---------------- .../record/TestSeriesToChartGroupRecord.java | 19 ++---------- .../record/TestSheetPropertiesRecord.java | 18 ++---------- .../poi/hssf/record/TestStringRecord.java | 18 ++---------- .../poi/hssf/record/TestSupBookRecord.java | 19 ------------ .../poi/hssf/record/TestTableRecord.java | 1 - .../hssf/record/TestTextObjectBaseRecord.java | 18 ++---------- .../poi/hssf/record/TestTextObjectRecord.java | 16 ++++------ .../poi/hssf/record/TestTextRecord.java | 19 ++---------- .../poi/hssf/record/TestTickRecord.java | 18 ++---------- .../poi/hssf/record/TestUnitsRecord.java | 19 ++---------- .../poi/hssf/record/TestValueRangeRecord.java | 18 ++---------- 197 files changed, 101 insertions(+), 2304 deletions(-) diff --git a/src/java/org/apache/poi/hssf/record/AbstractEscherHolderRecord.java b/src/java/org/apache/poi/hssf/record/AbstractEscherHolderRecord.java index c5fae27ae..89eb9301b 100644 --- a/src/java/org/apache/poi/hssf/record/AbstractEscherHolderRecord.java +++ b/src/java/org/apache/poi/hssf/record/AbstractEscherHolderRecord.java @@ -68,19 +68,6 @@ public abstract class AbstractEscherHolderRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != getSid()) - { - throw new RecordFormatException("Not an escher record! (sid was " + id + ", expecting " + getSid() + ")"); - } - } - protected void fillFields(RecordInputStream in) { escherRecords = new ArrayList(); diff --git a/src/java/org/apache/poi/hssf/record/AreaFormatRecord.java b/src/java/org/apache/poi/hssf/record/AreaFormatRecord.java index 843128120..de810245a 100644 --- a/src/java/org/apache/poi/hssf/record/AreaFormatRecord.java +++ b/src/java/org/apache/poi/hssf/record/AreaFormatRecord.java @@ -60,19 +60,6 @@ public final class AreaFormatRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a AreaFormat record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_foregroundColor = in.readInt(); diff --git a/src/java/org/apache/poi/hssf/record/AreaRecord.java b/src/java/org/apache/poi/hssf/record/AreaRecord.java index fd6528946..17d54ce8b 100644 --- a/src/java/org/apache/poi/hssf/record/AreaRecord.java +++ b/src/java/org/apache/poi/hssf/record/AreaRecord.java @@ -54,19 +54,6 @@ public final class AreaRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a Area record"); - } - } - protected void fillFields(RecordInputStream in) { diff --git a/src/java/org/apache/poi/hssf/record/AxisLineFormatRecord.java b/src/java/org/apache/poi/hssf/record/AxisLineFormatRecord.java index e46ce1a5d..9aa8407fc 100644 --- a/src/java/org/apache/poi/hssf/record/AxisLineFormatRecord.java +++ b/src/java/org/apache/poi/hssf/record/AxisLineFormatRecord.java @@ -58,19 +58,6 @@ public class AxisLineFormatRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a AxisLineFormat record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_axisType = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/AxisOptionsRecord.java b/src/java/org/apache/poi/hssf/record/AxisOptionsRecord.java index 8be3f200b..20ab70bcb 100644 --- a/src/java/org/apache/poi/hssf/record/AxisOptionsRecord.java +++ b/src/java/org/apache/poi/hssf/record/AxisOptionsRecord.java @@ -69,19 +69,6 @@ public final class AxisOptionsRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a AxisOptions record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_minimumCategory = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/AxisParentRecord.java b/src/java/org/apache/poi/hssf/record/AxisParentRecord.java index 3c4d59854..150acb2b2 100644 --- a/src/java/org/apache/poi/hssf/record/AxisParentRecord.java +++ b/src/java/org/apache/poi/hssf/record/AxisParentRecord.java @@ -60,19 +60,6 @@ public class AxisParentRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a AxisParent record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_axisType = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/AxisRecord.java b/src/java/org/apache/poi/hssf/record/AxisRecord.java index b18c9c32f..3f9565124 100644 --- a/src/java/org/apache/poi/hssf/record/AxisRecord.java +++ b/src/java/org/apache/poi/hssf/record/AxisRecord.java @@ -61,19 +61,6 @@ public class AxisRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a Axis record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_axisType = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/AxisUsedRecord.java b/src/java/org/apache/poi/hssf/record/AxisUsedRecord.java index 2b3937978..bde01c32a 100644 --- a/src/java/org/apache/poi/hssf/record/AxisUsedRecord.java +++ b/src/java/org/apache/poi/hssf/record/AxisUsedRecord.java @@ -54,19 +54,6 @@ public class AxisUsedRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a AxisUsed record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_numAxis = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/BOFRecord.java b/src/java/org/apache/poi/hssf/record/BOFRecord.java index dd5335a42..a7c3ee0ef 100644 --- a/src/java/org/apache/poi/hssf/record/BOFRecord.java +++ b/src/java/org/apache/poi/hssf/record/BOFRecord.java @@ -98,14 +98,6 @@ public class BOFRecord // fillFields(data,size); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A BOF RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_version = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/BackupRecord.java b/src/java/org/apache/poi/hssf/record/BackupRecord.java index 6ee6cccfb..47370f4fb 100644 --- a/src/java/org/apache/poi/hssf/record/BackupRecord.java +++ b/src/java/org/apache/poi/hssf/record/BackupRecord.java @@ -50,14 +50,6 @@ public class BackupRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A BACKUP RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_backup = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/BarRecord.java b/src/java/org/apache/poi/hssf/record/BarRecord.java index 0c88385ba..2239e56e0 100644 --- a/src/java/org/apache/poi/hssf/record/BarRecord.java +++ b/src/java/org/apache/poi/hssf/record/BarRecord.java @@ -59,19 +59,6 @@ public final class BarRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a Bar record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_barSpace = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/BeginRecord.java b/src/java/org/apache/poi/hssf/record/BeginRecord.java index b899d3a6a..f7347619c 100644 --- a/src/java/org/apache/poi/hssf/record/BeginRecord.java +++ b/src/java/org/apache/poi/hssf/record/BeginRecord.java @@ -49,14 +49,6 @@ public class BeginRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A BEGIN RECORD"); - } - } - protected void fillFields(RecordInputStream in) { } diff --git a/src/java/org/apache/poi/hssf/record/BlankRecord.java b/src/java/org/apache/poi/hssf/record/BlankRecord.java index cf1b97f5a..4d333eb41 100644 --- a/src/java/org/apache/poi/hssf/record/BlankRecord.java +++ b/src/java/org/apache/poi/hssf/record/BlankRecord.java @@ -55,20 +55,6 @@ public final class BlankRecord extends Record implements CellValueRecordInterfac field_3_xf = in.readShort(); } - /** - * called by constructor, should throw runtime exception in the event of a - * record passed with a differing ID. - * - * @param id alleged id for this record - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A BLANKRECORD!"); - } - } - /** * set the row this cell occurs on * @param row the row this cell occurs within diff --git a/src/java/org/apache/poi/hssf/record/BookBoolRecord.java b/src/java/org/apache/poi/hssf/record/BookBoolRecord.java index 6b5cf9883..150dc5dfd 100644 --- a/src/java/org/apache/poi/hssf/record/BookBoolRecord.java +++ b/src/java/org/apache/poi/hssf/record/BookBoolRecord.java @@ -50,14 +50,6 @@ public class BookBoolRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A BOOKBOOL RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_save_link_values = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/BoolErrRecord.java b/src/java/org/apache/poi/hssf/record/BoolErrRecord.java index 1c15ccc5f..77ece1632 100644 --- a/src/java/org/apache/poi/hssf/record/BoolErrRecord.java +++ b/src/java/org/apache/poi/hssf/record/BoolErrRecord.java @@ -221,20 +221,6 @@ public final class BoolErrRecord extends Record implements CellValueRecordInterf return 12; } - /** - * called by constructor, should throw runtime exception in the event of a - * record passed with a differing ID. - * - * @param id alleged id for this record - */ - protected void validateSid(short id) - { - if (id != BoolErrRecord.sid) - { - throw new RecordFormatException("Not a valid BoolErrRecord"); - } - } - public short getSid() { return sid; diff --git a/src/java/org/apache/poi/hssf/record/BottomMarginRecord.java b/src/java/org/apache/poi/hssf/record/BottomMarginRecord.java index fc535e06b..8c8a4a943 100644 --- a/src/java/org/apache/poi/hssf/record/BottomMarginRecord.java +++ b/src/java/org/apache/poi/hssf/record/BottomMarginRecord.java @@ -49,19 +49,6 @@ public class BottomMarginRecord super( in ); } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid( short id ) - { - if ( id != sid ) - { - throw new RecordFormatException( "Not a BottomMargin record" ); - } - } - protected void fillFields( RecordInputStream in ) { field_1_margin = in.readDouble(); @@ -121,4 +108,4 @@ public class BottomMarginRecord return rec; } -} // END OF CLASS +} // END OF CLASS \ No newline at end of file diff --git a/src/java/org/apache/poi/hssf/record/BoundSheetRecord.java b/src/java/org/apache/poi/hssf/record/BoundSheetRecord.java index 4ecddce7e..5cc087e65 100644 --- a/src/java/org/apache/poi/hssf/record/BoundSheetRecord.java +++ b/src/java/org/apache/poi/hssf/record/BoundSheetRecord.java @@ -61,12 +61,6 @@ public final class BoundSheetRecord extends Record { super(in); } - protected void validateSid(short id) { - if (id != sid) { - throw new RecordFormatException("NOT A Bound Sheet RECORD"); - } - } - /** * UTF8: sid + len + bof + flags + len(str) + unicode + str 2 + 2 + 4 + 2 + * 1 + 1 + len(str) diff --git a/src/java/org/apache/poi/hssf/record/CFHeaderRecord.java b/src/java/org/apache/poi/hssf/record/CFHeaderRecord.java index 0a2ffe9fb..af8e4315e 100644 --- a/src/java/org/apache/poi/hssf/record/CFHeaderRecord.java +++ b/src/java/org/apache/poi/hssf/record/CFHeaderRecord.java @@ -160,22 +160,6 @@ public final class CFHeaderRecord extends Record { return 4 + getDataSize(); } - /** - * called by constructor, should throw runtime exception in the event of a - * record passed with a differing ID. - * - * @param id alleged id for this record - */ - - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException( - "NOT A ConditionalFormattingHeaderRecord RECORD"); - } - } - public short getSid() { return sid; diff --git a/src/java/org/apache/poi/hssf/record/CFRuleRecord.java b/src/java/org/apache/poi/hssf/record/CFRuleRecord.java index e676d4312..c440b416f 100644 --- a/src/java/org/apache/poi/hssf/record/CFRuleRecord.java +++ b/src/java/org/apache/poi/hssf/record/CFRuleRecord.java @@ -446,21 +446,6 @@ public final class CFRuleRecord extends Record { public void setParsedExpression2(Ptg[] ptgs) { field_18_formula2 = safeClone(ptgs); } - - /** - * called by constructor, should throw runtime exception in the event of a - * record passed with a differing ID. - * - * @param id alleged id for this record - */ - - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A CFRULE RECORD"); - } - } public short getSid() { diff --git a/src/java/org/apache/poi/hssf/record/CRNCountRecord.java b/src/java/org/apache/poi/hssf/record/CRNCountRecord.java index 4c9e4425c..288031d5b 100755 --- a/src/java/org/apache/poi/hssf/record/CRNCountRecord.java +++ b/src/java/org/apache/poi/hssf/record/CRNCountRecord.java @@ -42,12 +42,6 @@ public final class CRNCountRecord extends Record { super(in); } - protected void validateSid(short id) { - if (id != sid) { - throw new RecordFormatException("NOT An XCT RECORD"); - } - } - public int getNumberOfCRNs() { return field_1_number_crn_records; } diff --git a/src/java/org/apache/poi/hssf/record/CRNRecord.java b/src/java/org/apache/poi/hssf/record/CRNRecord.java index fe66d638b..98c399a21 100755 --- a/src/java/org/apache/poi/hssf/record/CRNRecord.java +++ b/src/java/org/apache/poi/hssf/record/CRNRecord.java @@ -43,12 +43,6 @@ public final class CRNRecord extends Record { super(in); } - protected void validateSid(short id) { - if (id != sid) { - throw new RecordFormatException("NOT An XCT RECORD"); - } - } - public int getNumberOfCRNs() { return field_1_last_column_index; } diff --git a/src/java/org/apache/poi/hssf/record/CalcCountRecord.java b/src/java/org/apache/poi/hssf/record/CalcCountRecord.java index 307dfa35e..0d4d5e0d7 100644 --- a/src/java/org/apache/poi/hssf/record/CalcCountRecord.java +++ b/src/java/org/apache/poi/hssf/record/CalcCountRecord.java @@ -56,14 +56,6 @@ public class CalcCountRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT An Calc Count RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_iterations = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/CalcModeRecord.java b/src/java/org/apache/poi/hssf/record/CalcModeRecord.java index b36123638..b2c323de4 100644 --- a/src/java/org/apache/poi/hssf/record/CalcModeRecord.java +++ b/src/java/org/apache/poi/hssf/record/CalcModeRecord.java @@ -71,14 +71,6 @@ public class CalcModeRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT An Calc Mode RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_calcmode = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/CategorySeriesAxisRecord.java b/src/java/org/apache/poi/hssf/record/CategorySeriesAxisRecord.java index 0521ea709..ff5906360 100644 --- a/src/java/org/apache/poi/hssf/record/CategorySeriesAxisRecord.java +++ b/src/java/org/apache/poi/hssf/record/CategorySeriesAxisRecord.java @@ -59,19 +59,6 @@ public final class CategorySeriesAxisRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a CategorySeriesAxis record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_crossingPoint = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/ChartFormatRecord.java b/src/java/org/apache/poi/hssf/record/ChartFormatRecord.java index f5fd1d953..f7c6384df 100644 --- a/src/java/org/apache/poi/hssf/record/ChartFormatRecord.java +++ b/src/java/org/apache/poi/hssf/record/ChartFormatRecord.java @@ -54,14 +54,6 @@ public final class ChartFormatRecord extends Record { super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A CHARTFORMAT RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field1_x_position = in.readInt(); diff --git a/src/java/org/apache/poi/hssf/record/ChartRecord.java b/src/java/org/apache/poi/hssf/record/ChartRecord.java index a4c6a5f4f..6e2e98191 100644 --- a/src/java/org/apache/poi/hssf/record/ChartRecord.java +++ b/src/java/org/apache/poi/hssf/record/ChartRecord.java @@ -57,19 +57,6 @@ public class ChartRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a Chart record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_x = in.readInt(); diff --git a/src/java/org/apache/poi/hssf/record/ChartTitleFormatRecord.java b/src/java/org/apache/poi/hssf/record/ChartTitleFormatRecord.java index a9ec81e97..0d522e777 100644 --- a/src/java/org/apache/poi/hssf/record/ChartTitleFormatRecord.java +++ b/src/java/org/apache/poi/hssf/record/ChartTitleFormatRecord.java @@ -62,13 +62,6 @@ public class ChartTitleFormatRecord extends Record { super(in); } - protected void validateSid(short id) { - if (id != sid) - { - throw new RecordFormatException("NOT A CHARTTITLEFORMAT RECORD"); - } - } - protected void fillFields(RecordInputStream in) { m_recs = in.readUShort(); int idx; diff --git a/src/java/org/apache/poi/hssf/record/CodepageRecord.java b/src/java/org/apache/poi/hssf/record/CodepageRecord.java index b2aa41039..285f5d0b5 100644 --- a/src/java/org/apache/poi/hssf/record/CodepageRecord.java +++ b/src/java/org/apache/poi/hssf/record/CodepageRecord.java @@ -57,14 +57,6 @@ public class CodepageRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A CODEPAGE RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_codepage = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/ColumnInfoRecord.java b/src/java/org/apache/poi/hssf/record/ColumnInfoRecord.java index bd04a636f..b8934efb0 100644 --- a/src/java/org/apache/poi/hssf/record/ColumnInfoRecord.java +++ b/src/java/org/apache/poi/hssf/record/ColumnInfoRecord.java @@ -83,14 +83,6 @@ public final class ColumnInfoRecord extends Record { } } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A COLINFO RECORD!!"); - } - } - /** * set the first column this record defines formatting info for * @param fc - the first column index (0-based) diff --git a/src/java/org/apache/poi/hssf/record/CommonObjectDataSubRecord.java b/src/java/org/apache/poi/hssf/record/CommonObjectDataSubRecord.java index dd29f0d65..43c6ad854 100644 --- a/src/java/org/apache/poi/hssf/record/CommonObjectDataSubRecord.java +++ b/src/java/org/apache/poi/hssf/record/CommonObjectDataSubRecord.java @@ -93,19 +93,6 @@ public final class CommonObjectDataSubRecord extends SubRecord { super(in); } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a CommonObjectData record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_objectType = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/ContinueRecord.java b/src/java/org/apache/poi/hssf/record/ContinueRecord.java index 46d15a3c1..5402a46bd 100644 --- a/src/java/org/apache/poi/hssf/record/ContinueRecord.java +++ b/src/java/org/apache/poi/hssf/record/ContinueRecord.java @@ -97,20 +97,6 @@ public class ContinueRecord return field_1_data; } - /** - * Make sure we have a good id - * - * @param id the alleged id - */ - - protected void validateSid(short id) - { - if (id != ContinueRecord.sid) - { - throw new RecordFormatException("Not a Continue Record"); - } - } - /** * Debugging toString * diff --git a/src/java/org/apache/poi/hssf/record/CountryRecord.java b/src/java/org/apache/poi/hssf/record/CountryRecord.java index ca1af5531..0acccfd91 100644 --- a/src/java/org/apache/poi/hssf/record/CountryRecord.java +++ b/src/java/org/apache/poi/hssf/record/CountryRecord.java @@ -54,14 +54,6 @@ public class CountryRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A Country RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_default_country = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/DBCellRecord.java b/src/java/org/apache/poi/hssf/record/DBCellRecord.java index 1aef298e1..efa713aec 100644 --- a/src/java/org/apache/poi/hssf/record/DBCellRecord.java +++ b/src/java/org/apache/poi/hssf/record/DBCellRecord.java @@ -47,14 +47,6 @@ public final class DBCellRecord extends Record { super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A valid DBCell RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_row_offset = in.readUShort(); diff --git a/src/java/org/apache/poi/hssf/record/DSFRecord.java b/src/java/org/apache/poi/hssf/record/DSFRecord.java index ea898c2f2..43dbe7958 100644 --- a/src/java/org/apache/poi/hssf/record/DSFRecord.java +++ b/src/java/org/apache/poi/hssf/record/DSFRecord.java @@ -50,14 +50,6 @@ public class DSFRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A DSF RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_dsf = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/DVALRecord.java b/src/java/org/apache/poi/hssf/record/DVALRecord.java index 011c0a435..c4fac186d 100644 --- a/src/java/org/apache/poi/hssf/record/DVALRecord.java +++ b/src/java/org/apache/poi/hssf/record/DVALRecord.java @@ -59,14 +59,6 @@ public class DVALRecord extends Record super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A valid DVAL RECORD"); - } - } - protected void fillFields(RecordInputStream in) { this.field_1_options = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/DVRecord.java b/src/java/org/apache/poi/hssf/record/DVRecord.java index 6f319e028..2a3dc05f1 100644 --- a/src/java/org/apache/poi/hssf/record/DVRecord.java +++ b/src/java/org/apache/poi/hssf/record/DVRecord.java @@ -110,12 +110,6 @@ public final class DVRecord extends Record { _regions = regions; } - protected void validateSid(short id) { - if (id != sid) { - throw new RecordFormatException("NOT a valid DV RECORD"); - } - } - protected void fillFields(RecordInputStream in) { _option_flags = in.readInt(); diff --git a/src/java/org/apache/poi/hssf/record/DatRecord.java b/src/java/org/apache/poi/hssf/record/DatRecord.java index 476b13291..c7ece181a 100644 --- a/src/java/org/apache/poi/hssf/record/DatRecord.java +++ b/src/java/org/apache/poi/hssf/record/DatRecord.java @@ -57,19 +57,6 @@ public final class DatRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a Dat record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_options = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/DataFormatRecord.java b/src/java/org/apache/poi/hssf/record/DataFormatRecord.java index f86834daa..61c59bcfd 100644 --- a/src/java/org/apache/poi/hssf/record/DataFormatRecord.java +++ b/src/java/org/apache/poi/hssf/record/DataFormatRecord.java @@ -57,19 +57,6 @@ public final class DataFormatRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a DataFormat record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_pointNumber = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/DateWindow1904Record.java b/src/java/org/apache/poi/hssf/record/DateWindow1904Record.java index 3a692fd68..5e7ffe95b 100644 --- a/src/java/org/apache/poi/hssf/record/DateWindow1904Record.java +++ b/src/java/org/apache/poi/hssf/record/DateWindow1904Record.java @@ -50,14 +50,6 @@ public class DateWindow1904Record super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A 1904 RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_window = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/DefaultColWidthRecord.java b/src/java/org/apache/poi/hssf/record/DefaultColWidthRecord.java index ff6270be0..9d3e5d80e 100644 --- a/src/java/org/apache/poi/hssf/record/DefaultColWidthRecord.java +++ b/src/java/org/apache/poi/hssf/record/DefaultColWidthRecord.java @@ -46,14 +46,6 @@ public final class DefaultColWidthRecord extends Record { super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A DefaultColWidth RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_col_width = in.readUShort(); diff --git a/src/java/org/apache/poi/hssf/record/DefaultDataLabelTextPropertiesRecord.java b/src/java/org/apache/poi/hssf/record/DefaultDataLabelTextPropertiesRecord.java index 771d7c4cf..58b3b8f5c 100644 --- a/src/java/org/apache/poi/hssf/record/DefaultDataLabelTextPropertiesRecord.java +++ b/src/java/org/apache/poi/hssf/record/DefaultDataLabelTextPropertiesRecord.java @@ -57,19 +57,6 @@ public class DefaultDataLabelTextPropertiesRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a DefaultDataLabelTextProperties record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_categoryDataType = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/DefaultRowHeightRecord.java b/src/java/org/apache/poi/hssf/record/DefaultRowHeightRecord.java index 8f049c160..bb93ff83d 100644 --- a/src/java/org/apache/poi/hssf/record/DefaultRowHeightRecord.java +++ b/src/java/org/apache/poi/hssf/record/DefaultRowHeightRecord.java @@ -52,14 +52,6 @@ public class DefaultRowHeightRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A DefaultRowHeight RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_option_flags = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/DeltaRecord.java b/src/java/org/apache/poi/hssf/record/DeltaRecord.java index b7afe7486..467431ead 100644 --- a/src/java/org/apache/poi/hssf/record/DeltaRecord.java +++ b/src/java/org/apache/poi/hssf/record/DeltaRecord.java @@ -54,14 +54,6 @@ public class DeltaRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A DELTA RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_max_change = in.readDouble(); diff --git a/src/java/org/apache/poi/hssf/record/DimensionsRecord.java b/src/java/org/apache/poi/hssf/record/DimensionsRecord.java index feecd6865..adf9f7edf 100644 --- a/src/java/org/apache/poi/hssf/record/DimensionsRecord.java +++ b/src/java/org/apache/poi/hssf/record/DimensionsRecord.java @@ -55,14 +55,6 @@ public class DimensionsRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A valid DIMENSIONS RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_first_row = in.readInt(); diff --git a/src/java/org/apache/poi/hssf/record/DrawingRecord.java b/src/java/org/apache/poi/hssf/record/DrawingRecord.java index 009bc31bc..089c15f90 100644 --- a/src/java/org/apache/poi/hssf/record/DrawingRecord.java +++ b/src/java/org/apache/poi/hssf/record/DrawingRecord.java @@ -34,19 +34,6 @@ public class DrawingRecord extends Record super( in ); } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a MSODRAWING record"); - } - } - protected void fillFields( RecordInputStream in ) { recordData = in.readRemainder(); diff --git a/src/java/org/apache/poi/hssf/record/EOFRecord.java b/src/java/org/apache/poi/hssf/record/EOFRecord.java index d658c6d83..96159b42a 100644 --- a/src/java/org/apache/poi/hssf/record/EOFRecord.java +++ b/src/java/org/apache/poi/hssf/record/EOFRecord.java @@ -49,14 +49,6 @@ public final class EOFRecord extends Record { super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT An EOF RECORD"); - } - } - protected void fillFields(RecordInputStream in) { } diff --git a/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java b/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java index 0e59282f5..b33519c8e 100644 --- a/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java +++ b/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java @@ -64,19 +64,6 @@ public class EmbeddedObjectRefSubRecord super(in); } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a EmbeddedObjectRef record"); - } - } - public short getSid() { return sid; diff --git a/src/java/org/apache/poi/hssf/record/EndRecord.java b/src/java/org/apache/poi/hssf/record/EndRecord.java index 0c15e723f..48e50ac12 100644 --- a/src/java/org/apache/poi/hssf/record/EndRecord.java +++ b/src/java/org/apache/poi/hssf/record/EndRecord.java @@ -49,15 +49,6 @@ public class EndRecord super(in); } - - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT An END RECORD"); - } - } - protected void fillFields(RecordInputStream in) { } diff --git a/src/java/org/apache/poi/hssf/record/EndSubRecord.java b/src/java/org/apache/poi/hssf/record/EndSubRecord.java index 28478adbf..59ccb872e 100644 --- a/src/java/org/apache/poi/hssf/record/EndSubRecord.java +++ b/src/java/org/apache/poi/hssf/record/EndSubRecord.java @@ -53,19 +53,6 @@ public class EndSubRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a End record"); - } - } - protected void fillFields(RecordInputStream in) { } diff --git a/src/java/org/apache/poi/hssf/record/ExtSSTInfoSubRecord.java b/src/java/org/apache/poi/hssf/record/ExtSSTInfoSubRecord.java index bd2bc3656..e6e231784 100644 --- a/src/java/org/apache/poi/hssf/record/ExtSSTInfoSubRecord.java +++ b/src/java/org/apache/poi/hssf/record/ExtSSTInfoSubRecord.java @@ -55,12 +55,6 @@ public class ExtSSTInfoSubRecord super(in); } - protected void validateSid(short id) - { - - // do nothing - } - protected void fillFields(RecordInputStream in) { field_1_stream_pos = in.readInt(); diff --git a/src/java/org/apache/poi/hssf/record/ExtSSTRecord.java b/src/java/org/apache/poi/hssf/record/ExtSSTRecord.java index cb31fb59b..0d99c5324 100644 --- a/src/java/org/apache/poi/hssf/record/ExtSSTRecord.java +++ b/src/java/org/apache/poi/hssf/record/ExtSSTRecord.java @@ -63,14 +63,6 @@ public class ExtSSTRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT An EXTSST RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_2_sst_info = new ArrayList(); diff --git a/src/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java b/src/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java index ae9838767..a4e81ba55 100644 --- a/src/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java +++ b/src/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java @@ -205,14 +205,6 @@ public class ExtendedFormatRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A EXTENDED FORMAT RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_font_index = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/ExternSheetRecord.java b/src/java/org/apache/poi/hssf/record/ExternSheetRecord.java index 64f86c3f1..71f0d496a 100644 --- a/src/java/org/apache/poi/hssf/record/ExternSheetRecord.java +++ b/src/java/org/apache/poi/hssf/record/ExternSheetRecord.java @@ -104,18 +104,6 @@ public class ExternSheetRecord extends Record { super(in); } - /** - * called by constructor, should throw runtime exception in the event of a - * record passed with a differing ID. - * - * @param id alleged id for this record - */ - protected void validateSid(short id) { - if (id != sid) { - throw new RecordFormatException("NOT An ExternSheet RECORD"); - } - } - /** * called by the constructor, should set class level fields. Should throw * runtime exception for bad/icomplete data. diff --git a/src/java/org/apache/poi/hssf/record/ExternalNameRecord.java b/src/java/org/apache/poi/hssf/record/ExternalNameRecord.java index 45960e91a..45deae1c6 100755 --- a/src/java/org/apache/poi/hssf/record/ExternalNameRecord.java +++ b/src/java/org/apache/poi/hssf/record/ExternalNameRecord.java @@ -90,19 +90,6 @@ public final class ExternalNameRecord extends Record { return field_4_name; } - - /** - * called by constructor, should throw runtime exception in the event of a - * record passed with a differing ID. - * - * @param id alleged id for this record - */ - protected void validateSid(short id) { - if (id != sid) { - throw new RecordFormatException("NOT A valid ExternalName RECORD"); - } - } - private int getDataSize(){ int result = 3 * 2 // 3 short fields + 2 + field_4_name.length(); // nameLen and name diff --git a/src/java/org/apache/poi/hssf/record/FilePassRecord.java b/src/java/org/apache/poi/hssf/record/FilePassRecord.java index a3f29c765..b14fac83a 100644 --- a/src/java/org/apache/poi/hssf/record/FilePassRecord.java +++ b/src/java/org/apache/poi/hssf/record/FilePassRecord.java @@ -50,14 +50,6 @@ public class FilePassRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A FILEPASS RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_encryptedpassword = in.readInt(); diff --git a/src/java/org/apache/poi/hssf/record/FileSharingRecord.java b/src/java/org/apache/poi/hssf/record/FileSharingRecord.java index e375af365..e49c07785 100644 --- a/src/java/org/apache/poi/hssf/record/FileSharingRecord.java +++ b/src/java/org/apache/poi/hssf/record/FileSharingRecord.java @@ -47,12 +47,6 @@ public final class FileSharingRecord extends Record { super(in); } - protected void validateSid(short id) { - if (id != sid) { - throw new RecordFormatException("NOT A FILESHARING RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_readonly = in.readShort(); field_2_password = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/FnGroupCountRecord.java b/src/java/org/apache/poi/hssf/record/FnGroupCountRecord.java index 41bb07d8f..abea11f5d 100644 --- a/src/java/org/apache/poi/hssf/record/FnGroupCountRecord.java +++ b/src/java/org/apache/poi/hssf/record/FnGroupCountRecord.java @@ -56,14 +56,6 @@ public class FnGroupCountRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A FNGROUPCOUNT RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_count = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/FontBasisRecord.java b/src/java/org/apache/poi/hssf/record/FontBasisRecord.java index a2a45e23c..95731d102 100644 --- a/src/java/org/apache/poi/hssf/record/FontBasisRecord.java +++ b/src/java/org/apache/poi/hssf/record/FontBasisRecord.java @@ -58,19 +58,6 @@ public class FontBasisRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a FontBasis record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_xBasis = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/FontIndexRecord.java b/src/java/org/apache/poi/hssf/record/FontIndexRecord.java index 12e2f6669..82d7152e8 100644 --- a/src/java/org/apache/poi/hssf/record/FontIndexRecord.java +++ b/src/java/org/apache/poi/hssf/record/FontIndexRecord.java @@ -54,19 +54,6 @@ public class FontIndexRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a FontIndex record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_fontIndex = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/FontRecord.java b/src/java/org/apache/poi/hssf/record/FontRecord.java index 11ba3aaa8..deaa92e26 100644 --- a/src/java/org/apache/poi/hssf/record/FontRecord.java +++ b/src/java/org/apache/poi/hssf/record/FontRecord.java @@ -87,14 +87,6 @@ public class FontRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A FONT RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_font_height = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/FooterRecord.java b/src/java/org/apache/poi/hssf/record/FooterRecord.java index 6ccc08280..9dcd03118 100644 --- a/src/java/org/apache/poi/hssf/record/FooterRecord.java +++ b/src/java/org/apache/poi/hssf/record/FooterRecord.java @@ -55,14 +55,6 @@ public class FooterRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A FooterRECORD"); - } - } - protected void fillFields(RecordInputStream in) { if (in.remaining() > 0) diff --git a/src/java/org/apache/poi/hssf/record/FormatRecord.java b/src/java/org/apache/poi/hssf/record/FormatRecord.java index d71c401f8..47a45c4f0 100644 --- a/src/java/org/apache/poi/hssf/record/FormatRecord.java +++ b/src/java/org/apache/poi/hssf/record/FormatRecord.java @@ -56,14 +56,6 @@ public class FormatRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A FORMAT RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_index_code = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/FormulaRecord.java b/src/java/org/apache/poi/hssf/record/FormulaRecord.java index e4b599a0e..21ca8cccb 100644 --- a/src/java/org/apache/poi/hssf/record/FormulaRecord.java +++ b/src/java/org/apache/poi/hssf/record/FormulaRecord.java @@ -356,18 +356,6 @@ public final class FormulaRecord extends Record implements CellValueRecordInterf field_8_parsed_expr = ptgs; } - /** - * called by constructor, should throw runtime exception in the event of a - * record passed with a differing ID. - * - * @param id alleged id for this record - */ - protected void validateSid(short id) { - if (id != sid) { - throw new RecordFormatException("NOT A FORMULA RECORD"); - } - } - public short getSid() { return sid; } diff --git a/src/java/org/apache/poi/hssf/record/FrameRecord.java b/src/java/org/apache/poi/hssf/record/FrameRecord.java index e4a2bf6c3..321c867d9 100644 --- a/src/java/org/apache/poi/hssf/record/FrameRecord.java +++ b/src/java/org/apache/poi/hssf/record/FrameRecord.java @@ -58,19 +58,6 @@ public final class FrameRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a Frame record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_borderType = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/GridsetRecord.java b/src/java/org/apache/poi/hssf/record/GridsetRecord.java index 5f5896d5a..681b7cdc1 100644 --- a/src/java/org/apache/poi/hssf/record/GridsetRecord.java +++ b/src/java/org/apache/poi/hssf/record/GridsetRecord.java @@ -54,14 +54,6 @@ public class GridsetRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A Gridset RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_gridset_flag = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/GroupMarkerSubRecord.java b/src/java/org/apache/poi/hssf/record/GroupMarkerSubRecord.java index cba7544e9..d72b4be65 100644 --- a/src/java/org/apache/poi/hssf/record/GroupMarkerSubRecord.java +++ b/src/java/org/apache/poi/hssf/record/GroupMarkerSubRecord.java @@ -53,19 +53,6 @@ public class GroupMarkerSubRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a Group Marker record"); - } - } - protected void fillFields(RecordInputStream in) { // int pos = 0; diff --git a/src/java/org/apache/poi/hssf/record/GutsRecord.java b/src/java/org/apache/poi/hssf/record/GutsRecord.java index 2dc5c4a6c..d16543921 100644 --- a/src/java/org/apache/poi/hssf/record/GutsRecord.java +++ b/src/java/org/apache/poi/hssf/record/GutsRecord.java @@ -53,14 +53,6 @@ public class GutsRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A Guts RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_left_row_gutter = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/HCenterRecord.java b/src/java/org/apache/poi/hssf/record/HCenterRecord.java index 5232e17de..cfcdb00af 100644 --- a/src/java/org/apache/poi/hssf/record/HCenterRecord.java +++ b/src/java/org/apache/poi/hssf/record/HCenterRecord.java @@ -50,14 +50,6 @@ public class HCenterRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A HCenter RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_hcenter = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/HeaderRecord.java b/src/java/org/apache/poi/hssf/record/HeaderRecord.java index e8190364a..57846ee73 100644 --- a/src/java/org/apache/poi/hssf/record/HeaderRecord.java +++ b/src/java/org/apache/poi/hssf/record/HeaderRecord.java @@ -55,14 +55,6 @@ public class HeaderRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A HEADERRECORD"); - } - } - protected void fillFields(RecordInputStream in) { if (in.remaining() > 0) diff --git a/src/java/org/apache/poi/hssf/record/HideObjRecord.java b/src/java/org/apache/poi/hssf/record/HideObjRecord.java index 1496720d4..2786de457 100644 --- a/src/java/org/apache/poi/hssf/record/HideObjRecord.java +++ b/src/java/org/apache/poi/hssf/record/HideObjRecord.java @@ -52,14 +52,6 @@ public class HideObjRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A HIDEOBJ RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_hide_obj = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/HorizontalPageBreakRecord.java b/src/java/org/apache/poi/hssf/record/HorizontalPageBreakRecord.java index a6846300c..63e757f8d 100644 --- a/src/java/org/apache/poi/hssf/record/HorizontalPageBreakRecord.java +++ b/src/java/org/apache/poi/hssf/record/HorizontalPageBreakRecord.java @@ -44,13 +44,6 @@ public final class HorizontalPageBreakRecord extends PageBreakRecord { super(in); } - protected void validateSid(short id) { - if (id != getSid()) { - throw new RecordFormatException( - "NOT A HorizontalPageBreak or VerticalPageBreak RECORD!! " + id); - } - } - public short getSid() { return sid; } diff --git a/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java b/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java index e28cf5bf8..6daf192ca 100644 --- a/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java +++ b/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java @@ -372,14 +372,6 @@ public class HyperlinkRecord extends Record { return HyperlinkRecord.sid; } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A HYPERLINKRECORD!"); - } - } - public int serialize(int offset, byte[] data) { int pos = offset; diff --git a/src/java/org/apache/poi/hssf/record/IndexRecord.java b/src/java/org/apache/poi/hssf/record/IndexRecord.java index 957a047ea..d997a43dd 100644 --- a/src/java/org/apache/poi/hssf/record/IndexRecord.java +++ b/src/java/org/apache/poi/hssf/record/IndexRecord.java @@ -58,14 +58,6 @@ public class IndexRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT An Index RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_5_dbcells = diff --git a/src/java/org/apache/poi/hssf/record/InterfaceEndRecord.java b/src/java/org/apache/poi/hssf/record/InterfaceEndRecord.java index bb92c974c..8f91b197e 100644 --- a/src/java/org/apache/poi/hssf/record/InterfaceEndRecord.java +++ b/src/java/org/apache/poi/hssf/record/InterfaceEndRecord.java @@ -49,14 +49,6 @@ public class InterfaceEndRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A INTERFACEEND RECORD"); - } - } - protected void fillFields(RecordInputStream in) { } diff --git a/src/java/org/apache/poi/hssf/record/InterfaceHdrRecord.java b/src/java/org/apache/poi/hssf/record/InterfaceHdrRecord.java index 637e2c679..5e04b506a 100644 --- a/src/java/org/apache/poi/hssf/record/InterfaceHdrRecord.java +++ b/src/java/org/apache/poi/hssf/record/InterfaceHdrRecord.java @@ -55,14 +55,6 @@ public class InterfaceHdrRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A INTERFACEHDR RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_codepage = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/IterationRecord.java b/src/java/org/apache/poi/hssf/record/IterationRecord.java index 16ab1d074..82e167f79 100644 --- a/src/java/org/apache/poi/hssf/record/IterationRecord.java +++ b/src/java/org/apache/poi/hssf/record/IterationRecord.java @@ -53,14 +53,6 @@ public class IterationRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT An ITERATION RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_iteration = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/LabelRecord.java b/src/java/org/apache/poi/hssf/record/LabelRecord.java index 844d86a0c..32b910b84 100644 --- a/src/java/org/apache/poi/hssf/record/LabelRecord.java +++ b/src/java/org/apache/poi/hssf/record/LabelRecord.java @@ -53,20 +53,6 @@ public final class LabelRecord extends Record implements CellValueRecordInterfac super(in); } - /** - * called by constructor, should throw runtime exception in the event of a - * record passed with a differing ID. - * - * @param id alleged id for this record - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a valid LabelRecord"); - } - } - /** * @param in the RecordInputstream to read the record from */ diff --git a/src/java/org/apache/poi/hssf/record/LabelSSTRecord.java b/src/java/org/apache/poi/hssf/record/LabelSSTRecord.java index 92b3436d3..3d878770d 100644 --- a/src/java/org/apache/poi/hssf/record/LabelSSTRecord.java +++ b/src/java/org/apache/poi/hssf/record/LabelSSTRecord.java @@ -49,15 +49,6 @@ public final class LabelSSTRecord extends Record implements CellValueRecordInter super(in); } - - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A valid LabelSST RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_row = in.readUShort(); diff --git a/src/java/org/apache/poi/hssf/record/LeftMarginRecord.java b/src/java/org/apache/poi/hssf/record/LeftMarginRecord.java index 9e5883c5a..ebe59a337 100644 --- a/src/java/org/apache/poi/hssf/record/LeftMarginRecord.java +++ b/src/java/org/apache/poi/hssf/record/LeftMarginRecord.java @@ -39,19 +39,6 @@ public class LeftMarginRecord extends Record implements Margin public LeftMarginRecord(RecordInputStream in) { super(in); } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid( short id ) - { - if ( id != sid ) - { - throw new RecordFormatException( "Not a LeftMargin record" ); - } - } - protected void fillFields(RecordInputStream in) { field_1_margin = in.readDouble(); @@ -106,4 +93,4 @@ public class LeftMarginRecord extends Record implements Margin rec.field_1_margin = this.field_1_margin; return rec; } -} // END OF CLASS +} // END OF CLASS \ No newline at end of file diff --git a/src/java/org/apache/poi/hssf/record/LegendRecord.java b/src/java/org/apache/poi/hssf/record/LegendRecord.java index e9c529ea3..46ccd6b65 100644 --- a/src/java/org/apache/poi/hssf/record/LegendRecord.java +++ b/src/java/org/apache/poi/hssf/record/LegendRecord.java @@ -74,19 +74,6 @@ public final class LegendRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a Legend record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_xAxisUpperLeft = in.readInt(); diff --git a/src/java/org/apache/poi/hssf/record/LineFormatRecord.java b/src/java/org/apache/poi/hssf/record/LineFormatRecord.java index 8caa8e4a4..88fafe10a 100644 --- a/src/java/org/apache/poi/hssf/record/LineFormatRecord.java +++ b/src/java/org/apache/poi/hssf/record/LineFormatRecord.java @@ -73,19 +73,6 @@ public final class LineFormatRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a LineFormat record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_lineColor = in.readInt(); diff --git a/src/java/org/apache/poi/hssf/record/LinkedDataRecord.java b/src/java/org/apache/poi/hssf/record/LinkedDataRecord.java index 093c1a86c..6e0dc8296 100644 --- a/src/java/org/apache/poi/hssf/record/LinkedDataRecord.java +++ b/src/java/org/apache/poi/hssf/record/LinkedDataRecord.java @@ -66,19 +66,6 @@ public final class LinkedDataRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a LinkedData record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_linkType = in.readByte(); diff --git a/src/java/org/apache/poi/hssf/record/MMSRecord.java b/src/java/org/apache/poi/hssf/record/MMSRecord.java index c38e9df24..3ee966569 100644 --- a/src/java/org/apache/poi/hssf/record/MMSRecord.java +++ b/src/java/org/apache/poi/hssf/record/MMSRecord.java @@ -51,14 +51,6 @@ public class MMSRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A MMS RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_addMenuCount = in.readByte(); diff --git a/src/java/org/apache/poi/hssf/record/MergeCellsRecord.java b/src/java/org/apache/poi/hssf/record/MergeCellsRecord.java index 27ebbd118..aac11ef60 100644 --- a/src/java/org/apache/poi/hssf/record/MergeCellsRecord.java +++ b/src/java/org/apache/poi/hssf/record/MergeCellsRecord.java @@ -119,13 +119,6 @@ public final class MergeCellsRecord extends Record { return retval.toString(); } - protected void validateSid(short id) { - if (id != sid) { - throw new RecordFormatException("NOT A MERGEDCELLS RECORD!! " - + id); - } - } - public Object clone() { int nRegions = _numberOfRegions; CellRangeAddress[] clonedRegions = new CellRangeAddress[nRegions]; diff --git a/src/java/org/apache/poi/hssf/record/MulBlankRecord.java b/src/java/org/apache/poi/hssf/record/MulBlankRecord.java index dffdb2fe8..0bfeea9ff 100644 --- a/src/java/org/apache/poi/hssf/record/MulBlankRecord.java +++ b/src/java/org/apache/poi/hssf/record/MulBlankRecord.java @@ -159,21 +159,6 @@ public class MulBlankRecord return buffer.toString(); } - /** - * called by constructor, should throw runtime exception in the event of a - * record passed with a differing ID. - * - * @param id alleged id for this record - */ - - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a MulBlankRecord!"); - } - } - public short getSid() { return sid; diff --git a/src/java/org/apache/poi/hssf/record/MulRKRecord.java b/src/java/org/apache/poi/hssf/record/MulRKRecord.java index c301d52a8..4f2981f5d 100644 --- a/src/java/org/apache/poi/hssf/record/MulRKRecord.java +++ b/src/java/org/apache/poi/hssf/record/MulRKRecord.java @@ -117,21 +117,6 @@ public final class MulRKRecord extends Record { return buffer.toString(); } - /** - * called by constructor, should throw runtime exception in the event of a - * record passed with a differing ID. - * - * @param id alleged id for this record - */ - - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a MulRKRecord!"); - } - } - public short getSid() { return sid; diff --git a/src/java/org/apache/poi/hssf/record/NameRecord.java b/src/java/org/apache/poi/hssf/record/NameRecord.java index dc301bca9..732172add 100644 --- a/src/java/org/apache/poi/hssf/record/NameRecord.java +++ b/src/java/org/apache/poi/hssf/record/NameRecord.java @@ -340,18 +340,6 @@ public final class NameRecord extends Record { return field_17_status_bar_text; } - /** - * called by constructor, should throw runtime exception in the event of a - * record passed with a differing ID. - * - * @param id alleged id for this record - */ - protected void validateSid(short id) { - if (id != sid) { - throw new RecordFormatException("NOT A valid Name RECORD"); - } - } - /** * called by the class that is responsible for writing this sucker. diff --git a/src/java/org/apache/poi/hssf/record/NoteRecord.java b/src/java/org/apache/poi/hssf/record/NoteRecord.java index a9e83806f..c37bd0854 100644 --- a/src/java/org/apache/poi/hssf/record/NoteRecord.java +++ b/src/java/org/apache/poi/hssf/record/NoteRecord.java @@ -73,19 +73,6 @@ public class NoteRecord extends Record { return sid; } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a NoteRecord record"); - } - } - /** * Read the record data from the supplied RecordInputStream */ diff --git a/src/java/org/apache/poi/hssf/record/NoteStructureSubRecord.java b/src/java/org/apache/poi/hssf/record/NoteStructureSubRecord.java index c99f29be3..a0b519594 100644 --- a/src/java/org/apache/poi/hssf/record/NoteStructureSubRecord.java +++ b/src/java/org/apache/poi/hssf/record/NoteStructureSubRecord.java @@ -55,19 +55,6 @@ public class NoteStructureSubRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a Note Structure record"); - } - } - /** * Read the record data from the supplied RecordInputStream */ diff --git a/src/java/org/apache/poi/hssf/record/NumberFormatIndexRecord.java b/src/java/org/apache/poi/hssf/record/NumberFormatIndexRecord.java index 15f9c367d..951e53360 100644 --- a/src/java/org/apache/poi/hssf/record/NumberFormatIndexRecord.java +++ b/src/java/org/apache/poi/hssf/record/NumberFormatIndexRecord.java @@ -54,19 +54,6 @@ public class NumberFormatIndexRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a NumberFormatIndex record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_formatIndex = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/NumberRecord.java b/src/java/org/apache/poi/hssf/record/NumberRecord.java index f3d906155..0877985ad 100644 --- a/src/java/org/apache/poi/hssf/record/NumberRecord.java +++ b/src/java/org/apache/poi/hssf/record/NumberRecord.java @@ -157,21 +157,6 @@ public final class NumberRecord extends Record implements CellValueRecordInterfa return 18; } - /** - * called by constructor, should throw runtime exception in the event of a - * record passed with a differing ID. - * - * @param id alleged id for this record - */ - - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A Number RECORD"); - } - } - public short getSid() { return sid; diff --git a/src/java/org/apache/poi/hssf/record/ObjRecord.java b/src/java/org/apache/poi/hssf/record/ObjRecord.java index 0e424eed2..0e85817a2 100644 --- a/src/java/org/apache/poi/hssf/record/ObjRecord.java +++ b/src/java/org/apache/poi/hssf/record/ObjRecord.java @@ -54,19 +54,6 @@ public final class ObjRecord extends Record { super(in); } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not an OBJ record"); - } - } - protected void fillFields(RecordInputStream in) { // TODO - problems with OBJ sub-records stream diff --git a/src/java/org/apache/poi/hssf/record/ObjectLinkRecord.java b/src/java/org/apache/poi/hssf/record/ObjectLinkRecord.java index 0d64ee3d6..ec32ef0fa 100644 --- a/src/java/org/apache/poi/hssf/record/ObjectLinkRecord.java +++ b/src/java/org/apache/poi/hssf/record/ObjectLinkRecord.java @@ -61,19 +61,6 @@ public class ObjectLinkRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a ObjectLink record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_anchorId = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/ObjectProtectRecord.java b/src/java/org/apache/poi/hssf/record/ObjectProtectRecord.java index 64d50cb33..0dbb95c21 100644 --- a/src/java/org/apache/poi/hssf/record/ObjectProtectRecord.java +++ b/src/java/org/apache/poi/hssf/record/ObjectProtectRecord.java @@ -51,14 +51,6 @@ public class ObjectProtectRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT AN OBJECTPROTECT RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_protect = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/PaletteRecord.java b/src/java/org/apache/poi/hssf/record/PaletteRecord.java index d626baa2d..6fd468217 100644 --- a/src/java/org/apache/poi/hssf/record/PaletteRecord.java +++ b/src/java/org/apache/poi/hssf/record/PaletteRecord.java @@ -58,14 +58,6 @@ public class PaletteRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT An Palette RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_numcolors = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/PaneRecord.java b/src/java/org/apache/poi/hssf/record/PaneRecord.java index f02e41165..c8e4df55b 100644 --- a/src/java/org/apache/poi/hssf/record/PaneRecord.java +++ b/src/java/org/apache/poi/hssf/record/PaneRecord.java @@ -61,19 +61,6 @@ public final class PaneRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a Pane record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_x = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/PasswordRecord.java b/src/java/org/apache/poi/hssf/record/PasswordRecord.java index 67f210da5..1b9e9041a 100644 --- a/src/java/org/apache/poi/hssf/record/PasswordRecord.java +++ b/src/java/org/apache/poi/hssf/record/PasswordRecord.java @@ -45,12 +45,6 @@ public class PasswordRecord extends Record { super(in); } - protected void validateSid(short id) { - if (id != sid) { - throw new RecordFormatException("NOT A PASSWORD RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_password = in.readShort(); } diff --git a/src/java/org/apache/poi/hssf/record/PasswordRev4Record.java b/src/java/org/apache/poi/hssf/record/PasswordRev4Record.java index 8d31860af..5a096b1d2 100644 --- a/src/java/org/apache/poi/hssf/record/PasswordRev4Record.java +++ b/src/java/org/apache/poi/hssf/record/PasswordRev4Record.java @@ -50,14 +50,6 @@ public class PasswordRev4Record super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A PROT4REVPASSWORD RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_password = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/PlotAreaRecord.java b/src/java/org/apache/poi/hssf/record/PlotAreaRecord.java index e149c39eb..c41c3f2f7 100644 --- a/src/java/org/apache/poi/hssf/record/PlotAreaRecord.java +++ b/src/java/org/apache/poi/hssf/record/PlotAreaRecord.java @@ -53,19 +53,6 @@ public class PlotAreaRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a PlotArea record"); - } - } - protected void fillFields(RecordInputStream in) { diff --git a/src/java/org/apache/poi/hssf/record/PlotGrowthRecord.java b/src/java/org/apache/poi/hssf/record/PlotGrowthRecord.java index 29c325992..b340fe604 100644 --- a/src/java/org/apache/poi/hssf/record/PlotGrowthRecord.java +++ b/src/java/org/apache/poi/hssf/record/PlotGrowthRecord.java @@ -55,19 +55,6 @@ public class PlotGrowthRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a PlotGrowth record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_horizontalScale = in.readInt(); diff --git a/src/java/org/apache/poi/hssf/record/PrecisionRecord.java b/src/java/org/apache/poi/hssf/record/PrecisionRecord.java index dd7b71922..57e390df4 100644 --- a/src/java/org/apache/poi/hssf/record/PrecisionRecord.java +++ b/src/java/org/apache/poi/hssf/record/PrecisionRecord.java @@ -50,14 +50,6 @@ public class PrecisionRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A PRECISION RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_precision = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/PrintGridlinesRecord.java b/src/java/org/apache/poi/hssf/record/PrintGridlinesRecord.java index ff0eaac18..3908e0166 100644 --- a/src/java/org/apache/poi/hssf/record/PrintGridlinesRecord.java +++ b/src/java/org/apache/poi/hssf/record/PrintGridlinesRecord.java @@ -50,14 +50,6 @@ public class PrintGridlinesRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A PrintGridlines RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_print_gridlines = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/PrintHeadersRecord.java b/src/java/org/apache/poi/hssf/record/PrintHeadersRecord.java index d3a69e513..80521050c 100644 --- a/src/java/org/apache/poi/hssf/record/PrintHeadersRecord.java +++ b/src/java/org/apache/poi/hssf/record/PrintHeadersRecord.java @@ -51,14 +51,6 @@ public class PrintHeadersRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A PrintHeaders RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_print_headers = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/PrintSetupRecord.java b/src/java/org/apache/poi/hssf/record/PrintSetupRecord.java index a8518c7b3..91ab61454 100644 --- a/src/java/org/apache/poi/hssf/record/PrintSetupRecord.java +++ b/src/java/org/apache/poi/hssf/record/PrintSetupRecord.java @@ -76,15 +76,6 @@ public class PrintSetupRecord extends Record { super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException( - "NOT A valid PrintSetup record RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_paper_size = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/ProtectRecord.java b/src/java/org/apache/poi/hssf/record/ProtectRecord.java index 94868e0a6..b6b5378c7 100644 --- a/src/java/org/apache/poi/hssf/record/ProtectRecord.java +++ b/src/java/org/apache/poi/hssf/record/ProtectRecord.java @@ -52,14 +52,6 @@ public class ProtectRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A PROTECT RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_protect = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/ProtectionRev4Record.java b/src/java/org/apache/poi/hssf/record/ProtectionRev4Record.java index 68678799d..c0e650f4e 100644 --- a/src/java/org/apache/poi/hssf/record/ProtectionRev4Record.java +++ b/src/java/org/apache/poi/hssf/record/ProtectionRev4Record.java @@ -50,14 +50,6 @@ public class ProtectionRev4Record super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A PROTECTION REV 4 RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_protect = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/RKRecord.java b/src/java/org/apache/poi/hssf/record/RKRecord.java index ce9c84c6e..b899df465 100644 --- a/src/java/org/apache/poi/hssf/record/RKRecord.java +++ b/src/java/org/apache/poi/hssf/record/RKRecord.java @@ -61,14 +61,6 @@ public final class RKRecord extends Record implements CellValueRecordInterface { super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A valid RK RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_row = in.readUShort(); diff --git a/src/java/org/apache/poi/hssf/record/RecalcIdRecord.java b/src/java/org/apache/poi/hssf/record/RecalcIdRecord.java index e076b2bab..008ee82e6 100644 --- a/src/java/org/apache/poi/hssf/record/RecalcIdRecord.java +++ b/src/java/org/apache/poi/hssf/record/RecalcIdRecord.java @@ -59,14 +59,6 @@ public class RecalcIdRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A RECALCID RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_recalcids = new short[ in.remaining() / 2 ]; diff --git a/src/java/org/apache/poi/hssf/record/Record.java b/src/java/org/apache/poi/hssf/record/Record.java index c33da57de..a18869f07 100644 --- a/src/java/org/apache/poi/hssf/record/Record.java +++ b/src/java/org/apache/poi/hssf/record/Record.java @@ -47,19 +47,9 @@ public abstract class Record extends RecordBase { */ protected Record(RecordInputStream in) { - validateSid(in.getSid()); fillFields(in); } - /** - * called by constructor, should throw runtime exception in the event of a - * record passed with a differing ID. - * - * @param id alleged id for this record - */ - - protected abstract void validateSid(short id); - /** * called by the constructor, should set class level fields. Should throw * runtime exception for bad/icomplete data. diff --git a/src/java/org/apache/poi/hssf/record/RefModeRecord.java b/src/java/org/apache/poi/hssf/record/RefModeRecord.java index c99d02e5c..632d0d3b5 100644 --- a/src/java/org/apache/poi/hssf/record/RefModeRecord.java +++ b/src/java/org/apache/poi/hssf/record/RefModeRecord.java @@ -52,14 +52,6 @@ public class RefModeRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT An RefMode RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_mode = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/RefreshAllRecord.java b/src/java/org/apache/poi/hssf/record/RefreshAllRecord.java index eae7a532e..624001bea 100644 --- a/src/java/org/apache/poi/hssf/record/RefreshAllRecord.java +++ b/src/java/org/apache/poi/hssf/record/RefreshAllRecord.java @@ -50,14 +50,6 @@ public class RefreshAllRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A REFRESHALL RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_refreshall = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/RightMarginRecord.java b/src/java/org/apache/poi/hssf/record/RightMarginRecord.java index 34c7d8e12..9e76010a3 100644 --- a/src/java/org/apache/poi/hssf/record/RightMarginRecord.java +++ b/src/java/org/apache/poi/hssf/record/RightMarginRecord.java @@ -36,17 +36,6 @@ public class RightMarginRecord extends Record implements Margin public RightMarginRecord( RecordInputStream in ) { super( in ); } - /** - * Checks the sid matches the expected side for this record * * @param id the expected sid. - */ - protected void validateSid( short id ) - { - if ( id != sid ) - { - throw new RecordFormatException( "Not a RightMargin record" ); - } - } - protected void fillFields( RecordInputStream in ) { field_1_margin = in.readDouble(); @@ -93,4 +82,4 @@ public class RightMarginRecord extends Record implements Margin rec.field_1_margin = this.field_1_margin; return rec; } -} // END OF CLASS \ No newline at end of file +} // END OF CLAS \ No newline at end of file diff --git a/src/java/org/apache/poi/hssf/record/RowRecord.java b/src/java/org/apache/poi/hssf/record/RowRecord.java index 8b49523a8..a5e5cd1e8 100644 --- a/src/java/org/apache/poi/hssf/record/RowRecord.java +++ b/src/java/org/apache/poi/hssf/record/RowRecord.java @@ -83,14 +83,6 @@ public final class RowRecord extends Record { super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A valid ROW RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_row_number = in.readUShort(); diff --git a/src/java/org/apache/poi/hssf/record/SCLRecord.java b/src/java/org/apache/poi/hssf/record/SCLRecord.java index f06694b86..41cbdee16 100644 --- a/src/java/org/apache/poi/hssf/record/SCLRecord.java +++ b/src/java/org/apache/poi/hssf/record/SCLRecord.java @@ -55,19 +55,6 @@ public class SCLRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a SCL record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_numerator = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/SSTRecord.java b/src/java/org/apache/poi/hssf/record/SSTRecord.java index 9c67c8dca..7f3477b63 100644 --- a/src/java/org/apache/poi/hssf/record/SSTRecord.java +++ b/src/java/org/apache/poi/hssf/record/SSTRecord.java @@ -256,23 +256,6 @@ public class SSTRecord .equals( other.field_3_strings ) ); } - /** - * validate SID - * - * @param id the alleged SID - * - * @exception RecordFormatException if validation fails - */ - - protected void validateSid( final short id ) - throws RecordFormatException - { - if ( id != sid ) - { - throw new RecordFormatException( "NOT An SST RECORD" ); - } - } - /** * Fill the fields from the data *

diff --git a/src/java/org/apache/poi/hssf/record/SaveRecalcRecord.java b/src/java/org/apache/poi/hssf/record/SaveRecalcRecord.java index 96ff53af2..2304639db 100644 --- a/src/java/org/apache/poi/hssf/record/SaveRecalcRecord.java +++ b/src/java/org/apache/poi/hssf/record/SaveRecalcRecord.java @@ -50,14 +50,6 @@ public class SaveRecalcRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A Save Recalc RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_recalc = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/ScenarioProtectRecord.java b/src/java/org/apache/poi/hssf/record/ScenarioProtectRecord.java index f84316362..9140f342b 100644 --- a/src/java/org/apache/poi/hssf/record/ScenarioProtectRecord.java +++ b/src/java/org/apache/poi/hssf/record/ScenarioProtectRecord.java @@ -52,14 +52,6 @@ public class ScenarioProtectRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A SCENARIOPROTECT RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_protect = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/SelectionRecord.java b/src/java/org/apache/poi/hssf/record/SelectionRecord.java index e1849a7d7..c83b3e4da 100644 --- a/src/java/org/apache/poi/hssf/record/SelectionRecord.java +++ b/src/java/org/apache/poi/hssf/record/SelectionRecord.java @@ -59,12 +59,6 @@ public final class SelectionRecord extends Record { super(in); } - protected void validateSid(short id) { - if (id != sid) { - throw new RecordFormatException("NOT A valid Selection RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_pane = in.readByte(); field_2_row_active_cell = in.readUShort(); diff --git a/src/java/org/apache/poi/hssf/record/SeriesChartGroupIndexRecord.java b/src/java/org/apache/poi/hssf/record/SeriesChartGroupIndexRecord.java index 076687d69..ce1fa3d83 100644 --- a/src/java/org/apache/poi/hssf/record/SeriesChartGroupIndexRecord.java +++ b/src/java/org/apache/poi/hssf/record/SeriesChartGroupIndexRecord.java @@ -54,19 +54,6 @@ public class SeriesChartGroupIndexRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a SeriesChartGroupIndex record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_chartGroupIndex = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/SeriesIndexRecord.java b/src/java/org/apache/poi/hssf/record/SeriesIndexRecord.java index dcc2ebe4a..3f3f88803 100644 --- a/src/java/org/apache/poi/hssf/record/SeriesIndexRecord.java +++ b/src/java/org/apache/poi/hssf/record/SeriesIndexRecord.java @@ -54,19 +54,6 @@ public class SeriesIndexRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a SeriesIndex record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_index = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/SeriesLabelsRecord.java b/src/java/org/apache/poi/hssf/record/SeriesLabelsRecord.java index e18ae4be8..8ee1690e6 100644 --- a/src/java/org/apache/poi/hssf/record/SeriesLabelsRecord.java +++ b/src/java/org/apache/poi/hssf/record/SeriesLabelsRecord.java @@ -58,19 +58,6 @@ public final class SeriesLabelsRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a SeriesLabels record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_formatFlags = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/SeriesListRecord.java b/src/java/org/apache/poi/hssf/record/SeriesListRecord.java index 0825e68e6..d47f6b82b 100644 --- a/src/java/org/apache/poi/hssf/record/SeriesListRecord.java +++ b/src/java/org/apache/poi/hssf/record/SeriesListRecord.java @@ -54,19 +54,6 @@ public class SeriesListRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a SeriesList record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_seriesNumbers = in.readShortArray(); diff --git a/src/java/org/apache/poi/hssf/record/SeriesRecord.java b/src/java/org/apache/poi/hssf/record/SeriesRecord.java index c13ff35e7..95fbd79b5 100644 --- a/src/java/org/apache/poi/hssf/record/SeriesRecord.java +++ b/src/java/org/apache/poi/hssf/record/SeriesRecord.java @@ -71,19 +71,6 @@ public class SeriesRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a Series record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_categoryDataType = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/SeriesTextRecord.java b/src/java/org/apache/poi/hssf/record/SeriesTextRecord.java index 66c26b321..b451b57c7 100644 --- a/src/java/org/apache/poi/hssf/record/SeriesTextRecord.java +++ b/src/java/org/apache/poi/hssf/record/SeriesTextRecord.java @@ -57,19 +57,6 @@ public class SeriesTextRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a SeriesText record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_id = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/SeriesToChartGroupRecord.java b/src/java/org/apache/poi/hssf/record/SeriesToChartGroupRecord.java index 96e882e7c..94877c602 100644 --- a/src/java/org/apache/poi/hssf/record/SeriesToChartGroupRecord.java +++ b/src/java/org/apache/poi/hssf/record/SeriesToChartGroupRecord.java @@ -54,19 +54,6 @@ public class SeriesToChartGroupRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a SeriesToChartGroup record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_chartGroupIndex = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/SharedValueRecordBase.java b/src/java/org/apache/poi/hssf/record/SharedValueRecordBase.java index 16a73d0a8..fe4e8b582 100644 --- a/src/java/org/apache/poi/hssf/record/SharedValueRecordBase.java +++ b/src/java/org/apache/poi/hssf/record/SharedValueRecordBase.java @@ -45,12 +45,6 @@ public abstract class SharedValueRecordBase extends Record { _range = new CellRangeAddress8Bit(in); } - protected final void validateSid(short id) { - if (id != getSid()) { - throw new RecordFormatException("Not a valid SharedFormula"); - } - } - public final CellRangeAddress8Bit getRange() { return _range; } diff --git a/src/java/org/apache/poi/hssf/record/SheetPropertiesRecord.java b/src/java/org/apache/poi/hssf/record/SheetPropertiesRecord.java index c919278b4..1cd683353 100644 --- a/src/java/org/apache/poi/hssf/record/SheetPropertiesRecord.java +++ b/src/java/org/apache/poi/hssf/record/SheetPropertiesRecord.java @@ -62,19 +62,6 @@ public final class SheetPropertiesRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a SheetProperties record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_flags = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/StringRecord.java b/src/java/org/apache/poi/hssf/record/StringRecord.java index d7eb11efc..41154b618 100644 --- a/src/java/org/apache/poi/hssf/record/StringRecord.java +++ b/src/java/org/apache/poi/hssf/record/StringRecord.java @@ -46,21 +46,6 @@ public class StringRecord extends Record { super(in); } - - /** - * Throw a runtime exception in the event of a - * record passed with a differing ID. - * - * @param id alleged id for this record - */ - protected void validateSid( short id ) - { - if (id != sid) - { - throw new RecordFormatException("Not a valid StringRecord"); - } - } - /** * @param in the RecordInputstream to read the record from */ diff --git a/src/java/org/apache/poi/hssf/record/StyleRecord.java b/src/java/org/apache/poi/hssf/record/StyleRecord.java index c6591f550..3dc095431 100644 --- a/src/java/org/apache/poi/hssf/record/StyleRecord.java +++ b/src/java/org/apache/poi/hssf/record/StyleRecord.java @@ -64,14 +64,6 @@ public final class StyleRecord extends Record { super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A STYLE RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_xf_index = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/SupBookRecord.java b/src/java/org/apache/poi/hssf/record/SupBookRecord.java index b4e46c6fd..66fe24451 100644 --- a/src/java/org/apache/poi/hssf/record/SupBookRecord.java +++ b/src/java/org/apache/poi/hssf/record/SupBookRecord.java @@ -77,12 +77,6 @@ public final class SupBookRecord extends Record { super(in); } - protected void validateSid(short id) { - if (id != sid) { - throw new RecordFormatException("NOT An ExternSheet RECORD"); - } - } - public boolean isExternalReferences() { return field_3_sheet_names != null; } diff --git a/src/java/org/apache/poi/hssf/record/TabIdRecord.java b/src/java/org/apache/poi/hssf/record/TabIdRecord.java index 7e924c337..5e292c45f 100644 --- a/src/java/org/apache/poi/hssf/record/TabIdRecord.java +++ b/src/java/org/apache/poi/hssf/record/TabIdRecord.java @@ -50,14 +50,6 @@ public class TabIdRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A TABID RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_tabids = new short[ in.remaining() / 2 ]; diff --git a/src/java/org/apache/poi/hssf/record/TextObjectBaseRecord.java b/src/java/org/apache/poi/hssf/record/TextObjectBaseRecord.java index 2d649247b..e8df518c9 100644 --- a/src/java/org/apache/poi/hssf/record/TextObjectBaseRecord.java +++ b/src/java/org/apache/poi/hssf/record/TextObjectBaseRecord.java @@ -81,19 +81,6 @@ public class TextObjectBaseRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a TextObjectBase record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_options = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/TextRecord.java b/src/java/org/apache/poi/hssf/record/TextRecord.java index 0840fe193..7ef94f27a 100644 --- a/src/java/org/apache/poi/hssf/record/TextRecord.java +++ b/src/java/org/apache/poi/hssf/record/TextRecord.java @@ -105,19 +105,6 @@ public final class TextRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a Text record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_horizontalAlignment = in.readByte(); diff --git a/src/java/org/apache/poi/hssf/record/TickRecord.java b/src/java/org/apache/poi/hssf/record/TickRecord.java index 1b950e3ed..e3230d1dc 100644 --- a/src/java/org/apache/poi/hssf/record/TickRecord.java +++ b/src/java/org/apache/poi/hssf/record/TickRecord.java @@ -68,19 +68,6 @@ public final class TickRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a Tick record"); - } - } - protected void fillFields(RecordInputStream in) { diff --git a/src/java/org/apache/poi/hssf/record/TopMarginRecord.java b/src/java/org/apache/poi/hssf/record/TopMarginRecord.java index 5c507a211..78860616e 100644 --- a/src/java/org/apache/poi/hssf/record/TopMarginRecord.java +++ b/src/java/org/apache/poi/hssf/record/TopMarginRecord.java @@ -40,19 +40,6 @@ public class TopMarginRecord extends Record implements Margin public TopMarginRecord( RecordInputStream in ) { super( in ); } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid( short id ) - { - if ( id != sid ) - { - throw new RecordFormatException( "Not a TopMargin record" ); - } - } - /** * @param in the RecordInputstream to read the record from */ @@ -102,4 +89,4 @@ public class TopMarginRecord extends Record implements Margin rec.field_1_margin = this.field_1_margin; return rec; } -} // END OF CLASS +} // END OF CLASS \ No newline at end of file diff --git a/src/java/org/apache/poi/hssf/record/UncalcedRecord.java b/src/java/org/apache/poi/hssf/record/UncalcedRecord.java index a67b0b5af..c4ca369f6 100644 --- a/src/java/org/apache/poi/hssf/record/UncalcedRecord.java +++ b/src/java/org/apache/poi/hssf/record/UncalcedRecord.java @@ -48,12 +48,6 @@ public class UncalcedRecord extends Record return sid; } - protected void validateSid(short id) { - if (id != sid) { - throw new RecordFormatException("NOT AN UNCALCED RECORD"); - } - } - protected void fillFields(RecordInputStream in) { short unused = in.readShort(); } diff --git a/src/java/org/apache/poi/hssf/record/UnicodeString.java b/src/java/org/apache/poi/hssf/record/UnicodeString.java index 9919d52c3..3cf35accd 100644 --- a/src/java/org/apache/poi/hssf/record/UnicodeString.java +++ b/src/java/org/apache/poi/hssf/record/UnicodeString.java @@ -111,8 +111,7 @@ public class UnicodeString public UnicodeString(RecordInputStream in) { - validateSid(in.getSid()); - fillFields(in); + fillFields(in); // TODO - inline } @@ -188,16 +187,6 @@ public class UnicodeString return true; } - /** - * NO OP - */ - - protected void validateSid(short id) - { - - // included only for interface compliance - } - /** * @param in the RecordInputstream to read the record from */ diff --git a/src/java/org/apache/poi/hssf/record/UnitsRecord.java b/src/java/org/apache/poi/hssf/record/UnitsRecord.java index a427a6c73..84464376f 100644 --- a/src/java/org/apache/poi/hssf/record/UnitsRecord.java +++ b/src/java/org/apache/poi/hssf/record/UnitsRecord.java @@ -53,19 +53,6 @@ public class UnitsRecord } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a Units record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_units = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/UnknownRecord.java b/src/java/org/apache/poi/hssf/record/UnknownRecord.java index 851dbfbf5..6f78f6ff5 100644 --- a/src/java/org/apache/poi/hssf/record/UnknownRecord.java +++ b/src/java/org/apache/poi/hssf/record/UnknownRecord.java @@ -91,13 +91,6 @@ public final class UnknownRecord extends Record { return 4 + _rawData.length; } - /** - * NO OP! - */ - protected void validateSid(short id) { - // if we had a valid sid we wouldn't be using the "Unknown Record" record now would we? - } - /** * print a sort of string representation ([UNKNOWN RECORD] id = x [/UNKNOWN RECORD]) */ diff --git a/src/java/org/apache/poi/hssf/record/UseSelFSRecord.java b/src/java/org/apache/poi/hssf/record/UseSelFSRecord.java index 107792eb3..9b2e25e52 100644 --- a/src/java/org/apache/poi/hssf/record/UseSelFSRecord.java +++ b/src/java/org/apache/poi/hssf/record/UseSelFSRecord.java @@ -52,14 +52,6 @@ public class UseSelFSRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A UseSelFS RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_flag = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/VCenterRecord.java b/src/java/org/apache/poi/hssf/record/VCenterRecord.java index e221b35f1..5df785caa 100644 --- a/src/java/org/apache/poi/hssf/record/VCenterRecord.java +++ b/src/java/org/apache/poi/hssf/record/VCenterRecord.java @@ -50,14 +50,6 @@ public class VCenterRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A VCenter RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_vcenter = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/ValueRangeRecord.java b/src/java/org/apache/poi/hssf/record/ValueRangeRecord.java index 6c94c5c54..c7c07cfe6 100644 --- a/src/java/org/apache/poi/hssf/record/ValueRangeRecord.java +++ b/src/java/org/apache/poi/hssf/record/ValueRangeRecord.java @@ -67,19 +67,6 @@ public final class ValueRangeRecord extends Record { } - /** - * Checks the sid matches the expected side for this record - * - * @param id the expected sid. - */ - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("Not a ValueRange record"); - } - } - protected void fillFields(RecordInputStream in) { field_1_minimumAxisValue = in.readDouble(); diff --git a/src/java/org/apache/poi/hssf/record/VerticalPageBreakRecord.java b/src/java/org/apache/poi/hssf/record/VerticalPageBreakRecord.java index fccb7ccda..3dc5348f9 100644 --- a/src/java/org/apache/poi/hssf/record/VerticalPageBreakRecord.java +++ b/src/java/org/apache/poi/hssf/record/VerticalPageBreakRecord.java @@ -43,13 +43,6 @@ public final class VerticalPageBreakRecord extends PageBreakRecord { super(in); } - protected void validateSid(short id) { - if (id != getSid()) { - throw new RecordFormatException( - "NOT A HorizontalPageBreak or VerticalPageBreak RECORD!! " + id); - } - } - public short getSid() { return sid; } diff --git a/src/java/org/apache/poi/hssf/record/WSBoolRecord.java b/src/java/org/apache/poi/hssf/record/WSBoolRecord.java index 480b7f240..9a4f3dd20 100644 --- a/src/java/org/apache/poi/hssf/record/WSBoolRecord.java +++ b/src/java/org/apache/poi/hssf/record/WSBoolRecord.java @@ -81,14 +81,6 @@ public class WSBoolRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A WSBoolRECORD"); - } - } - protected void fillFields(RecordInputStream in) { byte data[] = in.readRemainder(); diff --git a/src/java/org/apache/poi/hssf/record/WindowOneRecord.java b/src/java/org/apache/poi/hssf/record/WindowOneRecord.java index 4c836f2ee..91f9cbd64 100644 --- a/src/java/org/apache/poi/hssf/record/WindowOneRecord.java +++ b/src/java/org/apache/poi/hssf/record/WindowOneRecord.java @@ -76,14 +76,6 @@ public class WindowOneRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A WINDOW1 RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_h_hold = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/WindowProtectRecord.java b/src/java/org/apache/poi/hssf/record/WindowProtectRecord.java index 9a5bc45dc..7f7b42336 100644 --- a/src/java/org/apache/poi/hssf/record/WindowProtectRecord.java +++ b/src/java/org/apache/poi/hssf/record/WindowProtectRecord.java @@ -49,14 +49,6 @@ public class WindowProtectRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A WINDOWPROTECT RECORD"); - } - } - protected void fillFields(RecordInputStream in) { field_1_protect = in.readShort(); diff --git a/src/java/org/apache/poi/hssf/record/WindowTwoRecord.java b/src/java/org/apache/poi/hssf/record/WindowTwoRecord.java index 6e60ef41a..012a9e22e 100644 --- a/src/java/org/apache/poi/hssf/record/WindowTwoRecord.java +++ b/src/java/org/apache/poi/hssf/record/WindowTwoRecord.java @@ -71,14 +71,6 @@ public final class WindowTwoRecord extends Record { super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A valid WindowTwo RECORD"); - } - } - protected void fillFields(RecordInputStream in) { int size = in.remaining(); diff --git a/src/java/org/apache/poi/hssf/record/WriteAccessRecord.java b/src/java/org/apache/poi/hssf/record/WriteAccessRecord.java index af5f06e04..a01953a50 100644 --- a/src/java/org/apache/poi/hssf/record/WriteAccessRecord.java +++ b/src/java/org/apache/poi/hssf/record/WriteAccessRecord.java @@ -52,14 +52,6 @@ public class WriteAccessRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A WRITEACCESS RECORD"); - } - } - protected void fillFields(RecordInputStream in) { byte[] data = in.readRemainder(); diff --git a/src/java/org/apache/poi/hssf/record/WriteProtectRecord.java b/src/java/org/apache/poi/hssf/record/WriteProtectRecord.java index 9b3daf2a1..5cef19d61 100644 --- a/src/java/org/apache/poi/hssf/record/WriteProtectRecord.java +++ b/src/java/org/apache/poi/hssf/record/WriteProtectRecord.java @@ -48,14 +48,6 @@ public class WriteProtectRecord super(in); } - protected void validateSid(short id) - { - if (id != sid) - { - throw new RecordFormatException("NOT A WRITEPROTECT RECORD"); - } - } - protected void fillFields(RecordInputStream in) { } diff --git a/src/testcases/org/apache/poi/hssf/record/TestAreaFormatRecord.java b/src/testcases/org/apache/poi/hssf/record/TestAreaFormatRecord.java index 7d543c451..de834be95 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestAreaFormatRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestAreaFormatRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,9 +28,7 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestAreaFormatRecord - extends TestCase -{ +public final class TestAreaFormatRecord extends TestCase { byte[] data = new byte[] { (byte)0xFF,(byte)0xFF,(byte)0xFF,(byte)0x00, // forecolor (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, // backcolor @@ -44,14 +39,7 @@ public class TestAreaFormatRecord }; - public TestAreaFormatRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { AreaFormatRecord record = new AreaFormatRecord(new TestcaseRecordInputStream((short)0x100a, (short)data.length, data)); assertEquals( 0xFFFFFF, record.getForegroundColor()); @@ -65,8 +53,6 @@ public class TestAreaFormatRecord assertEquals( 20, record.getRecordSize() ); - - record.validateSid((short)0x100a); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestAreaRecord.java b/src/testcases/org/apache/poi/hssf/record/TestAreaRecord.java index 23b50a5ff..2131e7319 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestAreaRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestAreaRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,21 +28,12 @@ import junit.framework.TestCase; * * @author Glen Stampoultzis (glens at apache.org) */ -public class TestAreaRecord - extends TestCase -{ +public final class TestAreaRecord extends TestCase { byte[] data = new byte[] { (byte)0x02,(byte)0x00 // format flags }; - public TestAreaRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { AreaRecord record = new AreaRecord(new TestcaseRecordInputStream((short)0x101A, (short)data.length, data)); assertEquals( 2, record.getFormatFlags()); @@ -55,8 +43,6 @@ public class TestAreaRecord assertEquals( 6, record.getRecordSize() ); - - record.validateSid((short)0x101A); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestAxisLineFormatRecord.java b/src/testcases/org/apache/poi/hssf/record/TestAxisLineFormatRecord.java index 5340e20d9..2146a31cf 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestAxisLineFormatRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestAxisLineFormatRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,28 +28,16 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestAxisLineFormatRecord - extends TestCase -{ +public final class TestAxisLineFormatRecord extends TestCase { byte[] data = new byte[] { (byte)0x01,(byte)0x00 }; - public TestAxisLineFormatRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { AxisLineFormatRecord record = new AxisLineFormatRecord(new TestcaseRecordInputStream((short)0x1021, (short)data.length, data)); assertEquals( AxisLineFormatRecord.AXIS_TYPE_MAJOR_GRID_LINE, record.getAxisType()); - assertEquals( 6, record.getRecordSize() ); - - record.validateSid((short)0x1021); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestAxisOptionsRecord.java b/src/testcases/org/apache/poi/hssf/record/TestAxisOptionsRecord.java index 498f896a7..4d88e18a6 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestAxisOptionsRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestAxisOptionsRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,9 +28,7 @@ import junit.framework.TestCase; * @author Andrew C. Oliver(acoliver at apache.org) */ -public class TestAxisOptionsRecord - extends TestCase -{ +public final class TestAxisOptionsRecord extends TestCase { byte[] data = new byte[] { (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x01, (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x01,(byte)0x00, @@ -41,14 +36,7 @@ public class TestAxisOptionsRecord (byte)0x00,(byte)0xEF,(byte)0x00 }; - public TestAxisOptionsRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { AxisOptionsRecord record = new AxisOptionsRecord(new TestcaseRecordInputStream((short)0x1062, (short)data.length, data)); assertEquals( 0, record.getMinimumCategory()); assertEquals( 0, record.getMaximumCategory()); @@ -68,10 +56,7 @@ public class TestAxisOptionsRecord assertEquals( true, record.isDefaultCross() ); assertEquals( true, record.isDefaultDateSettings() ); - assertEquals( 22, record.getRecordSize() ); - - record.validateSid((short)0x1062); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestAxisParentRecord.java b/src/testcases/org/apache/poi/hssf/record/TestAxisParentRecord.java index 0d5cdb171..a9787a2e8 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestAxisParentRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestAxisParentRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -30,9 +27,7 @@ import junit.framework.TestCase; * * @author Glen Stampoultzis (glens at apache.org) */ -public class TestAxisParentRecord - extends TestCase -{ +public final class TestAxisParentRecord extends TestCase { byte[] data = new byte[] { (byte)0x00,(byte)0x00, // axis type (byte)0x1D,(byte)0x02,(byte)0x00,(byte)0x00, // x @@ -41,14 +36,7 @@ public class TestAxisParentRecord (byte)0x56,(byte)0x0B,(byte)0x00,(byte)0x00 // height }; - public TestAxisParentRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { AxisParentRecord record = new AxisParentRecord(new TestcaseRecordInputStream((short)0x1041, (short)data.length, data)); assertEquals( AxisParentRecord.AXIS_TYPE_MAIN, record.getAxisType()); assertEquals( 0x021d, record.getX()); @@ -56,10 +44,7 @@ public class TestAxisParentRecord assertEquals( 0x0b31, record.getWidth()); assertEquals( 0x0b56, record.getHeight()); - assertEquals( 22, record.getRecordSize() ); - - record.validateSid((short)0x1041); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestAxisRecord.java b/src/testcases/org/apache/poi/hssf/record/TestAxisRecord.java index 76c53bd16..719e930d2 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestAxisRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestAxisRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,26 +28,16 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestAxisRecord - extends TestCase -{ +public final class TestAxisRecord extends TestCase { byte[] data = new byte[] { (byte)0x00,(byte)0x00, // type (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00 - }; - public TestAxisRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { AxisRecord record = new AxisRecord(new TestcaseRecordInputStream((short)0x101d, (short)data.length, data)); assertEquals( AxisRecord.AXIS_TYPE_CATEGORY_OR_X_AXIS, record.getAxisType()); @@ -59,10 +46,7 @@ public class TestAxisRecord assertEquals( 0, record.getReserved3()); assertEquals( 0, record.getReserved4()); - assertEquals( 4 + 18, record.getRecordSize() ); - - record.validateSid((short)0x101d); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestAxisUsedRecord.java b/src/testcases/org/apache/poi/hssf/record/TestAxisUsedRecord.java index 24516e095..98812ddd6 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestAxisUsedRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestAxisUsedRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,28 +28,16 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestAxisUsedRecord - extends TestCase -{ +public final class TestAxisUsedRecord extends TestCase { byte[] data = new byte[] { (byte)0x01,(byte)0x00, }; - public TestAxisUsedRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { AxisUsedRecord record = new AxisUsedRecord(new TestcaseRecordInputStream((short)0x1046, (short)data.length, data)); assertEquals( 1, record.getNumAxis()); - assertEquals( 6, record.getRecordSize() ); - - record.validateSid((short)0x1046); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestBarRecord.java b/src/testcases/org/apache/poi/hssf/record/TestBarRecord.java index 99cf36788..1da17aae9 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestBarRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestBarRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,23 +28,14 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestBarRecord - extends TestCase -{ +public final class TestBarRecord extends TestCase { byte[] data = new byte[] { (byte)0x00,(byte)0x00, // bar space (byte)0x96,(byte)0x00, // category space (byte)0x00,(byte)0x00 // format flags }; - public TestBarRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { BarRecord record = new BarRecord(new TestcaseRecordInputStream((short)0x1017, (short)data.length, data)); assertEquals( 0, record.getBarSpace()); @@ -58,10 +46,7 @@ public class TestBarRecord assertEquals( false, record.isDisplayAsPercentage() ); assertEquals( false, record.isShadow() ); - assertEquals( 10, record.getRecordSize() ); - - record.validateSid((short)0x1017); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestCategorySeriesAxisRecord.java b/src/testcases/org/apache/poi/hssf/record/TestCategorySeriesAxisRecord.java index d0baf9b95..415b302e8 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestCategorySeriesAxisRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestCategorySeriesAxisRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,9 +28,7 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestCategorySeriesAxisRecord - extends TestCase -{ +public final class TestCategorySeriesAxisRecord extends TestCase { byte[] data = new byte[] { (byte)0x01,(byte)0x00, // crossing point (byte)0x01,(byte)0x00, // label frequency @@ -41,14 +36,7 @@ public class TestCategorySeriesAxisRecord (byte)0x01,(byte)0x00 // options }; - public TestCategorySeriesAxisRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { CategorySeriesAxisRecord record = new CategorySeriesAxisRecord(new TestcaseRecordInputStream((short)0x1020, (short)data.length, data)); assertEquals( 1, record.getCrossingPoint()); @@ -59,10 +47,7 @@ public class TestCategorySeriesAxisRecord assertEquals( false, record.isCrossesFarRight() ); assertEquals( false, record.isReversed() ); - assertEquals( 4 + 8, record.getRecordSize() ); - - record.validateSid((short)0x1020); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestChartRecord.java b/src/testcases/org/apache/poi/hssf/record/TestChartRecord.java index 16591a209..996fb1102 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestChartRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestChartRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,9 +28,7 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestChartRecord - extends TestCase -{ +public final class TestChartRecord extends TestCase { byte[] data = new byte[] { (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, @@ -41,14 +36,7 @@ public class TestChartRecord (byte)0xC8,(byte)0xCC,(byte)0xE5,(byte)0x00 }; - public TestChartRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { ChartRecord record = new ChartRecord(new TestcaseRecordInputStream((short)0x1002, (short)data.length, data)); assertEquals( 0, record.getX()); @@ -56,10 +44,7 @@ public class TestChartRecord assertEquals( 30474216, record.getWidth()); assertEquals( 15060168, record.getHeight()); - assertEquals( 20, record.getRecordSize() ); - - record.validateSid((short)0x1002); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestCommonObjectDataSubRecord.java b/src/testcases/org/apache/poi/hssf/record/TestCommonObjectDataSubRecord.java index 0f7ba7296..e68b5026d 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestCommonObjectDataSubRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestCommonObjectDataSubRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,9 +28,7 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestCommonObjectDataSubRecord - extends TestCase -{ +public final class TestCommonObjectDataSubRecord extends TestCase { byte[] data = new byte[] { (byte)0x12,(byte)0x00,(byte)0x01,(byte)0x00, (byte)0x01,(byte)0x00,(byte)0x11,(byte)0x60, @@ -42,16 +37,8 @@ public class TestCommonObjectDataSubRecord (byte)0x00,(byte)0x00, }; - public TestCommonObjectDataSubRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { CommonObjectDataSubRecord record = new CommonObjectDataSubRecord(new TestcaseRecordInputStream((short)0x15, (short)data.length, data)); - assertEquals( CommonObjectDataSubRecord.OBJECT_TYPE_LIST_BOX, record.getObjectType()); assertEquals( (short)1, record.getObjectId()); @@ -64,8 +51,6 @@ public class TestCommonObjectDataSubRecord assertEquals( (int)218103808, record.getReserved2()); assertEquals( (int)294, record.getReserved3()); assertEquals( 22 , record.getRecordSize() ); - - record.validateSid((short)0x15); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestDatRecord.java b/src/testcases/org/apache/poi/hssf/record/TestDatRecord.java index 3cd7a0603..8efbe70ec 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestDatRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestDatRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,21 +28,12 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestDatRecord - extends TestCase -{ +public final class TestDatRecord extends TestCase { byte[] data = new byte[] { (byte)0x0D,(byte)0x00 // options }; - public TestDatRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { DatRecord record = new DatRecord(new TestcaseRecordInputStream((short)0x1063, (short)data.length, data)); assertEquals( 0xD, record.getOptions()); @@ -54,10 +42,7 @@ public class TestDatRecord assertEquals( true, record.isBorder() ); assertEquals( true, record.isShowSeriesKey() ); - assertEquals( 6, record.getRecordSize() ); - - record.validateSid((short)0x1063); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestDataFormatRecord.java b/src/testcases/org/apache/poi/hssf/record/TestDataFormatRecord.java index ff8111ced..8de2f24da 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestDataFormatRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestDataFormatRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,9 +28,7 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestDataFormatRecord - extends TestCase -{ +public final class TestDataFormatRecord extends TestCase { byte[] data = new byte[] { (byte)0xFF,(byte)0xFF, // point number (byte)0x00,(byte)0x00, // series index @@ -41,14 +36,7 @@ public class TestDataFormatRecord (byte)0x00,(byte)0x00 // format flags }; - public TestDataFormatRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { DataFormatRecord record = new DataFormatRecord(new TestcaseRecordInputStream((short)0x1006, (short)data.length, data)); assertEquals( (short)0xFFFF, record.getPointNumber()); @@ -57,10 +45,7 @@ public class TestDataFormatRecord assertEquals( 0, record.getFormatFlags()); assertEquals( false, record.isUseExcel4Colors() ); - assertEquals( 12, record.getRecordSize() ); - - record.validateSid((short)0x1006); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestDefaultDataLabelTextPropertiesRecord.java b/src/testcases/org/apache/poi/hssf/record/TestDefaultDataLabelTextPropertiesRecord.java index 61a3dd592..f96dca90b 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestDefaultDataLabelTextPropertiesRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestDefaultDataLabelTextPropertiesRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,29 +28,17 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestDefaultDataLabelTextPropertiesRecord - extends TestCase -{ +public final class TestDefaultDataLabelTextPropertiesRecord extends TestCase { byte[] data = new byte[] { (byte)0x02,(byte)0x00 }; - public TestDefaultDataLabelTextPropertiesRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { DefaultDataLabelTextPropertiesRecord record = new DefaultDataLabelTextPropertiesRecord(new TestcaseRecordInputStream((short)0x1024, (short)data.length, data)); assertEquals( 2, record.getCategoryDataType()); - assertEquals( 6, record.getRecordSize() ); - - record.validateSid((short)0x1024); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestEndSubRecord.java b/src/testcases/org/apache/poi/hssf/record/TestEndSubRecord.java index 0e48fcb4c..d80939242 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestEndSubRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestEndSubRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -30,28 +27,15 @@ import junit.framework.TestCase; * * @author Glen Stampoultzis (glens at apache.org) */ -public class TestEndSubRecord - extends TestCase -{ +public final class TestEndSubRecord extends TestCase { byte[] data = new byte[] { }; - public TestEndSubRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { EndSubRecord record = new EndSubRecord(new TestcaseRecordInputStream((short)0x00, (short)data.length, data)); - - assertEquals( 4, record.getRecordSize() ); - - record.validateSid((short)0x00); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestExtendedFormatRecord.java b/src/testcases/org/apache/poi/hssf/record/TestExtendedFormatRecord.java index 5bbf05be7..3faa69ed6 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestExtendedFormatRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestExtendedFormatRecord.java @@ -36,14 +36,7 @@ public final class TestExtendedFormatRecord extends TestCase { 0xC0-256, 0x20 // Fill Palette 20c0 }; - public TestExtendedFormatRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { ExtendedFormatRecord record = new ExtendedFormatRecord(new TestcaseRecordInputStream((short)0xe0, (short)data.length, data)); assertEquals(0, record.getFontIndex()); assertEquals(0, record.getFormatIndex()); @@ -56,7 +49,6 @@ public final class TestExtendedFormatRecord extends TestCase { assertEquals(0x20c0, record.getFillPaletteOptions()); assertEquals( 20 + 4, record.getRecordSize() ); - record.validateSid((short)0xe0); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestFontBasisRecord.java b/src/testcases/org/apache/poi/hssf/record/TestFontBasisRecord.java index 7f59031d9..acd5a361a 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestFontBasisRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestFontBasisRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -29,9 +28,7 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestFontBasisRecord - extends TestCase -{ +public final class TestFontBasisRecord extends TestCase { byte[] data = new byte[] { (byte)0x28,(byte)0x1A, // x basis (byte)0x9C,(byte)0x0F, // y basis @@ -40,14 +37,7 @@ public class TestFontBasisRecord (byte)0x05,(byte)0x00 // index to font table }; - public TestFontBasisRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { FontBasisRecord record = new FontBasisRecord(new TestcaseRecordInputStream((short)0x1060, (short)data.length, data)); assertEquals( 0x1a28, record.getXBasis()); @@ -56,10 +46,7 @@ public class TestFontBasisRecord assertEquals( 0x00, record.getScale()); assertEquals( 0x05, record.getIndexToFontTable()); - assertEquals( 14, record.getRecordSize() ); - - record.validateSid((short)0x1060); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestFontIndexRecord.java b/src/testcases/org/apache/poi/hssf/record/TestFontIndexRecord.java index 9509f2662..49cfe4d65 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestFontIndexRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestFontIndexRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,29 +28,17 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestFontIndexRecord - extends TestCase -{ +public final class TestFontIndexRecord extends TestCase { byte[] data = new byte[] { (byte)0x05,(byte)0x00 }; - public TestFontIndexRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { FontIndexRecord record = new FontIndexRecord(new TestcaseRecordInputStream((short)0x1026, (short)data.length, data)); assertEquals( 5, record.getFontIndex()); - assertEquals( 6, record.getRecordSize() ); - - record.validateSid((short)0x1026); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestFontRecord.java b/src/testcases/org/apache/poi/hssf/record/TestFontRecord.java index d5051e991..19449c2f5 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestFontRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestFontRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -26,9 +25,7 @@ import junit.framework.TestCase; * class works correctly. Test data taken directly from a real * Excel file. */ -public class TestFontRecord - extends TestCase -{ +public final class TestFontRecord extends TestCase { byte[] header = new byte[] { 0x31, 00, 0x1a, 00, // sid=31, 26 bytes long }; @@ -45,14 +42,7 @@ public class TestFontRecord 0x00, 0x61, 0x00, 0x6C, 0x00 }; - public TestFontRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { FontRecord record = new FontRecord(new TestcaseRecordInputStream((short)0x31, (short)data.length, data)); assertEquals( 0xc8, record.getFontHeight()); @@ -72,7 +62,6 @@ public class TestFontRecord assertEquals( 26 + 4, record.getRecordSize() ); - record.validateSid((short)0x31); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestFrameRecord.java b/src/testcases/org/apache/poi/hssf/record/TestFrameRecord.java index 1ad27bdc3..f35a04b48 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestFrameRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestFrameRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,22 +28,13 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestFrameRecord - extends TestCase -{ +public final class TestFrameRecord extends TestCase { byte[] data = new byte[] { (byte)0x00,(byte)0x00, // border type (byte)0x02,(byte)0x00 // options }; - public TestFrameRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { FrameRecord record = new FrameRecord(new TestcaseRecordInputStream((short)0x1032, (short)data.length, data)); assertEquals( FrameRecord.BORDER_TYPE_REGULAR, record.getBorderType()); @@ -54,10 +42,7 @@ public class TestFrameRecord assertEquals( false, record.isAutoSize() ); assertEquals( true, record.isAutoPosition() ); - assertEquals( 8, record.getRecordSize() ); - - record.validateSid((short)0x1032); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestLegendRecord.java b/src/testcases/org/apache/poi/hssf/record/TestLegendRecord.java index be4ab5731..aaee94fe8 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestLegendRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestLegendRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,21 +28,12 @@ import junit.framework.TestCase; * @author Andrew C. Oliver (acoliver at apache.org) */ -public class TestLegendRecord - extends TestCase -{ +public class TestLegendRecord extends TestCase { byte[] data = new byte[] { (byte)0x76,(byte)0x0E,(byte)0x00,(byte)0x00,(byte)0x86,(byte)0x07,(byte)0x00,(byte)0x00,(byte)0x19,(byte)0x01,(byte)0x00,(byte)0x00,(byte)0x8B,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x03,(byte)0x01,(byte)0x1F,(byte)0x00 }; - public TestLegendRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { LegendRecord record = new LegendRecord(new TestcaseRecordInputStream((short)0x1015, (short)data.length, data)); @@ -71,8 +59,6 @@ public class TestLegendRecord assertEquals( 24, record.getRecordSize() ); - - record.validateSid((short)0x1015); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestLineFormatRecord.java b/src/testcases/org/apache/poi/hssf/record/TestLineFormatRecord.java index d54f86220..f4e833dd7 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestLineFormatRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestLineFormatRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,9 +28,7 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestLineFormatRecord - extends TestCase -{ +public class TestLineFormatRecord extends TestCase { byte[] data = new byte[] { (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, // colour (byte)0x00,(byte)0x00, // pattern @@ -42,14 +37,7 @@ public class TestLineFormatRecord (byte)0x4D,(byte)0x00 // index }; - public TestLineFormatRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { LineFormatRecord record = new LineFormatRecord(new TestcaseRecordInputStream((short)0x1007, (short)data.length, data)); assertEquals( 0, record.getLineColor()); assertEquals( 0, record.getLinePattern()); @@ -59,10 +47,7 @@ public class TestLineFormatRecord assertEquals( false, record.isDrawTicks() ); assertEquals( 0x4d, record.getColourPaletteIndex()); - assertEquals( 16, record.getRecordSize() ); - - record.validateSid((short)0x1007); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestLinkedDataRecord.java b/src/testcases/org/apache/poi/hssf/record/TestLinkedDataRecord.java index c7ef2acc1..641f1e8c5 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestLinkedDataRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestLinkedDataRecord.java @@ -171,9 +171,6 @@ recordid = 0x1051, size =8 assertEquals(ptgExpected.toString(), ptgActual.toString()); assertEquals( data.length + 4, record.getRecordSize() ); - - record.validateSid((short)0x1051); - } public void testStore() { diff --git a/src/testcases/org/apache/poi/hssf/record/TestNoteRecord.java b/src/testcases/org/apache/poi/hssf/record/TestNoteRecord.java index 2f967b66e..063f34e0c 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestNoteRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestNoteRecord.java @@ -39,19 +39,11 @@ public class TestNoteRecord 0x6E, 0x64, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x00 }; - public TestNoteRecord(String name) - { - super(name); - } - - public void testRead() - throws Exception - { + public void testRead() { NoteRecord record = new NoteRecord(new TestcaseRecordInputStream(NoteRecord.sid, (short)data.length, data)); assertEquals(NoteRecord.sid, record.getSid()); - record.validateSid(NoteRecord.sid); assertEquals(6, record.getRow()); assertEquals(1, record.getColumn()); assertEquals(NoteRecord.NOTE_VISIBLE, record.getFlags()); @@ -60,11 +52,9 @@ public class TestNoteRecord } - public void testWrite() - { + public void testWrite() { NoteRecord record = new NoteRecord(); assertEquals(NoteRecord.sid, record.getSid()); - record.validateSid(NoteRecord.sid); record.setRow((short)6); record.setColumn((short)1); diff --git a/src/testcases/org/apache/poi/hssf/record/TestNoteStructureSubRecord.java b/src/testcases/org/apache/poi/hssf/record/TestNoteStructureSubRecord.java index d6b5a6476..014a5be2b 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestNoteStructureSubRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestNoteStructureSubRecord.java @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ + package org.apache.poi.hssf.record; @@ -28,37 +29,24 @@ import java.util.Arrays; * * @author Yegor Kozlov */ -public class TestNoteStructureSubRecord - extends TestCase -{ +public final class TestNoteStructureSubRecord extends TestCase { private byte[] data = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, (byte)0x80, 0x00, 0x00, 0x00, 0x00, 0x00, (byte)0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, (byte)0x81, 0x01, (byte)0xCC, (byte)0xEC }; - public TestNoteStructureSubRecord(String name) - { - super(name); - } - - public void testRead() - throws Exception - { + public void testRead() { NoteStructureSubRecord record = new NoteStructureSubRecord(new TestcaseRecordInputStream(NoteStructureSubRecord.sid, (short)data.length, data)); assertEquals(NoteStructureSubRecord.sid, record.getSid()); - record.validateSid(NoteStructureSubRecord.sid); assertEquals(data.length + 4, record.getRecordSize()); - } - public void testWrite() - { + public void testWrite() { NoteStructureSubRecord record = new NoteStructureSubRecord(); assertEquals(NoteStructureSubRecord.sid, record.getSid()); - record.validateSid(NoteStructureSubRecord.sid); assertEquals(data.length + 4, record.getRecordSize()); byte [] ser = record.serialize(); diff --git a/src/testcases/org/apache/poi/hssf/record/TestNumberFormatIndexRecord.java b/src/testcases/org/apache/poi/hssf/record/TestNumberFormatIndexRecord.java index e891a1841..1ee74f2cc 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestNumberFormatIndexRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestNumberFormatIndexRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,29 +28,17 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestNumberFormatIndexRecord - extends TestCase -{ +public final class TestNumberFormatIndexRecord extends TestCase { byte[] data = new byte[] { 0x05,0x00 }; - public TestNumberFormatIndexRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { NumberFormatIndexRecord record = new NumberFormatIndexRecord(new TestcaseRecordInputStream((short)0x104e, (short)data.length, data)); assertEquals( 5, record.getFormatIndex()); - assertEquals( 6, record.getRecordSize() ); - - record.validateSid((short)0x104e); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestObjectLinkRecord.java b/src/testcases/org/apache/poi/hssf/record/TestObjectLinkRecord.java index deaef1a04..e9d536df0 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestObjectLinkRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestObjectLinkRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,46 +28,26 @@ import junit.framework.TestCase; * @author Andrew C. Oliver (acoliver at apache.org) */ -public class TestObjectLinkRecord - extends TestCase -{ +public final class TestObjectLinkRecord extends TestCase { byte[] data = new byte[] { (byte)0x03,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00 }; - public TestObjectLinkRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { ObjectLinkRecord record = new ObjectLinkRecord(new TestcaseRecordInputStream((short)0x1027, (short)data.length, data)); - assertEquals( (short)3, record.getAnchorId()); - assertEquals( (short)0x00, record.getLink1()); - assertEquals( (short)0x00, record.getLink2()); - assertEquals( 10, record.getRecordSize() ); - - record.validateSid((short)0x1027); } - public void testStore() - { + public void testStore() { ObjectLinkRecord record = new ObjectLinkRecord(); - - record.setAnchorId( (short)3 ); - record.setLink1( (short)0x00 ); - record.setLink2( (short)0x00 ); diff --git a/src/testcases/org/apache/poi/hssf/record/TestPaneRecord.java b/src/testcases/org/apache/poi/hssf/record/TestPaneRecord.java index a0d0cf841..aa8004791 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestPaneRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestPaneRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -30,9 +27,7 @@ import junit.framework.TestCase; * * @author Glen Stampoultzis (glens at apache.org) */ -public class TestPaneRecord - extends TestCase -{ +public final class TestPaneRecord extends TestCase { byte[] data = new byte[] { (byte)0x01, (byte)0x00, (byte)0x02, (byte)0x00, @@ -41,16 +36,8 @@ public class TestPaneRecord (byte)0x02, (byte)0x00, }; - public TestPaneRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { PaneRecord record = new PaneRecord(new TestcaseRecordInputStream((short)0x41, (short)data.length, data)); - assertEquals( (short)1, record.getX()); assertEquals( (short)2, record.getY()); @@ -59,8 +46,6 @@ public class TestPaneRecord assertEquals( PaneRecord.ACTIVE_PANE_LOWER_LEFT, record.getActivePane()); assertEquals( 14, record.getRecordSize() ); - - record.validateSid((short)0x41); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestPlotAreaRecord.java b/src/testcases/org/apache/poi/hssf/record/TestPlotAreaRecord.java index 01848870d..aa5941a49 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestPlotAreaRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestPlotAreaRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,37 +28,20 @@ import junit.framework.TestCase; * @author Andrew C. Oliver (acoliver at apache.org) */ -public class TestPlotAreaRecord - extends TestCase -{ +public final class TestPlotAreaRecord extends TestCase { byte[] data = new byte[] { }; - public TestPlotAreaRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { PlotAreaRecord record = new PlotAreaRecord(new TestcaseRecordInputStream((short)0x1035, (short)data.length, data)); - - assertEquals( 4, record.getRecordSize() ); - - record.validateSid((short)0x1035); } - public void testStore() - { + public void testStore() { PlotAreaRecord record = new PlotAreaRecord(); - - - byte [] recordBytes = record.serialize(); assertEquals(recordBytes.length - 4, data.length); for (int i = 0; i < data.length; i++) diff --git a/src/testcases/org/apache/poi/hssf/record/TestPlotGrowthRecord.java b/src/testcases/org/apache/poi/hssf/record/TestPlotGrowthRecord.java index e01e5bca5..2897d8c33 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestPlotGrowthRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestPlotGrowthRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -30,31 +27,19 @@ import junit.framework.TestCase; * * @author Glen Stampoultzis (glens at apache.org) */ -public class TestPlotGrowthRecord - extends TestCase -{ +public final class TestPlotGrowthRecord extends TestCase { byte[] data = new byte[] { (byte)0x00,(byte)0x00,(byte)0x01,(byte)0x00, // horizontal (byte)0x00,(byte)0x00,(byte)0x01,(byte)0x00 // vertical }; - public TestPlotGrowthRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { PlotGrowthRecord record = new PlotGrowthRecord(new TestcaseRecordInputStream((short)0x1064, (short)data.length, data)); assertEquals( 65536, record.getHorizontalScale()); assertEquals( 65536, record.getVerticalScale()); - assertEquals( 12, record.getRecordSize() ); - - record.validateSid((short)0x1064); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestSCLRecord.java b/src/testcases/org/apache/poi/hssf/record/TestSCLRecord.java index 9f2a57977..9b98dab1f 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestSCLRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestSCLRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,29 +28,17 @@ import junit.framework.TestCase; * @author Andrew C. Oliver (acoliver at apache.org) */ -public class TestSCLRecord - extends TestCase -{ +public final class TestSCLRecord extends TestCase { byte[] data = new byte[] { (byte)0x3,(byte)0x0,(byte)0x4,(byte)0x0 }; - public TestSCLRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { SCLRecord record = new SCLRecord(new TestcaseRecordInputStream((short)0xa0, (short)data.length, data)); assertEquals( 3, record.getNumerator()); assertEquals( 4, record.getDenominator()); - assertEquals( 8, record.getRecordSize() ); - - record.validateSid((short)0xa0); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestSeriesChartGroupIndexRecord.java b/src/testcases/org/apache/poi/hssf/record/TestSeriesChartGroupIndexRecord.java index ff541fa9d..1f30f26ec 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestSeriesChartGroupIndexRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestSeriesChartGroupIndexRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -30,29 +27,16 @@ import junit.framework.TestCase; * * @author Glen Stampoultzis (glens at apache.org) */ -public class TestSeriesChartGroupIndexRecord - extends TestCase -{ +public final class TestSeriesChartGroupIndexRecord extends TestCase { byte[] data = new byte[] { (byte)0x00,(byte)0x00 }; - public TestSeriesChartGroupIndexRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { SeriesChartGroupIndexRecord record = new SeriesChartGroupIndexRecord(new TestcaseRecordInputStream((short)0x1045, (short)data.length, data)); assertEquals( 0, record.getChartGroupIndex()); - assertEquals( 6, record.getRecordSize() ); - - record.validateSid((short)0x1045); - } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestSeriesIndexRecord.java b/src/testcases/org/apache/poi/hssf/record/TestSeriesIndexRecord.java index f671ed9b5..b971128c9 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestSeriesIndexRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestSeriesIndexRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,30 +28,16 @@ import junit.framework.TestCase; * @author Andrew C. Oliver (acoliver at apache.org) */ -public class TestSeriesIndexRecord - extends TestCase -{ +public final class TestSeriesIndexRecord extends TestCase { byte[] data = new byte[] { (byte)0x03,(byte)0x00 }; - public TestSeriesIndexRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { SeriesIndexRecord record = new SeriesIndexRecord(new TestcaseRecordInputStream((short)0x1065, (short)data.length, data)); - assertEquals( (short)3, record.getIndex()); - - assertEquals( 6, record.getRecordSize() ); - - record.validateSid((short)0x1065); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestSeriesLabelsRecord.java b/src/testcases/org/apache/poi/hssf/record/TestSeriesLabelsRecord.java index 03550cd3d..265583655 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestSeriesLabelsRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestSeriesLabelsRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,21 +28,12 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestSeriesLabelsRecord - extends TestCase -{ +public final class TestSeriesLabelsRecord extends TestCase { byte[] data = new byte[] { (byte)0x03,(byte)0x00 }; - public TestSeriesLabelsRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { SeriesLabelsRecord record = new SeriesLabelsRecord(new TestcaseRecordInputStream((short)0x100c, (short)data.length, data)); assertEquals( 3, record.getFormatFlags()); assertEquals( true, record.isShowActual() ); @@ -57,8 +45,6 @@ public class TestSeriesLabelsRecord assertEquals( 2+4, record.getRecordSize() ); - - record.validateSid((short)0x100c); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestSeriesListRecord.java b/src/testcases/org/apache/poi/hssf/record/TestSeriesListRecord.java index 73be41bdc..7e81f2928 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestSeriesListRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestSeriesListRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,21 +28,12 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestSeriesListRecord - extends TestCase -{ +public final class TestSeriesListRecord extends TestCase { byte[] data = new byte[] { (byte)0x02,(byte)0x00,(byte)0x01,(byte)0x20,(byte)0xff,(byte)0xf0 }; - public TestSeriesListRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { SeriesListRecord record = new SeriesListRecord(new TestcaseRecordInputStream((short)0x1016, (short)data.length, data)); assertEquals( (short)0x2001, record.getSeriesNumbers()[0]); @@ -53,8 +41,6 @@ public class TestSeriesListRecord assertEquals( 2, record.getSeriesNumbers().length); assertEquals( 4 + 6, record.getRecordSize() ); - - record.validateSid((short)0x1016); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestSeriesRecord.java b/src/testcases/org/apache/poi/hssf/record/TestSeriesRecord.java index a01f95966..69232754f 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestSeriesRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestSeriesRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -30,9 +27,7 @@ import junit.framework.TestCase; * * @author Glen Stampoultzis (glens at apache.org) */ -public class TestSeriesRecord - extends TestCase -{ +public final class TestSeriesRecord extends TestCase { byte[] data = new byte[] { (byte)0x01,(byte)0x00, // category data type (byte)0x01,(byte)0x00, // values data type @@ -42,14 +37,7 @@ public class TestSeriesRecord (byte)0x00,(byte)0x00 // num bubble values }; - public TestSeriesRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { SeriesRecord record = new SeriesRecord(new TestcaseRecordInputStream((short)0x1003, (short)data.length, data)); assertEquals( SeriesRecord.CATEGORY_DATA_TYPE_NUMERIC, record.getCategoryDataType()); @@ -61,8 +49,6 @@ public class TestSeriesRecord assertEquals( 16, record.getRecordSize() ); - - record.validateSid((short)0x1003); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestSeriesTextRecord.java b/src/testcases/org/apache/poi/hssf/record/TestSeriesTextRecord.java index 5ad41870a..08e4189af 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestSeriesTextRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestSeriesTextRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,50 +28,29 @@ import junit.framework.TestCase; * @author Andrew C. Oliver (acoliver at apache.org) */ -public class TestSeriesTextRecord - extends TestCase -{ +public final class TestSeriesTextRecord extends TestCase { byte[] data = new byte[] { (byte)0x00,(byte)0x00,(byte)0x0C,(byte)0x01,(byte)0x56,(byte)0x00,(byte)0x61,(byte)0x00,(byte)0x6C,(byte)0x00,(byte)0x75,(byte)0x00,(byte)0x65,(byte)0x00,(byte)0x20,(byte)0x00,(byte)0x4E,(byte)0x00,(byte)0x75,(byte)0x00,(byte)0x6D,(byte)0x00,(byte)0x62,(byte)0x00,(byte)0x65,(byte)0x00,(byte)0x72,(byte)0x00 }; - public TestSeriesTextRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { SeriesTextRecord record = new SeriesTextRecord(new TestcaseRecordInputStream((short)0x100d, (short)data.length, data)); - assertEquals( (short)0, record.getId()); - assertEquals( (byte)0x0C, record.getTextLength()); - assertEquals( (byte)0x01, record.getUndocumented()); - assertEquals( "Value Number", record.getText()); - assertEquals( 32, record.getRecordSize() ); - - record.validateSid((short)0x100d); } public void testStore() { SeriesTextRecord record = new SeriesTextRecord(); - - record.setId( (short)0 ); - record.setTextLength( (byte)0x0C ); - record.setUndocumented( (byte)0x01 ); - record.setText( "Value Number" ); diff --git a/src/testcases/org/apache/poi/hssf/record/TestSeriesToChartGroupRecord.java b/src/testcases/org/apache/poi/hssf/record/TestSeriesToChartGroupRecord.java index 55e0b9467..4f20e0e69 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestSeriesToChartGroupRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestSeriesToChartGroupRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,28 +28,16 @@ import junit.framework.TestCase; * @author Andrew C. Oliver (acoliver at apache.org) */ -public class TestSeriesToChartGroupRecord - extends TestCase -{ +public final class TestSeriesToChartGroupRecord extends TestCase { byte[] data = new byte[] { (byte)0x0, (byte)0x0 }; - public TestSeriesToChartGroupRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { SeriesToChartGroupRecord record = new SeriesToChartGroupRecord(new TestcaseRecordInputStream((short)0x1045, (short)data.length, data)); assertEquals( 0x0, record.getChartGroupIndex()); - assertEquals( 0x6, record.getRecordSize() ); - - record.validateSid((short)0x1045); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestSheetPropertiesRecord.java b/src/testcases/org/apache/poi/hssf/record/TestSheetPropertiesRecord.java index 9fd260c6a..932ff6eac 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestSheetPropertiesRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestSheetPropertiesRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,23 +28,14 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestSheetPropertiesRecord - extends TestCase -{ +public final class TestSheetPropertiesRecord extends TestCase { byte[] data = new byte[] { (byte)0x0A,(byte)0x00, (byte)0x00 //,(byte)0x00 // not sure where that last byte comes from }; - public TestSheetPropertiesRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { SheetPropertiesRecord record = new SheetPropertiesRecord(new TestcaseRecordInputStream((short)0x1044, (short)data.length, data)); assertEquals( 10, record.getFlags()); assertEquals( false, record.isChartTypeManuallyFormatted() ); @@ -59,8 +47,6 @@ public class TestSheetPropertiesRecord assertEquals( 7, record.getRecordSize() ); - - record.validateSid((short)0x1044); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestStringRecord.java b/src/testcases/org/apache/poi/hssf/record/TestStringRecord.java index b383c77e8..7f06c54ab 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestStringRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestStringRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -30,9 +27,7 @@ import junit.framework.TestCase; * * @author Glen Stampoultzis (glens at apache.org) */ -public class TestStringRecord - extends TestCase -{ +public class TestStringRecord extends TestCase { byte[] data = new byte[] { (byte)0x0B,(byte)0x00, // length (byte)0x00, // option @@ -40,21 +35,12 @@ public class TestStringRecord (byte)0x46,(byte)0x61,(byte)0x68,(byte)0x72,(byte)0x7A,(byte)0x65,(byte)0x75,(byte)0x67,(byte)0x74,(byte)0x79,(byte)0x70 }; - public TestStringRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { StringRecord record = new StringRecord(new TestcaseRecordInputStream((short)0x207, (short)data.length, data)); assertEquals( "Fahrzeugtyp", record.getString()); assertEquals( 18, record.getRecordSize() ); - - record.validateSid((short)0x207); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestSupBookRecord.java b/src/testcases/org/apache/poi/hssf/record/TestSupBookRecord.java index e2a61dde7..5506f6abd 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestSupBookRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestSupBookRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -49,11 +46,6 @@ public final class TestSupBookRecord extends TestCase { (byte)'S', (byte)'h', (byte)'e', (byte)'e', (byte)'t', (byte)'2', }; - public TestSupBookRecord(String name) - { - super(name); - } - /** * tests that we can load the record */ @@ -64,8 +56,6 @@ public final class TestSupBookRecord extends TestCase { assertEquals( 0x4, record.getNumberOfSheets() ); //expected # of sheets assertEquals( 8, record.getRecordSize() ); //sid+size+data - - record.validateSid((short)0x01AE); } /** * tests that we can load the record @@ -83,8 +73,6 @@ public final class TestSupBookRecord extends TestCase { assertEquals(2, sheetNames.length); assertEquals("Sheet1", sheetNames[0].getString()); assertEquals("Sheet2", sheetNames[1].getString()); - - record.validateSid((short)0x01AE); } /** @@ -96,7 +84,6 @@ public final class TestSupBookRecord extends TestCase { assertTrue( record.isAddInFunctions() ); //expected flag assertEquals( 0x1, record.getNumberOfSheets() ); //expected # of sheets assertEquals( 8, record.getRecordSize() ); //sid+size+data - record.validateSid((short)0x01AE); } /** @@ -119,10 +106,4 @@ public final class TestSupBookRecord extends TestCase { TestcaseRecordInputStream.confirmRecordEncoding(0x01AE, dataER, record.serialize()); } - - public static void main(String [] args) { - System.out - .println("Testing org.apache.poi.hssf.record.SupBookRecord"); - junit.textui.TestRunner.run(TestSupBookRecord.class); - } } diff --git a/src/testcases/org/apache/poi/hssf/record/TestTableRecord.java b/src/testcases/org/apache/poi/hssf/record/TestTableRecord.java index 0f562d145..19c91bbac 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestTableRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestTableRecord.java @@ -58,7 +58,6 @@ public final class TestTableRecord extends TestCase { assertEquals(0, record.getColInputCol()); assertEquals( 16 + 4, record.getRecordSize() ); - record.validateSid((short)0x236); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestTextObjectBaseRecord.java b/src/testcases/org/apache/poi/hssf/record/TestTextObjectBaseRecord.java index b7c6367cd..b9d80dbad 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestTextObjectBaseRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestTextObjectBaseRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,23 +28,14 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestTextObjectBaseRecord - extends TestCase -{ +public class TestTextObjectBaseRecord extends TestCase { byte[] data = new byte[] { 0x44, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, }; - public TestTextObjectBaseRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { TextObjectBaseRecord record = new TextObjectBaseRecord(new TestcaseRecordInputStream((short)0x1B6, (short)data.length, data)); @@ -68,8 +56,6 @@ public class TestTextObjectBaseRecord assertEquals( 22, record.getRecordSize() ); - - record.validateSid((short)0x1B6); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestTextObjectRecord.java b/src/testcases/org/apache/poi/hssf/record/TestTextObjectRecord.java index 8f16516ca..91458e9dd 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestTextObjectRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestTextObjectRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -18,11 +17,10 @@ package org.apache.poi.hssf.record; -import junit.framework.*; - -import java.util.Arrays; -import java.util.List; import java.io.ByteArrayInputStream; +import java.util.Arrays; + +import junit.framework.TestCase; import org.apache.poi.hssf.usermodel.HSSFRichTextString; @@ -32,7 +30,7 @@ import org.apache.poi.hssf.usermodel.HSSFRichTextString; * * @author Yegor Kozlov */ -public class TestTextObjectRecord extends TestCase { +public final class TestTextObjectRecord extends TestCase { byte[] data = {(byte)0xB6, 0x01, 0x12, 0x00, 0x12, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, @@ -42,17 +40,13 @@ public class TestTextObjectRecord extends TestCase { 0x00, 0x08, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - public void testRead() - throws Exception - { - + public void testRead() { RecordInputStream is = new RecordInputStream(new ByteArrayInputStream(data)); is.nextRecord(); TextObjectRecord record = new TextObjectRecord(is); assertEquals(TextObjectRecord.sid, record.getSid()); - record.validateSid(TextObjectRecord.sid); assertEquals(TextObjectRecord.HORIZONTAL_TEXT_ALIGNMENT_LEFT_ALIGNED, record.getHorizontalTextAlignment()); assertEquals(TextObjectRecord.VERTICAL_TEXT_ALIGNMENT_TOP, record.getVerticalTextAlignment()); assertEquals(TextObjectRecord.TEXT_ORIENTATION_NONE, record.getTextOrientation()); diff --git a/src/testcases/org/apache/poi/hssf/record/TestTextRecord.java b/src/testcases/org/apache/poi/hssf/record/TestTextRecord.java index 72f2dea8a..40e98dff9 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestTextRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestTextRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -30,9 +27,7 @@ import junit.framework.TestCase; * * @author Glen Stampoultzis (glens at apache.org) */ -public class TestTextRecord - extends TestCase -{ +public class TestTextRecord extends TestCase { byte[] data = new byte[] { (byte)0x02, // horiz align (byte)0x02, // vert align @@ -48,14 +43,7 @@ public class TestTextRecord (byte)0x00,(byte)0x00 // text rotation }; - public TestTextRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { TextRecord record = new TextRecord(new TestcaseRecordInputStream((short)0x1025, (short)data.length, data)); assertEquals( TextRecord.HORIZONTAL_ALIGNMENT_CENTER, record.getHorizontalAlignment()); @@ -87,9 +75,6 @@ public class TestTextRecord assertEquals( 36, record.getRecordSize() ); - - record.validateSid((short)0x1025); - } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestTickRecord.java b/src/testcases/org/apache/poi/hssf/record/TestTickRecord.java index e34feba4f..4f2d9efd3 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestTickRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestTickRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,9 +28,7 @@ import junit.framework.TestCase; * @author Andrew C. Oliver(acoliver at apache.org) */ -public class TestTickRecord - extends TestCase -{ +public final class TestTickRecord extends TestCase { byte[] data = new byte[] { (byte)0x02, (byte)0x00, (byte)0x03, (byte)0x01, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, @@ -44,14 +39,7 @@ public class TestTickRecord (byte)0x4D, (byte)0x00, (byte)0x00, (byte)0x00 }; - public TestTickRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { TickRecord record = new TickRecord(new TestcaseRecordInputStream((short)0x101e, (short)data.length, data)); assertEquals( (byte)2, record.getMajorTickType()); assertEquals( (byte)0, record.getMinorTickType()); @@ -70,8 +58,6 @@ public class TestTickRecord assertEquals( 34, record.getRecordSize() ); - - record.validateSid((short)0x101e); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestUnitsRecord.java b/src/testcases/org/apache/poi/hssf/record/TestUnitsRecord.java index bcf08ea54..c43828af4 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestUnitsRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestUnitsRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,29 +28,17 @@ import junit.framework.TestCase; * @author Glen Stampoultzis (glens at apache.org) */ -public class TestUnitsRecord - extends TestCase -{ +public final class TestUnitsRecord extends TestCase { byte[] data = new byte[] { (byte)0x00, (byte)0x00 }; - public TestUnitsRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { UnitsRecord record = new UnitsRecord(new TestcaseRecordInputStream((short)0x1001, (short)data.length, data)); assertEquals( 0, record.getUnits()); - assertEquals( 6, record.getRecordSize() ); - - record.validateSid((short)0x1001); } public void testStore() diff --git a/src/testcases/org/apache/poi/hssf/record/TestValueRangeRecord.java b/src/testcases/org/apache/poi/hssf/record/TestValueRangeRecord.java index ad84b7fcf..b974bf975 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestValueRangeRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestValueRangeRecord.java @@ -1,4 +1,3 @@ - /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - - package org.apache.poi.hssf.record; @@ -31,9 +28,7 @@ import junit.framework.TestCase; * * @author Glen Stampoultzis (glens at apache.org) */ -public class TestValueRangeRecord - extends TestCase -{ +public final class TestValueRangeRecord extends TestCase { byte[] data = new byte[] { (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, // min axis value (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, // max axis value @@ -43,14 +38,7 @@ public class TestValueRangeRecord (byte)0x1F,(byte)0x01 // options }; - public TestValueRangeRecord(String name) - { - super(name); - } - - public void testLoad() - throws Exception - { + public void testLoad() { ValueRangeRecord record = new ValueRangeRecord(new TestcaseRecordInputStream((short)0x101f, (short)data.length, data)); assertEquals( 0.0, record.getMinimumAxisValue(), 0.001); @@ -70,8 +58,6 @@ public class TestValueRangeRecord assertEquals( true, record.isReserved() ); assertEquals( 42+4, record.getRecordSize() ); - - record.validateSid((short)0x101f); } public void testStore()