[
https://issues.apache.org/jira/browse/PDFBOX-4990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17216568#comment-17216568
]
ASF subversion and git services commented on PDFBOX-4990:
---------------------------------------------------------
Commit 1882641 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1882641 ]
PDFBOX-4990: tell what resource is missing, as suggested by Ralf Hauser
> say which resource not found when a font is missing
> ---------------------------------------------------
>
> Key: PDFBOX-4990
> URL: https://issues.apache.org/jira/browse/PDFBOX-4990
> Project: PDFBox
> Issue Type: Improvement
> Affects Versions: 3.0.0 PDFBox
> Reporter: Ralf Hauser
> Priority: Minor
>
> ### Eclipse Workspace Patch 1.0
> #P pdfbox
> Index:
> pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/Standard14Fonts.java
> ===================================================================
> --- pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/Standard14Fonts.java
> (revision 1882597)
> +++ pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/Standard14Fonts.java
> (working copy)
> @@ -117,10 +117,13 @@
> try (InputStream resourceAsStream =
> PDType1Font.class.getResourceAsStream(resourceName);
> InputStream afmStream = new BufferedInputStream(resourceAsStream))
> {
> + if (null == resourceAsStream) {
> + throw new IOException("resource '"+resourceName+"' not found");
> + }
> AFMParser parser = new AFMParser(afmStream);
> FontMetrics metric = parser.parse(true);
> FONTS.put(fontName, metric);
> - }
> + }
> }
>
> /**
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]