Return-Path: X-Original-To: apmail-poi-dev-archive@www.apache.org Delivered-To: apmail-poi-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 528731135F for ; Thu, 5 Jun 2014 01:58:52 +0000 (UTC) Received: (qmail 771 invoked by uid 500); 5 Jun 2014 01:58:52 -0000 Delivered-To: apmail-poi-dev-archive@poi.apache.org Received: (qmail 726 invoked by uid 500); 5 Jun 2014 01:58:52 -0000 Mailing-List: contact dev-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Developers List" Delivered-To: mailing list dev@poi.apache.org Received: (qmail 716 invoked by uid 99); 5 Jun 2014 01:58:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jun 2014 01:58:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jun 2014 01:58:51 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id 2579D1C6CD; Thu, 5 Jun 2014 01:58:31 +0000 (UTC) From: bugzilla@apache.org To: dev@poi.apache.org Subject: [Bug 56017] Shifting rows with comment result - Unreadable content error and comment deletion Date: Thu, 05 Jun 2014 01:58:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: POI X-Bugzilla-Component: XSSF X-Bugzilla-Version: 3.10 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: danielyoung.private@gmail.com X-Bugzilla-Status: NEEDINFO X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@poi.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=56017 --- Comment #6 from happyhuman --- In: org.apache.poi.xssf.usermodel.XSSFSheet I believe line: 2451 if(rownum < startRow || rownum > endRow) continue; Should be above: 2439 if(sheetComments != null){ The exception I was getting started here: 2445 ref = new CellReference(rownum + n, ref.getCol()); Looks as though it's trying to update the comments table with the new cell references after the rows are shifted, but the iterator is over all rows and the check for the shifted range is after this block. Therefore, an attempt could be made for a negative row value. I would assume if you do not get an exception the workbook may corrupt. Fixed the issue for me anyway and hope it helps. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org For additional commands, e-mail: dev-help@poi.apache.org