Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-1010

XmlModuleDescriptorUpdater is a mess that produces broken xmls in many cases

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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).

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: