aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine
diff options
context:
space:
mode:
authorMatteo Mara <matteo.mara@sonarsource.com>2024-03-20 15:14:10 +0100
committersonartech <sonartech@sonarsource.com>2024-03-22 20:02:32 +0000
commit7f3f44f830868197b19cbd8a6e151cb7885d0213 (patch)
tree3780541b2c5540a086f3d11fa9cdd08e689457cd /sonar-scanner-engine
parent7d20b99c3cdb1a7c044b5ab51ddede8819e1305d (diff)
downloadsonarqube-7f3f44f830868197b19cbd8a6e151cb7885d0213.tar.gz
sonarqube-7f3f44f830868197b19cbd8a6e151cb7885d0213.zip
NO JIRA fix code smells after moving to lang3 library
Diffstat (limited to 'sonar-scanner-engine')
-rw-r--r--sonar-scanner-engine/build.gradle1
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/AbstractSettingsLoader.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AbstractExclusionFilters.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scm/git/NativeGitBlameCommand.java2
4 files changed, 4 insertions, 3 deletions
diff --git a/sonar-scanner-engine/build.gradle b/sonar-scanner-engine/build.gradle
index 40ff8e0a2ba..de8669b288d 100644
--- a/sonar-scanner-engine/build.gradle
+++ b/sonar-scanner-engine/build.gradle
@@ -21,6 +21,7 @@ dependencies {
api 'commons-codec:commons-codec'
api 'commons-io:commons-io'
api 'org.apache.commons:commons-lang3'
+ implementation 'org.apache.commons:commons-text'
api 'com.google.code.gson:gson'
api 'org.apache.commons:commons-csv'
api 'com.google.protobuf:protobuf-java'
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/AbstractSettingsLoader.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/AbstractSettingsLoader.java
index 9c17a76a8c2..6df3e293910 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/AbstractSettingsLoader.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/AbstractSettingsLoader.java
@@ -29,7 +29,7 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.Nullable;
-import org.apache.commons.lang3.StringEscapeUtils;
+import org.apache.commons.text.StringEscapeUtils;
import org.sonar.api.impl.utils.ScannerUtils;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AbstractExclusionFilters.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AbstractExclusionFilters.java
index 36840fb6ac8..235f297fc69 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AbstractExclusionFilters.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AbstractExclusionFilters.java
@@ -179,7 +179,7 @@ public abstract class AbstractExclusionFilters {
}
static PathPattern[] prepareMainExclusions(String[] sourceExclusions, String[] testInclusions) {
- String[] patterns = (String[]) ArrayUtils.addAll(
+ String[] patterns = ArrayUtils.addAll(
sourceExclusions, testInclusions);
return PathPattern.create(patterns);
}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scm/git/NativeGitBlameCommand.java b/sonar-scanner-engine/src/main/java/org/sonar/scm/git/NativeGitBlameCommand.java
index a4dede66e08..c219c831fa1 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scm/git/NativeGitBlameCommand.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scm/git/NativeGitBlameCommand.java
@@ -199,7 +199,7 @@ public class NativeGitBlameCommand {
private static String formatGitSemanticVersion(String version) {
return semanticVersionDelimiter
.splitAsStream(version)
- .takeWhile(NumberUtils::isNumber)
+ .takeWhile(NumberUtils::isCreatable)
.collect(Collectors.joining("."));
}