pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1861398 - in /pdfbox/branches/issue4569: pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java preflight/src/main/java/org/apache/pdfbox/preflight/process/BookmarkValidationProcess.java
Date Sat, 15 Jun 2019 14:34:24 GMT
Author: tilman
Date: Sat Jun 15 14:34:24 2019
New Revision: 1861398

URL: http://svn.apache.org/viewvc?rev=1861398&view=rev
Log:
PDFBOX-4071: SonarQube fix

Modified:
    pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java
    pdfbox/branches/issue4569/preflight/src/main/java/org/apache/pdfbox/preflight/process/BookmarkValidationProcess.java

Modified: pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java?rev=1861398&r1=1861397&r2=1861398&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java
(original)
+++ pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java
Sat Jun 15 14:34:24 2019
@@ -28,7 +28,6 @@ import org.apache.commons.logging.LogFac
 import org.apache.pdfbox.io.IOUtils;
 import org.apache.pdfbox.io.ScratchFile;
 import org.apache.pdfbox.pdfparser.COSParser;
-import org.apache.pdfbox.pdmodel.PDDocument;
 
 /**
  * This is the in-memory representation of the PDF document.  You need to call

Modified: pdfbox/branches/issue4569/preflight/src/main/java/org/apache/pdfbox/preflight/process/BookmarkValidationProcess.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/preflight/src/main/java/org/apache/pdfbox/preflight/process/BookmarkValidationProcess.java?rev=1861398&r1=1861397&r2=1861398&view=diff
==============================================================================
--- pdfbox/branches/issue4569/preflight/src/main/java/org/apache/pdfbox/preflight/process/BookmarkValidationProcess.java
(original)
+++ pdfbox/branches/issue4569/preflight/src/main/java/org/apache/pdfbox/preflight/process/BookmarkValidationProcess.java
Sat Jun 15 14:34:24 2019
@@ -70,7 +70,7 @@ public class BookmarkValidationProcess e
                     addValidationError(ctx, new ValidationError(ERROR_SYNTAX_TRAILER_OUTLINES_INVALID,
                             "Outline Hierarchy doesn't have Count entry"));
                 }
-                else if (isCountEntryPositive(ctx, dict)
+                else if (isCountEntryPositive(dict)
                         && (outlineHierarchy.getFirstChild() == null || outlineHierarchy.getLastChild()
== null))
                 {
                     addValidationError(ctx, new ValidationError(ERROR_SYNTAX_TRAILER_OUTLINES_INVALID,
@@ -106,7 +106,7 @@ public class BookmarkValidationProcess e
      * @param outline the dictionary representing the document outline.
      * @return true if the Count entry > 0.
      */
-    private boolean isCountEntryPositive(PreflightContext ctx, COSDictionary outline)
+    private boolean isCountEntryPositive(COSDictionary outline)
     {
         COSBase countBase = outline.getDictionaryObject(COSName.COUNT);
         return countBase instanceof COSInteger && ((COSInteger) countBase).intValue()
> 0;



Mime
View raw message