From commits-return-13035-archive-asf-public=cust-asf.ponee.io@poi.apache.org Mon Jun 15 20:51:48 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 312FC180656 for ; Mon, 15 Jun 2020 22:51:48 +0200 (CEST) Received: (qmail 44709 invoked by uid 500); 15 Jun 2020 20:51:47 -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 44700 invoked by uid 99); 15 Jun 2020 20:51:47 -0000 Received: from Unknown (HELO svn01-us-east.apache.org) (13.90.137.153) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jun 2020 20:51:47 +0000 Received: from svn01-us-east.apache.org (svn01-us-east.apache.org [127.0.0.1]) by svn01-us-east.apache.org (ASF Mail Server at svn01-us-east.apache.org) with ESMTP id 5DCC817B503 for ; Mon, 15 Jun 2020 20:51:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1878870 - /poi/trunk/src/java/org/apache/poi/hssf/model/LinkTable.java Date: Mon, 15 Jun 2020 20:51:47 -0000 To: commits@poi.apache.org From: centic@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20200615205147.5DCC817B503@svn01-us-east.apache.org> Author: centic Date: Mon Jun 15 20:51:47 2020 New Revision: 1878870 URL: http://svn.apache.org/viewvc?rev=1878870&view=rev Log: Throw an exception with more information instead of an NPE This seems to be a corrupted document and shows up in regression tests and should at least be reported with some more information Modified: poi/trunk/src/java/org/apache/poi/hssf/model/LinkTable.java Modified: poi/trunk/src/java/org/apache/poi/hssf/model/LinkTable.java URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/model/LinkTable.java?rev=1878870&r1=1878869&r2=1878870&view=diff ============================================================================== --- poi/trunk/src/java/org/apache/poi/hssf/model/LinkTable.java (original) +++ poi/trunk/src/java/org/apache/poi/hssf/model/LinkTable.java Mon Jun 15 20:51:47 2020 @@ -513,6 +513,10 @@ final class LinkTable { if (thisWbIndex < 0) { throw new RuntimeException("Could not find 'internal references' EXTERNALBOOK"); } + if (_externSheetRecord == null) { + throw new RuntimeException("Did not have an external sheet record, having blocks: " + + _externalBookBlocks.length); + } //Trying to find reference to this sheet int i = _externSheetRecord.getRefIxForSheet(thisWbIndex, firstSheetIndex, lastSheetIndex); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org For additional commands, e-mail: commits-help@poi.apache.org