Skip to content

Commit

Permalink
Remove usage of org.apache.commons.lang3.StringEscapeUtils (#7787)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwren authored Nov 15, 2024
1 parent 9d8fc36 commit 9a6aff3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

/**
Expand Down
2 changes: 2 additions & 0 deletions tool/plugin/lib/lint.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ class LintCommand extends Command<int> {
'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.
Expand Down

0 comments on commit 9a6aff3

Please sign in to comment.