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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • Build, Spark Core, SQL
    • 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

              dongjoon Dongjoon Hyun
              dongjoon Dongjoon Hyun
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: