aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSayi <sayi@apache.org>2021-03-20 16:58:11 +0000
committerSayi <sayi@apache.org>2021-03-20 16:58:11 +0000
commit9618056f1d42e2d73a9813a6a13a4693d6ca4452 (patch)
tree0e01081e1409478a25f29bccfe7f093853e5115f /src
parent0efa53456a11291cc4bdd1d93f135bb065db61cd (diff)
downloadpoi-9618056f1d42e2d73a9813a6a13a4693d6ca4452.tar.gz
poi-9618056f1d42e2d73a9813a6a13a4693d6ca4452.zip
dispose cursor finally
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887868 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFAbstractFootnoteEndnote.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFAbstractFootnoteEndnote.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFAbstractFootnoteEndnote.java
index 6cdcbff8da..ff509ecdc2 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFAbstractFootnoteEndnote.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFAbstractFootnoteEndnote.java
@@ -28,7 +28,6 @@ import org.apache.xmlbeans.XmlObject;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdnRef;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP;
-import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTR;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSdtBlock;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl;
@@ -269,10 +268,9 @@ public abstract class XWPFAbstractFootnoteEndnote implements Iterable<XWPFParag
private boolean isCursorInFtn(XmlCursor cursor) {
XmlCursor verify = cursor.newCursor();
verify.toParent();
- if (verify.getObject() == this.ctFtnEdn) {
- return true;
- }
- return false;
+ boolean result = (verify.getObject() == this.ctFtnEdn);
+ verify.dispose();
+ return result;
}
/**