From 62613ea8db1562f687ede8cdd45127a67b2d60dd Mon Sep 17 00:00:00 2001 From: Sergey Vladimirov Date: Wed, 31 Aug 2011 12:59:46 +0000 Subject: [PATCH] additional check for null arguments git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1163610 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org/apache/poi/hwpf/model/FileInformationBlock.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java b/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java index b13da95222..c7692cc3ec 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java @@ -540,11 +540,16 @@ public final class FileInformationBlock extends FIBAbstractType */ public int getSubdocumentTextStreamLength( SubdocumentType type ) { + if ( type == null ) + throw new IllegalArgumentException( "argument 'type' is null" ); + return _longHandler.getLong( type.getFibLongFieldIndex() ); } public void setSubdocumentTextStreamLength( SubdocumentType type, int length ) { + if ( type == null ) + throw new IllegalArgumentException( "argument 'type' is null" ); if ( length < 0 ) throw new IllegalArgumentException( "Subdocument length can't be less than 0 (passed value is " -- 2.39.5