You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2019/06/26 16:26:15 UTC

svn commit: r1862157 - /pdfbox/branches/issue4569/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java

Author: tilman
Date: Wed Jun 26 16:26:15 2019
New Revision: 1862157

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

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

Modified: pdfbox/branches/issue4569/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java?rev=1862157&r1=1862156&r2=1862157&view=diff
==============================================================================
--- pdfbox/branches/issue4569/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java (original)
+++ pdfbox/branches/issue4569/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java Wed Jun 26 16:26:15 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);
         }
     }