replace exception with warning

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1187638 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sergey Vladimirov 2011-10-22 02:01:14 +00:00
parent 8d5369235d
commit 54525d661f

View File

@ -1,12 +1,15 @@
package org.apache.poi.hpsf; package org.apache.poi.hpsf;
import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.Internal; import org.apache.poi.util.Internal;
import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
@Internal @Internal
class VariantBool class VariantBool
{ {
private final static POILogger logger = POILogFactory.getLogger( VariantBool.class );
static final int SIZE = 2; static final int SIZE = 2;
private boolean _value; private boolean _value;
@ -26,7 +29,18 @@ class VariantBool
return; return;
} }
throw new IllegalPropertySetDataException( "VARIANT_BOOL value '" logger.log( POILogger.WARN, "VARIANT_BOOL value '",
+ value + "' is incorrect" ); Short.valueOf( value ), "' is incorrect" );
_value = value != 0;
}
boolean getValue()
{
return _value;
}
void setValue( boolean value )
{
this._value = value;
} }
} }