pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1658180 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDPageLabels.java
Date Sun, 08 Feb 2015 14:46:31 GMT
Author: tilman
Date: Sun Feb  8 14:46:30 2015
New Revision: 1658180

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

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

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDPageLabels.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDPageLabels.java?rev=1658180&r1=1658179&r2=1658180&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDPageLabels.java
(original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDPageLabels.java
Sun Feb  8 14:46:30 2015
@@ -161,9 +161,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