jaxb
  1. jaxb
  2. JAXB-909

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

    Details

    • Type: Bug Bug
    • Status: In Progress
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: runtime
    • Labels:
      None

      Description

      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.

        Activity

        Hide
        Iaroslav Savytskyi added a comment -

        Hi,

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

        Thanks.

        Show
        Iaroslav Savytskyi added a comment - Hi, Thank you for reporting. Can you please provide some small test to reproduce this bug. Thanks.

          People

          • Assignee:
            Iaroslav Savytskyi
            Reporter:
            dkulp
          • Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: