Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-28549

Use `text.StringEscapeUtils` instead `lang3.StringEscapeUtils`

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.0
    • Component/s: Build, Spark Core, SQL
    • Labels:
      None

      Description

      `org.apache.commons.lang3.StringEscapeUtils` is deprecated over two years ago at LANG-1316.

      /**
       * <p>Escapes and unescapes {@code String}s for
       * Java, Java Script, HTML and XML.</p>
       *
       * <p>#ThreadSafe#</p>
       * @since 2.0
       * @deprecated as of 3.6, use commons-text
       * <a href="https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/StringEscapeUtils.html">
       * StringEscapeUtils</a> instead
       */
      @Deprecated
      public class StringEscapeUtils {
      

      This issue aims to use the latest one from `commons-text` module which has more bug fixes like
      TEXT-100, TEXT-118 and TEXT-120.

      -import org.apache.commons.lang3.StringEscapeUtils
      +import org.apache.commons.text.StringEscapeUtils
      

      This will add a new dependency to `hadoop-2.7` profile distribution.

      +commons-text-1.6.jar
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dongjoon Dongjoon Hyun
                Reporter:
                dongjoon Dongjoon Hyun
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: