diff --git a/flutter-idea/src/io/flutter/run/common/CommonTestConfigUtils.java b/flutter-idea/src/io/flutter/run/common/CommonTestConfigUtils.java index ee79446e1..6e991c0b9 100644 --- a/flutter-idea/src/io/flutter/run/common/CommonTestConfigUtils.java +++ b/flutter-idea/src/io/flutter/run/common/CommonTestConfigUtils.java @@ -23,7 +23,6 @@ import io.flutter.editor.ActiveEditorsOutlineService; import java.util.HashMap; import java.util.Map; -import org.apache.commons.lang3.StringEscapeUtils; import org.dartlang.analysis.server.protocol.ElementKind; import org.dartlang.analysis.server.protocol.FlutterOutline; import org.jetbrains.annotations.NotNull; @@ -135,7 +134,7 @@ public String findTestName(@Nullable PsiElement elt) { final String name = DartSyntax.unquote(lit); if (name == null) return null; - return StringEscapeUtils.unescapeJava(name); + return StringUtil.escapeProperty(name, false); } /** diff --git a/tool/plugin/lib/lint.dart b/tool/plugin/lib/lint.dart index 6b7637d17..fc27c706a 100644 --- a/tool/plugin/lib/lint.dart +++ b/tool/plugin/lib/lint.dart @@ -95,6 +95,8 @@ class LintCommand extends Command { 'org.apache.commons.lang.StringEscapeUtils', // https://github.com/dart-lang/sdk/issues/39377 'org.apache.commons.lang3.StringUtils', + // org.apache.commons.lang3.StringEscapeUtils is deprecated + 'org.apache.commons.lang3.StringEscapeUtils', // Not technically a bad import, but not all IntelliJ platforms provide // this library.