Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-717

Issue within BXMLSerializer preventing compatibility with other StAX implementation, particularly woodstox

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0
    • 2.0.1
    • core-beans
    • None
    • Woodstox 4.1.1 used as the StAX parser

    Description

      The behavior of the stream readers getNamespaceURI function for passing nulls appears to vary. The existing implementation breaks Woodstox when there is no attribute namespace. To fix, the following code from processAttributes in BXMLSerializer :

      String namespaceURI = xmlStreamReader.getAttributeNamespace;
      if (namespaceURI == null) {
      namespaceURI = xmlStreamReader.getNamespaceURI("");
      }

      was replaced with:

      String namespaceURI = xmlStreamReader.getAttributeNamespace;
      if (namespaceURI.isEmpty()) {
      namespaceURI = xmlStreamReader.getNamespaceURI();
      }

      The == null was replace with an isEmpty call (as this didn't function correctly with Woodstox) and the passing of "" was removed from the getNamespaceURI call.

      BXMLSerializer with these changes now functions with Woodstox and also functions as expected with the default parser.

      Attachments

        Activity

          People

            smartini Sandro Martini
            quelessquest Lawrence Barry
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified