Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.21
-
None
-
None
Description
I tried to add an additional substitue mapping however it throws an exception:
java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:148) at java.util.AbstractList.add(AbstractList.java:108) at org.apache.pdfbox.pdmodel.font.FontMapperImpl.addSubstitute(FontMapperImpl.java:210)
=> Thus the addSubstitute() method is useless
The reason is that for instantiating the mapping only a skeleton list from "Arrays.asList()" is used. This list doesn't support many methods of List interface and throws the exception.
Solution:
Replace the " Arrays.asList()" with the real list like new ArrayList() or the like.