You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Attila Soki (Jira)" <ji...@apache.org> on 2020/06/10 23:49:00 UTC
[jira] [Created] (FOP-2943) NPE when fo:block contains inline and
charater tags and character is a white space
Attila Soki created FOP-2943:
--------------------------------
Summary: NPE when fo:block contains inline and charater tags and character is a white space
Key: FOP-2943
URL: https://issues.apache.org/jira/browse/FOP-2943
Project: FOP
Issue Type: Bug
Components: fo/block
Affects Versions: 2.5
Environment: debian buster
Reporter: Attila Soki
Attachments: fop-block-npe.fo
The above block causes NullPointerException when written as shown, without white spaces between the tags:
{{<fo:block><fo:inline>block1</fo:inline><fo:character character=" "/></fo:block>}}
adding a space between <fo:charater.. /> and </fo:block> solves the problem (see testcase: fop-block-npe.fo)
{{<fo:block><fo:inline>block2</fo:inline><fo:character character=" "/> </fo:block>}}
{{a non white space fo:character solves the problem too}}
{{<fo:block><fo:inline>block3</fo:inline><fo:character character="-"/></fo:block>}}
{{could be related to FOP-2147}}
The exception:
java.lang.Exception: Invoke failed: [[o:TransformerIdentityImpl]]->;transform((i:Source)[o:StreamSource], (i:Result)[o:SAXResult]). Cause: java.lang.NullPointerException VM: 1.7.0_45@[http://java.oracle.com/]" at:
#-33 org.apache.fop.fo.FObj.removeChild(FObj.java:317)
#-32 org.apache.fop.fo.FObjMixed.removeChild(FObjMixed.java:187)
#-31 org.apache.fop.fo.flow.Character$FOCharIterator.remove(Character.java:275)
#-30 org.apache.fop.fo.RecursiveCharIterator.remove(RecursiveCharIterator.java:141)
#-29 org.apache.fop.fo.XMLWhiteSpaceHandler.handleWhiteSpace(XMLWhiteSpaceHandler.java:321)
#-28 org.apache.fop.fo.XMLWhiteSpaceHandler.handleWhiteSpace(XMLWhiteSpaceHandler.java:209)
#-27 org.apache.fop.fo.FObjMixed.handleWhiteSpaceFor(FObjMixed.java:100)
#-26 org.apache.fop.fo.FObjMixed.finalizeNode(FObjMixed.java:200)
#-25 org.apache.fop.fo.FONode.endOfNode(FONode.java:350)
#-24 org.apache.fop.fo.FObj.endOfNode(FObj.java:222)
#-23 org.apache.fop.fo.FObjMixed.endOfNode(FObjMixed.java:81)
With FOP version 0.94 works.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)