Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-287

Optimize StringEscapeUtils.unescapeXml(String)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2
    • 2.3
    • None
    • None

    Description

      StringEscapeUtils.unescapeXml(String) (and other unescaes) works too slowly if String has nothing to unescape, that is very common situation.

      To make unescape faster, following check should be added to be start of Entities.unescape(str)

      if (str.indexOf('&') < 0)
      return str;

      Attachments

        Activity

          People

            Unassigned Unassigned
            yozh Stepan Koltsov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: