Ivy
  1. Ivy
  2. IVY-1010

XmlModuleDescriptorUpdater is a mess that produces broken xmls in many cases

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-RC2
    • Fix Version/s: 2.3.0-RC1
    • Component/s: Core
    • Labels:
      None

      Description

      There are many severe issues with charsets and xml processing in general in XmlModuleDescriptorUpdater#copyHeader() and the rest of XmlModuleDescriptorUpdater.
      Namely, you 1) don't check for byte-order mark presence, 2) don't perform the XML encoding guessing as per XML spec, 3) open ivy.xml in platform-default encoding, 4) write your own XML serializer that doesn't even do output escaping for character data.
      I recommend you to send one of your programmers to an XML 101 course and rewrite this mess using standard XML apis, such as DOM or StAX.

      To reproduce parts 1)-3), try resolving and publishing a module with ivy.xml in UTF-16LE (with BOM).

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        702d 26m 1 Maarten Coene 23/Dec/10 20:53
        Maarten Coene made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Maarten Coene [ maartenc ]
        Fix Version/s trunk [ 12313426 ]
        Resolution Fixed [ 1 ]
        Hide
        Maarten Coene added a comment -

        Should be fixed now in SVN trunk.
        Please give it a try if possible.

        thanks,
        Maarten

        Show
        Maarten Coene added a comment - Should be fixed now in SVN trunk. Please give it a try if possible. thanks, Maarten
        Alexey Ermakov made changes -
        Field Original Value New Value
        Description There are many severe issues with charsets and xml processing in general in XmlModuleDescriptorUpdater#copyHeader() and the rest of XmlModuleDescriptorUpdater.
        Namely, you 1) don't check for byte-order mark presence, 2) don't perform the XML encoding guessing processed as per XML spec, 3) open ivy.xml in platform-default encoding, 4) write your own XML serializer that doesn't even do output escaping for character data.
        I recommend you to send one of your programmers to an XML 101 course and rewrite this mess using standard XML apis, such as DOM or StAX.

        To reproduce parts 1)-3), try resolving and publishing a module with ivy.xml in UTF-16LE (with BOM).
        There are many severe issues with charsets and xml processing in general in XmlModuleDescriptorUpdater#copyHeader() and the rest of XmlModuleDescriptorUpdater.
        Namely, you 1) don't check for byte-order mark presence, 2) don't perform the XML encoding guessing as per XML spec, 3) open ivy.xml in platform-default encoding, 4) write your own XML serializer that doesn't even do output escaping for character data.
        I recommend you to send one of your programmers to an XML 101 course and rewrite this mess using standard XML apis, such as DOM or StAX.

        To reproduce parts 1)-3), try resolving and publishing a module with ivy.xml in UTF-16LE (with BOM).
        Alexey Ermakov created issue -

          People

          • Assignee:
            Maarten Coene
            Reporter:
            Alexey Ermakov
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development