mirror of https://github.com/apache/poi.git
additional check for null arguments
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1163610 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
43e3ab672d
commit
62613ea8db
|
@ -540,11 +540,16 @@ public final class FileInformationBlock extends FIBAbstractType
|
||||||
*/
|
*/
|
||||||
public int getSubdocumentTextStreamLength( SubdocumentType type )
|
public int getSubdocumentTextStreamLength( SubdocumentType type )
|
||||||
{
|
{
|
||||||
|
if ( type == null )
|
||||||
|
throw new IllegalArgumentException( "argument 'type' is null" );
|
||||||
|
|
||||||
return _longHandler.getLong( type.getFibLongFieldIndex() );
|
return _longHandler.getLong( type.getFibLongFieldIndex() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSubdocumentTextStreamLength( SubdocumentType type, int length )
|
public void setSubdocumentTextStreamLength( SubdocumentType type, int length )
|
||||||
{
|
{
|
||||||
|
if ( type == null )
|
||||||
|
throw new IllegalArgumentException( "argument 'type' is null" );
|
||||||
if ( length < 0 )
|
if ( length < 0 )
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"Subdocument length can't be less than 0 (passed value is "
|
"Subdocument length can't be less than 0 (passed value is "
|
||||||
|
|
Loading…
Reference in New Issue