org.apache.common.lang3 StringEscapeUtils が廃止されたのはなぜですか? 質問する

org.apache.common.lang3 StringEscapeUtils が廃止されたのはなぜですか? 質問する

StringEscapeUtils が Apache Lang3 v3.7 から非推奨になった理由の説明は見つかりませんでした。

https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/StringEscapeUtils.html

HTMLのエスケープ/アンエスケープには何を使うべきでしょうか

ベストアンサー1

クラスはパッケージから移動されました

org.apache.commons です。 言語3

org.apache.commons です。文章

非推奨のライブラリは簡単に置き換えることができます。

build.gradle で:

implementation 'org.apache.commons:commons-text:1.11.0'

また、クラスでは、StringEscapeUtils正しいクラスをインポートしていることを確認してください。

import org.apache.commons.text.StringEscapeUtils;

現在最新バージョンは 1.11.0 ですが (最終確認日は 2024 年 2 月 20 日)、バージョンは Maven で確認できます。https://mvnrepository.com/artifact/org.apache.commons/commons-text

おすすめ記事