poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1187638 - /poi/trunk/src/java/org/apache/poi/hpsf/VariantBool.java
Date Sat, 22 Oct 2011 02:01:15 GMT
Author: sergey
Date: Sat Oct 22 02:01:14 2011
New Revision: 1187638

URL: http://svn.apache.org/viewvc?rev=1187638&view=rev
Log:
replace exception with warning

Modified:
    poi/trunk/src/java/org/apache/poi/hpsf/VariantBool.java

Modified: poi/trunk/src/java/org/apache/poi/hpsf/VariantBool.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/VariantBool.java?rev=1187638&r1=1187637&r2=1187638&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/VariantBool.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/VariantBool.java Sat Oct 22 02:01:14 2011
@@ -1,12 +1,15 @@
 package org.apache.poi.hpsf;
 
-import org.apache.poi.util.LittleEndian;
-
 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
 class VariantBool
 {
+    private final static POILogger logger = POILogFactory.getLogger( VariantBool.class );
+    
     static final int SIZE = 2;
 
     private boolean _value;
@@ -26,7 +29,18 @@ class VariantBool
             return;
         }
 
-        throw new IllegalPropertySetDataException( "VARIANT_BOOL value '"
-                + value + "' is incorrect" );
+        logger.log( POILogger.WARN, "VARIANT_BOOL value '",
+                Short.valueOf( value ), "' is incorrect" );
+        _value = value != 0;
+    }
+
+    boolean getValue()
+    {
+        return _value;
+    }
+
+    void setValue( boolean value )
+    {
+        this._value = value;
     }
 }



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


Mime
View raw message