You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2020/09/01 18:51:00 UTC
[jira] [Resolved] (PDFBOX-4947) UnsupportedOperationException when
using FontMapperImpl.addSubstitute()
[ https://issues.apache.org/jira/browse/PDFBOX-4947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tilman Hausherr resolved PDFBOX-4947.
-------------------------------------
Resolution: Fixed
Thanks for the suggestion!
> UnsupportedOperationException when using FontMapperImpl.addSubstitute()
> -----------------------------------------------------------------------
>
> Key: PDFBOX-4947
> URL: https://issues.apache.org/jira/browse/PDFBOX-4947
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 2.0.21
> Reporter: Lonzak
> Priority: Major
> Fix For: 3.0.0 PDFBox, 2.0.22
>
>
> I tried to add an additional substitue mapping however it throws an exception:
> {code:java}
> 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){code}
> => 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.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org