castor

XML unmarshalling validation does not always check required flag

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.5
  • Fix Version/s: 1.1.1
  • Component/s: XML
  • Labels:
    None
  • Environment:
    Java 1.4.2
  • Testcase included:
    yes
  • Number of attachments :
    3

Description

The required flag is not always checked during unmarshalling.

In particular this issue contains a test case that fails when an element with a missing requried attribute is contained with a list, and has at least one attribute present.

The attached patch (against HEAD) fixes the issue for me, but I haven't run the full test suite because there don't appear to be any instructions on how to do so.

Activity

Hide
Guy Coleman added a comment -

Test case that shows the bug

Show
Guy Coleman added a comment - Test case that shows the bug
Hide
Guy Coleman added a comment -

Patch that solves the issue for me.

Show
Guy Coleman added a comment - Patch that solves the issue for me.
Hide
Werner Guttmann added a comment -

http://castor.org/how-to-run-xml-ctf-suite.html should have the information required to run the CTF test suite. Looks like we have to cross-link things a bit more ....

Show
Werner Guttmann added a comment - http://castor.org/how-to-run-xml-ctf-suite.html should have the information required to run the CTF test suite. Looks like we have to cross-link things a bit more ....
Hide
Werner Guttmann added a comment -

fwiw, CTF runs fine ....

Show
Werner Guttmann added a comment - fwiw, CTF runs fine ....
Hide
Werner Guttmann added a comment -

Final patch for review (incl. new test cases for the CTF).

Show
Werner Guttmann added a comment - Final patch for review (incl. new test cases for the CTF).

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: