Author: fanningpj
Date: Sat Nov 20 16:16:06 2021
New Revision: 1895209
URL: http://svn.apache.org/viewvc?rev=1895209&view=rev
Log:
reduce use of comment iterator
Modified:
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
Modified:
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
URL:
http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java?rev=1895209&r1=1895208&r2=1895209&view=diff
==============================================================================
---
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
(original)
+++
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
Sat Nov 20 16:16:06 2021
@@ -3051,10 +3051,9 @@ public class XSSFSheet extends POIXMLDoc
// also remove any comments associated with this row
if (sheetComments != null) {
- Iterator<XSSFComment> commentIterator =
sheetComments.commentIterator(this);
- while (commentIterator.hasNext()) {
- XSSFComment comment = commentIterator.next();
- CellAddress ref = comment.getAddress();
+ Iterator<CellAddress> commentAddressIterator =
sheetComments.getCellAddresses();
+ while (commentAddressIterator.hasNext()) {
+ CellAddress ref = commentAddressIterator.next();
// is this comment part of the current row?
if(rowsToRemoveSet.contains(ref.getRow())) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]