Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-3258

groovy.xml.QName uses string interning of volatile data and the trim antipattern

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6-rc-1
    • 2.1.0-rc-1
    • XML Processing
    • None

    Description

      1. String interning is a bad idea in most cases. QName calls intern on constants (what is a no-op), namespace URIs, local parts and prefixes This can easily eat up VM memory in sever applications.

      2. As long as QName is not a class that is responsible to clean up program input there should probably be no trim(). This holds even more since trim() will only clean up leading and trailing withespace bot neither non-URIc input nor input that does not conform to the NCName production.

      3. Please consider to remove prefix and it's semantics from groovy.xml.QName. Prefixes in QName classes have a long history of pain

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              veita Alexander Veit
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: