You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by se...@apache.org on 2011/08/31 14:59:46 UTC

svn commit: r1163610 - /poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java

Author: sergey
Date: Wed Aug 31 12:59:46 2011
New Revision: 1163610

URL: http://svn.apache.org/viewvc?rev=1163610&view=rev
Log:
additional check for null arguments

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java?rev=1163610&r1=1163609&r2=1163610&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java Wed Aug 31 12:59:46 2011
@@ -540,11 +540,16 @@ public final class FileInformationBlock 
      */
     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 "



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org