Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-500

In org.apache.xmlbeans.impl.store.Saver.java constructor prefix and uri added to map in reverse

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: Version 2.6
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      Happens when XmlOptions.SAVE_IMPLICIT_NAMESPACES is set.

      Description

      On lines 98 and 99 of Saver.java the prefix and uri fields are reversed when calling the addMapping method. This causes namespaces to not be set as requested because _uriMap and _prefixMap lookups don't work correctly.
      Original code is:
      String prefix = (String) i.next();
      addMapping( prefix, (String) m.get( prefix ) );

      Suggested code is:
      String uri = (String) i.next();
      addMapping( (String) m.get( uri ), uri);

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              simcfarl Scott McFarlane
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: