#34 Rule.getInstance(Node) chokes on empty description

open
nobody
None
5
2008-08-03
2008-08-03
No

The parser throws a NullPointerException on the following input:

<Rule RuleId="id" Effect="Permit"><Description/></Rule>

The reason is that the Description node doesn't have children.

I have a fix available.

Discussion

  • Farrukh Najmi

    Farrukh Najmi - 2010-04-08

    Can you please post the fix as a patch diff file. Thanks.

     
  • Roland Illig

    Roland Illig - 2010-04-10

    I don't remember the fix anymore, it's been too long ago. I think I wrote a function getText(Element), which extracts the text contents of a DOM Element.

    But since the XML parsing code will go away pretty quickly and soon (I hope), I don't think this patch will be necessary.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks