State of the JAXB parsing
adrian.brock Mar 6, 2008 1:16 PMI've managed to get the testsuite down to 1 error and 54 failures
with the new parser.
The tests failing fall into the following categories:
* Attributes on the wrapped objects, which is a known issue with the way I implemented
this in JBossXB - http://www.jboss.com/index.html?module=bb&op=viewtopic&t=131304
* Two issues with with the cardinality tests which I haven't figured out
CardinalityCallbackTestCase and BadCardinalityCallbackTestCase
all the other problems in this part of the testsuite were caused by
initialization code only being the old xml parsing layer (see other threads),
so I guess this is similar but I can't spot what it is? ;-)
* Old xml parsing tests failing because they are expecting the wrong
GenericBeanMetaDataFactory class
* Old xml parsing tests where validation was in the xml parsing layer.
These checks need moving to the initialVisit() of the relevant metadata
e.g. This code in ValueFactoryHandler should be in
AbstractValueFactoryMetaData::initialVisit()
public Object endElement(Object o, QName qName, ElementBinding element) { AbstractValueFactoryMetaData vf = (AbstractValueFactoryMetaData)o; if (vf.getUnderlyingValue() == null || vf.getMethod() == null) throw new IllegalArgumentException("Bean or method cannot null: " + vf); if (vf.getParameter() != null && vf.getParameters() != null) throw new IllegalArgumentException("Both parameter and parameters cannot be set: " + vf);
* Related to the previous point, its actually pointless to test the parsing
layer throws these errors since we don't actually install the metadata
where the initial visit and other initialization occurs where this validation
can be properly performed.
* AliasMetaData - there's no support for this at all in the new xml parsing
and the way it is done in the old version is wrong (I didn't think this
was useful anyway so it could just be dropped?).
The reason it is wrong, is because it is trying to use the classloader
(well actually it is not but it should be if it means anything)
and replace properties in the parsing stage rather than the more
relevant initialVisit() stage.
* policy metadata - I think Ales is working on this? Although this isn't high
priority since nobody is using it at the moment.