diff options
author | Jeremias Maerki <jeremias@apache.org> | 2006-10-11 14:40:34 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2006-10-11 14:40:34 +0000 |
commit | 66526aece168d5a0e2b5c45ca7e9e1dcce63e83d (patch) | |
tree | 56afb1972604de4fe658b39587a128085cdeaee4 /src/java/org/apache/fop/fo | |
parent | 459e89e3636ccfacfa71495870adda877475bf52 (diff) | |
download | xmlgraphics-fop-66526aece168d5a0e2b5c45ca7e9e1dcce63e83d.tar.gz xmlgraphics-fop-66526aece168d5a0e2b5c45ca7e9e1dcce63e83d.zip |
Fixed possible endless loop.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@462816 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo')
-rw-r--r-- | src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java b/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java index 3ca5f935f..d7200dc24 100644 --- a/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java +++ b/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java @@ -120,9 +120,9 @@ public class XMLWhiteSpaceHandler { currentBlock = (Block) fo; } else if (foId == Constants.FO_RETRIEVE_MARKER) { /* look for the nearest block ancestor, if any */ - FONode ancestor; + FONode ancestor = fo; do { - ancestor = fo.getParent(); + ancestor = ancestor.getParent(); } while (ancestor.getNameId() != Constants.FO_BLOCK && ancestor.getNameId() != Constants.FO_STATIC_CONTENT); @@ -188,9 +188,8 @@ public class XMLWhiteSpaceHandler { /* handle white-space for all pending inlines*/ PendingInline p; for (int i = pendingInlines.size(); --i >= 0;) { - p = (PendingInline) pendingInlines.get(i); - charIter = - (RecursiveCharIterator) p.firstTrailingWhiteSpace; + p = (PendingInline)pendingInlines.get(i); + charIter = (RecursiveCharIterator)p.firstTrailingWhiteSpace; handleWhiteSpace(); pendingInlines.remove(p); } |