Hi Andreas,

Andreas Delmelle wrote:
> On 23 Jun 2009, at 17:50, vhennebert apache org wrote:
> 
>> Author: vhennebert
>> Date: Tue Jun 23 15:50:15 2009
>> New Revision: 787733
>>
>> URL: http://svn.apache.org/viewvc?rev=787733&view=rev
>> Log:
>> Code clean-up
>>
> <snip />
>> http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ChangingIPDHack/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java?rev=787733&r1=787732&r2=787733&view=diff
> <snip />
>> -            if (!(curLM instanceof WrapperLayoutManager)
>> -                && curLM instanceof InlineLevelLayoutManager) {
>> -                log.error("inline area not allowed under flow -
>> ignoring");
>> -                curLM.setFinished(true);
>> -                continue;
>> -            }
> 
> This may be too much cleanup. I'm not entirely certain, but the
> 'continue' statement is meant to prevent this condition from crashing
> FOP on something we can perfectly recover from... (IIRC, without this
> check, we would end up with a ClassCastException when adding the areas)
> 
> Admitted, this event would better be routed through the event mechanism,
> so users can decide for themselves. As long as that has not been done...
> 
> Maybe nothing, since the check will always return false (should be
> caught during FO tree validation, but then there's relaxed validation...).

o.a.fop.fo.pagination.Flow explicitly checks that every child element is
a block-level element, even in relaxed validation mode. Also, after
replacing the log with a ‘throw new IllegalStateException()’ the whole
test suite ran without any problem. So I considered it safe to remove.


> All the other changes receive my blessing! :-)

Thanks for double-checking!

Vincent

Reply via email to