mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2024-11-13 03:00:10 +01:00
(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
@ -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 New Issue
Block a user