[LANG-1406] StringIndexOutOfBoundsException in
StringUtils.replaceIgnoreCase Fix dead store issue found by SpotBugs and enforce SpotBugs on CI builds.
This commit is contained in:
parent
651c8f5c23
commit
e7c6c5b66b
|
@ -32,4 +32,4 @@ jobs:
|
|||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
- name: Build with Maven
|
||||
run: mvn -V apache-rat:check javadoc:javadoc -Ddoclint=all package --file pom.xml
|
||||
run: mvn -V apache-rat:check spotbugs:check javadoc:javadoc -Ddoclint=all package --file pom.xml
|
||||
|
|
|
@ -32,4 +32,4 @@ script:
|
|||
- mvn
|
||||
|
||||
after_success:
|
||||
- mvn clean test jacoco:report coveralls:report -Ptravis-jacoco javadoc:javadoc -Ddoclint=all
|
||||
- mvn clean test spotbugs:check jacoco:report coveralls:report -Ptravis-jacoco javadoc:javadoc -Ddoclint=all
|
||||
|
|
|
@ -6363,9 +6363,7 @@ public class StringUtils {
|
|||
if (isEmpty(text) || isEmpty(searchString) || replacement == null || max == 0) {
|
||||
return text;
|
||||
}
|
||||
String searchText = text;
|
||||
if (ignoreCase) {
|
||||
searchText = text.toLowerCase();
|
||||
searchString = searchString.toLowerCase();
|
||||
}
|
||||
int start = 0;
|
||||
|
|
Loading…
Reference in New Issue