Return-Path: Delivered-To: apmail-poi-commits-archive@locus.apache.org Received: (qmail 971 invoked from network); 1 Apr 2008 23:54:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Apr 2008 23:54:19 -0000 Received: (qmail 64640 invoked by uid 500); 1 Apr 2008 23:54:19 -0000 Delivered-To: apmail-poi-commits-archive@poi.apache.org Received: (qmail 64599 invoked by uid 500); 1 Apr 2008 23:54:19 -0000 Mailing-List: contact commits-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@poi.apache.org Delivered-To: mailing list commits@poi.apache.org Received: (qmail 64590 invoked by uid 99); 1 Apr 2008 23:54:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Apr 2008 16:54:19 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Apr 2008 23:53:35 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CE7141A9832; Tue, 1 Apr 2008 16:53:54 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r643654 - /poi/trunk/src/java/org/apache/poi/hssf/record/DVRecord.java Date: Tue, 01 Apr 2008 23:53:54 -0000 To: commits@poi.apache.org From: josh@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080401235354.CE7141A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: josh Date: Tue Apr 1 16:53:51 2008 New Revision: 643654 URL: http://svn.apache.org/viewvc?rev=643654&view=rev Log: fix for bug 44710 - Incorrect skip() of second formula in DATAVALIDATION record Modified: poi/trunk/src/java/org/apache/poi/hssf/record/DVRecord.java Modified: poi/trunk/src/java/org/apache/poi/hssf/record/DVRecord.java URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/DVRecord.java?rev=643654&r1=643653&r2=643654&view=diff ============================================================================== --- poi/trunk/src/java/org/apache/poi/hssf/record/DVRecord.java (original) +++ poi/trunk/src/java/org/apache/poi/hssf/record/DVRecord.java Tue Apr 1 16:53:51 2008 @@ -28,7 +28,7 @@ import org.apache.poi.util.StringUtil; /** - * Title: DV Record

+ * Title: DATAVALIDATION Record (0x01BE)

* Description: This record stores data validation settings and a list of cell ranges * which contain these settings. The data validation settings of a sheet * are stored in a sequential list of DV records. This list is followed by @@ -36,7 +36,7 @@ * @author Dragos Buleandra (dragos.buleandra@trade2b.ro) * @version 2.0-pre */ -public class DVRecord extends Record +public final class DVRecord extends Record { public final static short sid = 0x01BE; @@ -170,11 +170,6 @@ this.field_not_used_1 = in.readShort(); //read first formula data condition - // Not sure if this was needed or not... -// try { -// in.skip(this.field_size_first_formula); -// } catch(IOException e) { throw new IllegalStateException(e); } - int token_pos = 0; while (token_pos < this.field_size_first_formula) { @@ -187,14 +182,14 @@ this.field_not_used_2 = in.readShort(); //read sec formula data condition - //Not sure if this was needed or not... - try { - in.skip(this.field_size_sec_formula); - } catch(IOException e) { - e.printStackTrace(); - throw new IllegalStateException(e.getMessage()); + if (false) { // TODO - prior to bug 44710 this 'skip' was being executed. write a junit to confirm this fix + try { + in.skip(this.field_size_sec_formula); + } catch(IOException e) { + e.printStackTrace(); + throw new IllegalStateException(e.getMessage()); + } } - token_pos = 0; while (token_pos < this.field_size_sec_formula) { @@ -516,7 +511,7 @@ /**@todo DVRecord = Serializare */ - private class StringHandler + private static final class StringHandler { private int _string_length = 0x0001; private byte _string_unicode_flag = 0x00; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org For additional commands, e-mail: commits-help@poi.apache.org