(Sonar) Fix "String#replace
should be preferred to String#replaceAll
" (#1056)
Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
This commit is contained in:
parent
66d5f3e4b5
commit
5564f378e5
1 changed files with 1 additions and 1 deletions
|
@ -185,7 +185,7 @@ public class GeneralUtils {
|
|||
// Insert multiplication between a number and 'n' (e.g., "4n" becomes "4*n")
|
||||
String withMultiplication = expression.replaceAll("(\\d)n", "$1*n");
|
||||
// Now replace 'n' with its current value
|
||||
return withMultiplication.replaceAll("n", String.valueOf(nValue));
|
||||
return withMultiplication.replace("n", String.valueOf(nValue));
|
||||
}
|
||||
|
||||
private static List<Integer> handlePart(String part, int totalPages, int offset) {
|
||||
|
|
Loading…
Reference in a new issue