pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1658179 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDPageLabels.java
Date Sun, 08 Feb 2015 14:45:25 GMT
Author: tilman
Date: Sun Feb  8 14:45:24 2015
New Revision: 1658179

URL: http://svn.apache.org/r1658179
Log:
PDFBOX-2676: throw IllegalArgumentException if startPage parameter is < 0

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDPageLabels.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDPageLabels.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDPageLabels.java?rev=1658179&r1=1658178&r2=1658179&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDPageLabels.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDPageLabels.java Sun
Feb  8 14:45:24 2015
@@ -160,9 +160,14 @@ public class PDPageLabels implements COS
      *            page label range.
      * @param item
      *            the page label item to set.
+     * @throws IllegalArgumentException if the startPage parameter is &lt; 0.
      */
     public void setLabelItem(int startPage, PDPageLabelRange item)
     {
+        if (startPage < 0)
+        {
+            throw new IllegalArgumentException("startPage parameter of setLabelItem may not
be < 0");
+        }
         labels.put(startPage, item);
     }
     



Mime
View raw message