[ https://issues.apache.org/jira/browse/PDFBOX-4990?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tilman Hausherr resolved PDFBOX-4990. ------------------------------------- Assignee: Tilman Hausherr Resolution: Fixed > 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: 2.0.21, 3.0.0 PDFBox > Reporter: Ralf Hauser > Assignee: Tilman Hausherr > Priority: Minor > Fix For: 2.0.22, 3.0.0 PDFBox > > > ### 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: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org