Issue Details (XML | Word | Printable)

Key: JAXB-909
Type: Bug Bug
Status: In Progress In Progress
Priority: Major Major
Assignee: Iaroslav Savytskyi
Reporter: dkulp
Votes: 3
Watchers: 1

If you were logged in you would be able to see more operations.

Unmarshalling objects that use a DOM element, various whitespace texts are ignored.

Created: 13/Jul/12 05:11 PM   Updated: 24/Jan/13 01:47 PM
Component/s: runtime
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Tags: metro2_2_1-waived
Participants: dkulp and Iaroslav Savytskyi

 Description  « Hide

This occurs in both SAXConnector and in StAXStreamConnector.

In SAXConnector, there is code to determine if the text is ignoreable via:

StructureLoader sl;
        // not null only if element content is processed (StructureLoader is used)
        // ugly
        if((sl = this.context.getStructureLoader()) != null) {
            ignorable = ((ClassBeanInfoImpl)sl.getBeanInfo()).hasElementOnlyContentModel();

however, that does NOT take into account that if the context has a DomLoader, the text should also not be ignorable.

StAXStreamConnector blindly calls processText(true); in start element without ANY attempt to determine if the "true" flag should not be true. It should also check for usage of DomLoader in context.current.loader.

Iaroslav Savytskyi added a comment - 24/Jan/13 01:47 PM


Thank you for reporting. Can you please provide some small test to reproduce this bug.