You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by le...@apache.org on 2017/08/06 14:32:19 UTC

svn commit: r1804237 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java

Author: lehmi
Date: Sun Aug  6 14:32:19 2017
New Revision: 1804237

URL: http://svn.apache.org/viewvc?rev=1804237&view=rev
Log:
PDFBOX-3888: removed unused parameter

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java?rev=1804237&r1=1804236&r2=1804237&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java Sun Aug  6 14:32:19 2017
@@ -1199,7 +1199,7 @@ public class COSParser extends BaseParse
             }
             else
             {
-                return calculateXRefFixedOffset(startXRefOffset, false);
+                return calculateXRefFixedOffset(startXRefOffset);
             }
         }
         // can't find a valid offset
@@ -1257,12 +1257,11 @@ public class COSParser extends BaseParse
      * Try to find a fixed offset for the given xref table/stream.
      * 
      * @param objectOffset the given offset where to look at
-     * @param streamsOnly search for xref streams only
      * @return the fixed offset
      * 
      * @throws IOException if something went wrong
      */
-    private long calculateXRefFixedOffset(long objectOffset, boolean streamsOnly) throws IOException
+    private long calculateXRefFixedOffset(long objectOffset) throws IOException
     {
         if (objectOffset < 0)
         {
@@ -1270,7 +1269,7 @@ public class COSParser extends BaseParse
             return 0;
         }
         // start a brute force search for all xref tables and try to find the offset we are looking for
-        long newOffset = bfSearchForXRef(objectOffset, streamsOnly);
+        long newOffset = bfSearchForXRef(objectOffset);
         if (newOffset > -1)
         {
             LOG.debug("Fixed reference for xref table/stream " + objectOffset + " -> " + newOffset);
@@ -1510,21 +1509,17 @@ public class COSParser extends BaseParse
     /**
      * Search for the offset of the given xref table/stream among those found by a brute force search.
      * 
-     * @param streamsOnly search for xref streams only
      * @return the offset of the xref entry
      * @throws IOException if something went wrong
      */
-    private long bfSearchForXRef(long xrefOffset, boolean streamsOnly) throws IOException
+    private long bfSearchForXRef(long xrefOffset) throws IOException
     {
         long newOffset = -1;
         long newOffsetTable = -1;
         long newOffsetStream = -1;
-        if (!streamsOnly)
-        {
-            bfSearchForXRefTables();
-        }
+        bfSearchForXRefTables();
         bfSearchForXRefStreams();
-        if (!streamsOnly && bfSearchXRefTablesOffsets != null)
+        if (bfSearchXRefTablesOffsets != null)
         {
             // TODO to be optimized, this won't work in every case
             newOffsetTable = searchNearestValue(bfSearchXRefTablesOffsets, xrefOffset);