diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2013-11-05 13:15:21 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2013-11-05 13:15:21 +0000 |
commit | fa1cca233c52222efbfee2a8e406df7c70daa1ac (patch) | |
tree | d14596456e7c1d2637b4673562d9d807b30f6342 /src/java/org/apache/fop | |
parent | 14c8bbc13de922dbd253d5e18456f3059aed3575 (diff) | |
download | xmlgraphics-fop-fa1cca233c52222efbfee2a8e406df7c70daa1ac.tar.gz xmlgraphics-fop-fa1cca233c52222efbfee2a8e406df7c70daa1ac.zip |
Reverted changes to PDFStructureTreeBuilder from rev. 1537600
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1538984 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop')
-rw-r--r-- | src/java/org/apache/fop/render/pdf/PDFStructureTreeBuilder.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/java/org/apache/fop/render/pdf/PDFStructureTreeBuilder.java b/src/java/org/apache/fop/render/pdf/PDFStructureTreeBuilder.java index 3cc7a1017..985974b80 100644 --- a/src/java/org/apache/fop/render/pdf/PDFStructureTreeBuilder.java +++ b/src/java/org/apache/fop/render/pdf/PDFStructureTreeBuilder.java @@ -358,12 +358,8 @@ class PDFStructureTreeBuilder implements StructureTreeEventHandler { } public StructureTreeElement startNode(String name, Attributes attributes, StructureTreeElement parent) { - PDFStructElem parentElem; - if ((parent != null) && (parent instanceof PDFStructElem)) { - parentElem = (PDFStructElem) parent; - } else { - parentElem = ancestors.getFirst(); - } + assert parent == null || parent instanceof PDFStructElem; + PDFStructElem parentElem = parent == null ? ancestors.getFirst() : (PDFStructElem) parent; PDFStructElem structElem = createStructureElement(name, parentElem, attributes, pdfFactory, eventBroadcaster); ancestors.addFirst(structElem); |