From ce5c607e2483c689b6d2bdf1fb58adac6e125274 Mon Sep 17 00:00:00 2001 From: Yegor Kozlov Date: Sun, 8 Aug 2010 08:04:28 +0000 Subject: [PATCH] optimized performance of HSSFCell#setHyperlink git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@983362 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/hssf/usermodel/HSSFCell.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java index c6f5a839d1..35d09c6b6d 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java @@ -1159,8 +1159,9 @@ public class HSSFCell implements Cell { break; } - int eofLoc = _sheet.getSheet().findFirstRecordLocBySid( EOFRecord.sid ); - _sheet.getSheet().getRecords().add( eofLoc, link.record ); + List records = _sheet.getSheet().getRecords(); + int eofLoc = records.size() - 1; + records.add( eofLoc, link.record ); } /** * Only valid for formula cells -- 2.39.5