[jira] [Closed] (FOP-3257) NullPointerException in FontFileFinder.find

"Joao Goncalves (Jira)" <[email protected]>
Newsgroups gmane.text.xml.fop.devel
Message-ID <[email protected]>
     [ https://issues.apache.org/jira/browse/FOP-3257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joao Goncalves closed FOP-3257.
-------------------------------
    Fix Version/s: main
       Resolution: Fixed

https://github.com/apache/xmlgraphics-fop/commit/df76c09b8849c1850230340dfd0fd122f60bd6aa

> NullPointerException in FontFileFinder.find
> -------------------------------------------
>
>                 Key: FOP-3257
>                 URL: https://issues.apache.org/jira/browse/FOP-3257
>             Project: FOP
>          Issue Type: Bug
>    Affects Versions: 2.11
>            Reporter: Stefan Ziegler
>            Assignee: Joao Goncalves
>            Priority: Major
>             Fix For: main
>
>
> In PDFDocumentGraphics2DConfigurator.createFontInfo the DefaultFontConfigurator is created with a null event listener. 
> Then in DefaultFontConfigurator.addDirectories the FontFileFinder is created with that null event listener. 
> Inside fontFileFinder.find the null event listener is used if the font directory is not found. 
>  
> {code:java}
> Cannot invoke "org.apache.fop.fonts.FontEventListener.fontDirectoryNotFound(Object, String)" because "this.eventListener" is null
>         at org.apache.fop.svg.PDFTranscoder.transcode(PDFTranscoder.java:136)
>         at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
>         at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:158)
>         at org.pdf24.svg2pdf.SVG2PDF.convert(SVG2PDF.java:133)
>         at org.pdf24.svg2pdf.SVG2PDF.main(SVG2PDF.java:83)
> Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.fop.fonts.FontEventListener.fontDirectoryNotFound(Object, String)" because "this.eventListener" is null
>         at org.apache.fop.fonts.autodetect.FontFileFinder.find(FontFileFinder.java:175)
>         at org.apache.fop.fonts.DefaultFontConfigurator.addDirectories(DefaultFontConfigurator.java:122)
>         at org.apache.fop.fonts.DefaultFontConfigurator.configure(DefaultFontConfigurator.java:86)
>         at org.apache.fop.svg.PDFDocumentGraphics2DConfigurator.createFontInfo(PDFDocumentGraphics2DConfigurator.java:103)
>         at org.apache.fop.svg.PDFDocumentGraphics2DConfigurator.configure(PDFDocumentGraphics2DConfigurator.java:69)
>         at org.apache.fop.svg.PDFTranscoder.transcode(PDFTranscoder.java:129)
>         ... 4 more{code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.