You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by jo...@apache.org on 2008/10/28 00:44:44 UTC

svn commit: r708385 - /poi/trunk/src/java/org/apache/poi/hssf/record/RecordInputStream.java

Author: josh
Date: Mon Oct 27 16:44:44 2008
New Revision: 708385

URL: http://svn.apache.org/viewvc?rev=708385&view=rev
Log:
Small fix for bug in RecordInputStream.readAllContinuedRemainder()  introduced in r707778.  It seems like only BiffViewer was affected.

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

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/RecordInputStream.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/RecordInputStream.java?rev=708385&r1=708384&r2=708385&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/RecordInputStream.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/RecordInputStream.java Mon Oct 27 16:44:44 2008
@@ -355,14 +355,14 @@
     //growable array of the data.
     ByteArrayOutputStream out = new ByteArrayOutputStream(2*MAX_RECORD_DATA_SIZE);
 
-    while (isContinueNext()) {
+    while (true) {
       byte[] b = readRemainder();
       out.write(b, 0, b.length);
+      if (!isContinueNext()) {
+          break;
+      }
       nextRecord();
     }
-    byte[] b = readRemainder();
-    out.write(b, 0, b.length);
-
     return out.toByteArray();
   }
 



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