pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1862160 - /pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java
Date Wed, 26 Jun 2019 16:26:30 GMT
Author: tilman
Date: Wed Jun 26 16:26:30 2019
New Revision: 1862160

URL: http://svn.apache.org/viewvc?rev=1862160&view=rev
Log:
PDFBOX-4580: use IOException instead of IllegalArgumentException

Modified:
    pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java

Modified: pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java?rev=1862160&r1=1862159&r2=1862160&view=diff
==============================================================================
--- pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java
(original)
+++ pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java
Wed Jun 26 16:26:30 2019
@@ -311,7 +311,7 @@ public class GlyphSubstitutionTable exte
             return new LookupTypeSingleSubstFormat2(substFormat, coverageTable, substituteGlyphIDs);
         }
         default:
-            throw new IllegalArgumentException("Unknown substFormat: " + substFormat);
+            throw new IOException("Unknown substFormat: " + substFormat);
         }
     }
 
@@ -323,7 +323,7 @@ public class GlyphSubstitutionTable exte
 
         if (substFormat != 1)
         {
-            throw new IllegalArgumentException(
+            throw new IOException(
                     "The expected SubstFormat for LigatureSubstitutionTable is 1");
         }
 
@@ -341,7 +341,7 @@ public class GlyphSubstitutionTable exte
 
         if (ligSetCount != coverageTable.getSize())
         {
-            throw new IllegalArgumentException(
+            throw new IOException(
                     "According to the OpenTypeFont specifications, the coverage count should
be equal to the no. of LigatureSetTables");
         }
 
@@ -439,7 +439,7 @@ public class GlyphSubstitutionTable exte
         }
         default:
             // Should not happen (the spec indicates only format 1 and format 2)
-            throw new IllegalArgumentException("Unknown coverage format: " + coverageFormat);
+            throw new IOException("Unknown coverage format: " + coverageFormat);
         }
     }
 



Mime
View raw message