poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From max...@apache.org
Subject svn commit: r1170166 - /poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java
Date Tue, 13 Sep 2011 13:08:42 GMT
Author: maxcom
Date: Tue Sep 13 13:08:42 2011
New Revision: 1170166

URL: http://svn.apache.org/viewvc?rev=1170166&view=rev
Log:
XLS: HyperlinkRecord: remove check for value in usKeyValue field because some (correct) files
has unexpected value there

Modified:
    poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java?rev=1170166&r1=1170165&r2=1170166&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java Tue Sep 13 13:08:42
2011
@@ -501,10 +501,9 @@ public final class HyperlinkRecord exten
                     int charDataSize = in.readInt();
 
                     //From the spec: An optional unsigned integer that MUST be 3 if present
-                    int optFlags = in.readUShort();
-                    if (optFlags != 0x0003) {
-                        throw new RecordFormatException("Expected 0x3 but found " + optFlags);
-                    }
+                    // but some files has 4
+                    int usKeyValue = in.readUShort();
+
                     _address = StringUtil.readUnicodeLE(in, charDataSize/2);
                 } else {
                     _address = null;



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


Mime
View raw message