pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1686488 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/Operator.java
Date Fri, 19 Jun 2015 19:31:20 GMT
Author: tilman
Date: Fri Jun 19 19:31:19 2015
New Revision: 1686488

URL: http://svn.apache.org/r1686488
Log:
PDFBOX-2576: Don't throw raw exception type

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/Operator.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/Operator.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/Operator.java?rev=1686488&r1=1686487&r2=1686488&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/Operator.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/Operator.java
Fri Jun 19 19:31:19 2015
@@ -39,13 +39,14 @@ public final class Operator
      * Constructor.
      *
      * @param aOperator The operator that this object will represent.
+     * @throws IllegalArgumentException if the operator starts with "/".
      */
     private Operator(String aOperator)
     {
         theOperator = aOperator;
         if( aOperator.startsWith( "/" ) )
         {
-            throw new RuntimeException( "Operators are not allowed to start with / '" + aOperator
+ "'" );
+            throw new IllegalArgumentException( "Operators are not allowed to start with
/ '" + aOperator + "'" );
         }
     }
 



Mime
View raw message