pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1718012 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java
Date Fri, 04 Dec 2015 19:45:45 GMT
Author: tilman
Date: Fri Dec  4 19:45:45 2015
New Revision: 1718012

URL: http://svn.apache.org/viewvc?rev=1718012&view=rev
Log:
PDFBOX-2852: remove unneeded object, as suggested by Britt Fitch

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java?rev=1718012&r1=1718011&r2=1718012&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java Fri Dec
 4 19:45:45 2015
@@ -262,13 +262,11 @@ public class PDFTextStripper extends PDF
      */
     protected void processPages(PDPageTree pages) throws IOException
     {
-        PDPageTree pagesTree = document.getPages();
-
         PDPage startBookmarkPage = startBookmark == null ? null
                 : startBookmark.findDestinationPage(document);
         if (startBookmarkPage != null)
         {
-            startBookmarkPageNumber = pagesTree.indexOf(startBookmarkPage) + 1;
+            startBookmarkPageNumber = pages.indexOf(startBookmarkPage) + 1;
         }
         else
         {
@@ -280,7 +278,7 @@ public class PDFTextStripper extends PDF
                 : endBookmark.findDestinationPage(document);
         if (endBookmarkPage != null)
         {
-            endBookmarkPageNumber = pagesTree.indexOf(endBookmarkPage) + 1;
+            endBookmarkPageNumber = pages.indexOf(endBookmarkPage) + 1;
         }
         else
         {



Mime
View raw message