Skip to content

Commit 441c79e

Browse files
committed
Use existing class StringReplaceAllCall
1 parent b5b252b commit 441c79e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

java/ql/src/Performance/StringReplaceAllWithNonRegex.ql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111

1212
import java
1313

14-
from MethodCall replaceAllCall
14+
from StringReplaceAllCall replaceAllCall
1515
where
16-
replaceAllCall.getMethod().hasQualifiedName("java.lang", "String", "replaceAll") and
1716
//only contains characters that could be a simple string
1817
replaceAllCall.getArgument(0).(StringLiteral).getValue().regexpMatch("^[a-zA-Z0-9]+$")
1918
select replaceAllCall,

0 commit comments

Comments
 (0)