diff options
author | Matteo Mara <matteo.mara@sonarsource.com> | 2024-03-08 18:08:49 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-03-16 20:02:46 +0000 |
commit | 4592d635902de23b402a28787a8468ba1ac3a3a4 (patch) | |
tree | 2561ce21fbcd2fb14f77daa1e28f32b815291f1e /sonar-scanner-engine/src/main/java/org/sonar/scanner | |
parent | 4f2cb04c5da8b5b07c459afdb6d777b29db779b5 (diff) | |
download | sonarqube-4592d635902de23b402a28787a8468ba1ac3a3a4.tar.gz sonarqube-4592d635902de23b402a28787a8468ba1ac3a3a4.zip |
SONAR-21452 move from commons-lang:commons-lang to org.apache.commons:commons-lang3
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org/sonar/scanner')
41 files changed, 79 insertions, 79 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ProjectInfo.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ProjectInfo.java index 9480c66e468..788d8661eab 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ProjectInfo.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ProjectInfo.java @@ -23,7 +23,7 @@ import java.time.Clock; import java.util.Date; import java.util.Optional; import java.util.function.Predicate; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.sonar.api.CoreProperties; import org.sonar.api.Startable; import org.sonar.api.config.Configuration; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/AbstractExtensionDictionary.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/AbstractExtensionDictionary.java index fd69f0413f5..eeb4f04ac9d 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/AbstractExtensionDictionary.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/AbstractExtensionDictionary.java @@ -28,7 +28,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; import javax.annotation.Nullable; -import org.apache.commons.lang.ClassUtils; +import org.apache.commons.lang3.ClassUtils; import org.sonar.api.batch.DependedUpon; import org.sonar.api.batch.DependsUpon; import org.sonar.api.batch.Phase; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/DefaultScannerWsClient.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/DefaultScannerWsClient.java index 7c536195a8c..1d192ad9584 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/DefaultScannerWsClient.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/DefaultScannerWsClient.java @@ -32,7 +32,7 @@ import java.util.List; import java.util.Map; import java.util.Set; import javax.annotation.CheckForNull; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.sonar.api.CoreProperties; import org.sonar.api.notifications.AnalysisWarnings; import org.sonar.api.utils.MessageException; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalTempFolderProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalTempFolderProvider.java index c864911e182..821529b3d60 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalTempFolderProvider.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalTempFolderProvider.java @@ -19,16 +19,6 @@ */ package org.sonar.scanner.bootstrap; -import org.apache.commons.lang.StringUtils; -import org.sonar.api.CoreProperties; -import org.sonar.api.impl.utils.DefaultTempFolder; -import org.sonar.api.utils.System2; -import org.sonar.api.utils.TempFolder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import static org.sonar.core.util.FileUtils.deleteQuietly; -import org.springframework.context.annotation.Bean; - import java.io.IOException; import java.nio.file.DirectoryStream; import java.nio.file.Files; @@ -36,6 +26,16 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.attribute.BasicFileAttributes; import java.util.concurrent.TimeUnit; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.sonar.api.CoreProperties; +import org.sonar.api.impl.utils.DefaultTempFolder; +import org.sonar.api.utils.System2; +import org.sonar.api.utils.TempFolder; +import org.springframework.context.annotation.Bean; + +import static org.sonar.core.util.FileUtils.deleteQuietly; public class GlobalTempFolderProvider { private static final Logger LOG = LoggerFactory.getLogger(GlobalTempFolderProvider.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClientProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClientProvider.java index 7ae7dad9aa6..9d1dfe6fa0e 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClientProvider.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClientProvider.java @@ -29,7 +29,7 @@ import org.springframework.context.annotation.Bean; import static java.lang.Integer.parseInt; import static java.lang.String.valueOf; -import static org.apache.commons.lang.StringUtils.defaultIfBlank; +import static org.apache.commons.lang3.StringUtils.defaultIfBlank; import static org.sonar.core.config.ProxyProperties.HTTP_PROXY_PASSWORD; import static org.sonar.core.config.ProxyProperties.HTTP_PROXY_USER; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java index 3c3bf87af47..69a430dd869 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java @@ -23,7 +23,7 @@ import java.time.Clock; import java.util.List; import java.util.Map; import javax.annotation.Priority; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sonar.api.CoreProperties; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/CiConfigurationImpl.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/CiConfigurationImpl.java index 76e993c3721..e3292074409 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/CiConfigurationImpl.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/CiConfigurationImpl.java @@ -22,7 +22,7 @@ package org.sonar.scanner.ci; import java.util.Optional; import javax.annotation.Nullable; -import static org.apache.commons.lang.StringUtils.defaultIfBlank; +import static org.apache.commons.lang3.StringUtils.defaultIfBlank; public class CiConfigurationImpl implements CiConfiguration { private final String ciName; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/AzureDevops.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/AzureDevops.java index a96e9fba67e..944a6646372 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/AzureDevops.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/AzureDevops.java @@ -24,7 +24,7 @@ import org.sonar.scanner.ci.CiConfiguration; import org.sonar.scanner.ci.CiConfigurationImpl; import org.sonar.scanner.ci.CiVendor; -import static org.apache.commons.lang.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isBlank; /** * Support of https://azure.microsoft.com/en-us/services/devops/ diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/BitbucketPipelines.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/BitbucketPipelines.java index 04664188948..5be6ef0c4be 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/BitbucketPipelines.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/BitbucketPipelines.java @@ -24,7 +24,7 @@ import org.sonar.scanner.ci.CiConfiguration; import org.sonar.scanner.ci.CiConfigurationImpl; import org.sonar.scanner.ci.CiVendor; -import static org.apache.commons.lang.StringUtils.isNotEmpty; +import static org.apache.commons.lang3.StringUtils.isNotEmpty; public class BitbucketPipelines implements CiVendor { diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/CirrusCi.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/CirrusCi.java index a0fb45ea37c..7b920043961 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/CirrusCi.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/CirrusCi.java @@ -19,13 +19,13 @@ */ package org.sonar.scanner.ci.vendors; -import org.sonar.api.utils.System2; import org.slf4j.LoggerFactory; +import org.sonar.api.utils.System2; import org.sonar.scanner.ci.CiConfiguration; import org.sonar.scanner.ci.CiConfigurationImpl; import org.sonar.scanner.ci.CiVendor; -import static org.apache.commons.lang.StringUtils.isEmpty; +import static org.apache.commons.lang3.StringUtils.isEmpty; /** * Support https://cirrus-ci.org/ diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/CodeMagic.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/CodeMagic.java index c37cac1b1ca..1bb3865c9e9 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/CodeMagic.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/CodeMagic.java @@ -19,14 +19,14 @@ */ package org.sonar.scanner.ci.vendors; -import org.sonar.api.utils.System2; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.sonar.api.utils.System2; import org.sonar.scanner.ci.CiConfiguration; import org.sonar.scanner.ci.CiConfigurationImpl; import org.sonar.scanner.ci.CiVendor; -import static org.apache.commons.lang.StringUtils.isEmpty; +import static org.apache.commons.lang3.StringUtils.isEmpty; public class CodeMagic implements CiVendor { diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/GithubActions.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/GithubActions.java index 7b48a90f6b4..5cc999b72e1 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/GithubActions.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/GithubActions.java @@ -19,7 +19,7 @@ */ package org.sonar.scanner.ci.vendors; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sonar.api.utils.System2; @@ -28,7 +28,7 @@ import org.sonar.scanner.ci.CiConfigurationImpl; import org.sonar.scanner.ci.CiVendor; import org.sonar.scanner.ci.DevOpsPlatformInfo; -import static org.apache.commons.lang.StringUtils.isEmpty; +import static org.apache.commons.lang3.StringUtils.isEmpty; /** * Support of https://github.com/features/actions diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/Jenkins.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/Jenkins.java index f3a262ba426..65002ce3037 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/Jenkins.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/Jenkins.java @@ -21,20 +21,20 @@ package org.sonar.scanner.ci.vendors; import java.nio.file.Path; import java.util.Optional; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.RepositoryBuilder; -import org.sonar.api.batch.fs.internal.DefaultInputProject; -import org.sonar.api.utils.System2; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.sonar.api.batch.fs.internal.DefaultInputProject; +import org.sonar.api.utils.System2; import org.sonar.scanner.ci.CiConfiguration; import org.sonar.scanner.ci.CiConfigurationImpl; import org.sonar.scanner.ci.CiVendor; -import static org.apache.commons.lang.StringUtils.isNotBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; public class Jenkins implements CiVendor { private static final Logger LOG = LoggerFactory.getLogger(Jenkins.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/SemaphoreCi.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/SemaphoreCi.java index f3e16a5fae1..21f8f944d78 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/SemaphoreCi.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/SemaphoreCi.java @@ -24,7 +24,7 @@ import org.sonar.scanner.ci.CiConfiguration; import org.sonar.scanner.ci.CiConfigurationImpl; import org.sonar.scanner.ci.CiVendor; -import static org.apache.commons.lang.StringUtils.isNotEmpty; +import static org.apache.commons.lang3.StringUtils.isNotEmpty; /** * Support https://semaphoreci.com diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/TravisCi.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/TravisCi.java index 91ee2d6908e..fc9f30caef5 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/TravisCi.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/ci/vendors/TravisCi.java @@ -24,7 +24,7 @@ import org.sonar.scanner.ci.CiConfiguration; import org.sonar.scanner.ci.CiConfigurationImpl; import org.sonar.scanner.ci.CiVendor; -import static org.apache.commons.lang.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isBlank; /** * Support of https://travis-ci.com diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/config/DefaultConfiguration.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/config/DefaultConfiguration.java index 46c36144fc9..57ebb4d9075 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/config/DefaultConfiguration.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/config/DefaultConfiguration.java @@ -24,16 +24,16 @@ import java.util.HashMap; import java.util.Map; import java.util.Optional; import javax.annotation.concurrent.Immutable; -import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang3.ArrayUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.sonar.api.config.Configuration; -import org.sonar.api.config.internal.Encryption; import org.sonar.api.config.PropertyDefinition; import org.sonar.api.config.PropertyDefinitions; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.sonar.api.config.internal.Encryption; import static java.util.Objects.requireNonNull; -import static org.apache.commons.lang.StringUtils.trim; +import static org.apache.commons.lang3.StringUtils.trim; import static org.sonar.api.config.internal.MultivalueProperty.parseAsCsv; @Immutable diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/externalissue/ExternalIssueImporter.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/externalissue/ExternalIssueImporter.java index 848a54c1278..b8dba3ffdb8 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/externalissue/ExternalIssueImporter.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/externalissue/ExternalIssueImporter.java @@ -26,7 +26,7 @@ import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; import javax.annotation.CheckForNull; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sonar.api.batch.fs.InputFile; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/genericcoverage/StaxParser.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/genericcoverage/StaxParser.java index 79d6bd5121f..3fd28b9dd18 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/genericcoverage/StaxParser.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/genericcoverage/StaxParser.java @@ -30,7 +30,7 @@ import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLResolver; import javax.xml.stream.XMLStreamException; import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.codehaus.staxmate.SMInputFactory; import org.codehaus.staxmate.in.SMHierarchicCursor; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultFilterableIssue.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultFilterableIssue.java index 33a0e1fc6d0..ddb665c7965 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultFilterableIssue.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultFilterableIssue.java @@ -20,8 +20,8 @@ package org.sonar.scanner.issue; import javax.annotation.concurrent.ThreadSafe; -import org.apache.commons.lang.builder.ToStringBuilder; -import org.apache.commons.lang.builder.ToStringStyle; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; import org.sonar.api.batch.fs.InputComponent; import org.sonar.api.batch.fs.TextRange; import org.sonar.api.batch.fs.internal.DefaultInputProject; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssuePublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssuePublisher.java index 9e0b26e96dc..66329f4e6ac 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssuePublisher.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssuePublisher.java @@ -26,7 +26,7 @@ import java.util.Map; import java.util.function.Consumer; import javax.annotation.Nullable; import javax.annotation.concurrent.ThreadSafe; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.sonar.api.batch.fs.TextRange; import org.sonar.api.batch.fs.internal.DefaultInputComponent; import org.sonar.api.batch.fs.internal.DefaultInputFile; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/pattern/AbstractPatternInitializer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/pattern/AbstractPatternInitializer.java index a5142ab6169..37afea9f398 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/pattern/AbstractPatternInitializer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/pattern/AbstractPatternInitializer.java @@ -21,7 +21,7 @@ package org.sonar.scanner.issue.ignore.pattern; import java.util.ArrayList; import java.util.List; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.sonar.api.config.Configuration; import org.sonar.api.utils.MessageException; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/pattern/IssueExclusionPatternInitializer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/pattern/IssueExclusionPatternInitializer.java index b06c73ca9a7..959780b8a37 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/pattern/IssueExclusionPatternInitializer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/pattern/IssueExclusionPatternInitializer.java @@ -23,7 +23,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; import javax.annotation.Nullable; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.sonar.api.config.Configuration; import org.sonar.api.utils.MessageException; import org.sonar.core.config.IssueExclusionProperties; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsLoader.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsLoader.java index d391d8064f4..84a0e7920bb 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsLoader.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsLoader.java @@ -22,12 +22,12 @@ package org.sonar.scanner.issue.ignore.scanner; import java.util.ArrayList; import java.util.List; import javax.annotation.CheckForNull; -import org.apache.commons.lang.StringUtils; -import org.sonar.api.notifications.AnalysisWarnings; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sonar.api.batch.fs.internal.DefaultInputFile; import org.sonar.api.batch.fs.internal.charhandler.CharHandler; +import org.sonar.api.notifications.AnalysisWarnings; import org.sonar.scanner.issue.ignore.IgnoreIssuesFilter; import org.sonar.scanner.issue.ignore.pattern.BlockIssuePattern; import org.sonar.scanner.issue.ignore.pattern.IssueExclusionPatternInitializer; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/platform/DefaultServer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/platform/DefaultServer.java index 3b68dc3737c..9ec8ac9ae9c 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/platform/DefaultServer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/platform/DefaultServer.java @@ -20,7 +20,7 @@ package org.sonar.scanner.platform; import java.util.Date; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.sonar.api.CoreProperties; import org.sonar.api.config.Configuration; import org.sonar.api.platform.Server; @@ -28,7 +28,7 @@ import org.sonar.api.utils.DateUtils; import org.sonar.core.platform.SonarQubeVersion; import org.sonar.scanner.bootstrap.DefaultScannerWsClient; -import static org.apache.commons.lang.StringUtils.trimToEmpty; +import static org.apache.commons.lang3.StringUtils.trimToEmpty; public class DefaultServer extends Server { diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/AnalysisContextReportPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/AnalysisContextReportPublisher.java index b09d782054a..1bbddc452c5 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/AnalysisContextReportPublisher.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/AnalysisContextReportPublisher.java @@ -28,7 +28,7 @@ import java.util.Comparator; import java.util.HashMap; import java.util.Map; import java.util.TreeSet; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.sonar.api.CoreProperties; import org.sonar.api.batch.fs.internal.AbstractProjectOrModule; import org.sonar.api.batch.fs.internal.DefaultInputModule; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ComponentsPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ComponentsPublisher.java index 2a074d1cc91..254ae3eb867 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ComponentsPublisher.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ComponentsPublisher.java @@ -21,7 +21,7 @@ package org.sonar.scanner.report; import java.util.Map; import javax.annotation.CheckForNull; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.sonar.api.CoreProperties; import org.sonar.api.batch.fs.InputFile; import org.sonar.api.batch.fs.InputFile.Status; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ReportPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ReportPublisher.java index cf9d79ba9b5..2f1787885ad 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ReportPublisher.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ReportPublisher.java @@ -61,8 +61,8 @@ import org.sonarqube.ws.client.RequestWithPayload.Part; import org.sonarqube.ws.client.WsResponse; import static java.net.URLEncoder.encode; -import static org.apache.commons.lang.StringUtils.EMPTY; -import static org.apache.commons.lang.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.EMPTY; +import static org.apache.commons.lang3.StringUtils.isBlank; import static org.sonar.core.ce.CeTaskCharacteristics.BRANCH_TYPE; import static org.sonar.core.ce.CeTaskCharacteristics.DEVOPS_PLATFORM_PROJECT_IDENTIFIER; import static org.sonar.core.ce.CeTaskCharacteristics.DEVOPS_PLATFORM_URL; 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 6994ba5009e..9c17a76a8c2 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.lang.StringEscapeUtils; +import org.apache.commons.lang3.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/DeprecatedPropertiesWarningGenerator.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/DeprecatedPropertiesWarningGenerator.java index 1ba0126c134..244fbe4aea9 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/DeprecatedPropertiesWarningGenerator.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/DeprecatedPropertiesWarningGenerator.java @@ -21,12 +21,12 @@ package org.sonar.scanner.scan; import com.google.common.annotations.VisibleForTesting; import java.util.Optional; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.sonar.api.CoreProperties; import org.sonar.api.config.Configuration; import org.sonar.api.notifications.AnalysisWarnings; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.sonar.batch.bootstrapper.EnvironmentInformation; import org.sonar.scanner.bootstrap.ScannerWsClientProvider; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorBuilder.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorBuilder.java index bcf20ab71b8..858c302e093 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorBuilder.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorBuilder.java @@ -34,8 +34,8 @@ import java.util.Map.Entry; import java.util.Objects; import java.util.stream.Stream; import javax.annotation.Nullable; -import org.apache.commons.lang.ArrayUtils; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.ArrayUtils; +import org.apache.commons.lang3.StringUtils; import org.sonar.api.CoreProperties; import org.sonar.api.batch.bootstrap.ProjectDefinition; import org.sonar.api.batch.bootstrap.ProjectReactor; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorValidator.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorValidator.java index 2d234d9a105..535b6b2a562 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorValidator.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorValidator.java @@ -34,7 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired; import static java.lang.String.format; import static java.util.Objects.nonNull; -import static org.apache.commons.lang.StringUtils.isNotEmpty; +import static org.apache.commons.lang3.StringUtils.isNotEmpty; import static org.sonar.core.component.ComponentKeys.ALLOWED_CHARACTERS_MESSAGE; import static org.sonar.core.config.ScannerProperties.BRANCHES_DOC_LINK_SUFFIX; import static org.sonar.core.config.ScannerProperties.BRANCH_NAME; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectServerSettingsProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectServerSettingsProvider.java index 8cf507f04a4..6a1f1087c99 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectServerSettingsProvider.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectServerSettingsProvider.java @@ -20,11 +20,11 @@ package org.sonar.scanner.scan; import java.util.Map; -import org.apache.commons.lang.StringUtils; -import org.sonar.api.CoreProperties; -import org.sonar.api.notifications.AnalysisWarnings; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.sonar.api.CoreProperties; +import org.sonar.api.notifications.AnalysisWarnings; import org.sonar.scanner.repository.settings.ProjectSettingsLoader; import org.springframework.context.annotation.Bean; 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 5ce70a9892c..36840fb6ac8 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 @@ -24,14 +24,14 @@ import java.util.Arrays; import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.Stream; -import org.apache.commons.lang.ArrayUtils; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.ArrayUtils; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.sonar.api.CoreProperties; import org.sonar.api.batch.fs.InputFile; import org.sonar.api.batch.fs.internal.PathPattern; import org.sonar.api.notifications.AnalysisWarnings; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import static java.lang.String.format; import static org.sonar.api.CoreProperties.PROJECT_TESTS_EXCLUSIONS_PROPERTY; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/DirectoryFileVisitor.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/DirectoryFileVisitor.java index ea0bacb9a59..e4e968daf8a 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/DirectoryFileVisitor.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/DirectoryFileVisitor.java @@ -29,7 +29,7 @@ import java.nio.file.LinkOption; import java.nio.file.Path; import java.nio.file.attribute.BasicFileAttributes; import java.nio.file.attribute.DosFileAttributes; -import org.apache.commons.lang.SystemUtils; +import org.apache.commons.lang3.SystemUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sonar.api.batch.fs.InputFile; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/LanguageDetection.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/LanguageDetection.java index dba9523c6bf..8873d79c60e 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/LanguageDetection.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/LanguageDetection.java @@ -31,7 +31,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import javax.annotation.CheckForNull; import javax.annotation.concurrent.ThreadSafe; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sonar.api.batch.fs.internal.PathPattern; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectFileIndexer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectFileIndexer.java index 3aa51baeca4..6f8815222ae 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectFileIndexer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectFileIndexer.java @@ -29,7 +29,7 @@ import java.util.Iterator; import java.util.List; import java.util.Optional; import java.util.concurrent.TimeUnit; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sonar.api.batch.fs.InputFile.Type; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/StatusDetection.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/StatusDetection.java index d8fae760a62..24a8c5d304f 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/StatusDetection.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/StatusDetection.java @@ -20,7 +20,7 @@ package org.sonar.scanner.scan.filesystem; import javax.annotation.concurrent.Immutable; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.sonar.api.batch.fs.InputFile; import org.sonar.api.batch.fs.internal.DefaultInputFile; import org.sonar.scanner.repository.FileData; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/DefaultBlameOutput.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/DefaultBlameOutput.java index 113064a9cfd..75ae9a29db5 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/DefaultBlameOutput.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/DefaultBlameOutput.java @@ -28,14 +28,14 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.sonar.api.batch.fs.InputFile; import org.sonar.api.batch.fs.internal.DefaultInputFile; import org.sonar.api.batch.scm.BlameCommand.BlameOutput; import org.sonar.api.batch.scm.BlameLine; import org.sonar.api.notifications.AnalysisWarnings; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.sonar.core.documentation.DocumentationLinkGenerator; import org.sonar.scanner.protocol.output.ScannerReport; import org.sonar.scanner.protocol.output.ScannerReport.Changesets.Builder; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmConfiguration.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmConfiguration.java index 443a4801dc9..1a156d7e704 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmConfiguration.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmConfiguration.java @@ -23,7 +23,9 @@ import java.util.LinkedHashMap; import java.util.Map; import java.util.stream.Collectors; import javax.annotation.CheckForNull; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.sonar.api.CoreProperties; import org.sonar.api.Properties; import org.sonar.api.Property; @@ -33,8 +35,6 @@ import org.sonar.api.batch.scm.ScmProvider; import org.sonar.api.config.Configuration; import org.sonar.api.notifications.AnalysisWarnings; import org.sonar.api.utils.MessageException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.sonar.core.config.ScannerProperties; import org.sonar.scanner.fs.InputModuleHierarchy; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmPublisher.java index c7c01c2c539..be3311e69d7 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmPublisher.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmPublisher.java @@ -21,7 +21,9 @@ package org.sonar.scanner.scm; import java.util.LinkedList; import java.util.List; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.sonar.api.CoreProperties; import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.batch.fs.InputFile; @@ -29,8 +31,6 @@ import org.sonar.api.batch.fs.InputFile.Status; import org.sonar.api.batch.fs.internal.DefaultInputFile; import org.sonar.api.batch.scm.ScmProvider; import org.sonar.api.notifications.AnalysisWarnings; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.sonar.core.documentation.DocumentationLinkGenerator; import org.sonar.scanner.protocol.output.ScannerReport; import org.sonar.scanner.protocol.output.ScannerReport.Changesets.Builder; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmRevisionImpl.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmRevisionImpl.java index 4ec04af0f95..e05ecf758a3 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmRevisionImpl.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmRevisionImpl.java @@ -20,14 +20,14 @@ package org.sonar.scanner.scm; import java.util.Optional; -import org.sonar.api.batch.scm.ScmProvider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.sonar.api.batch.scm.ScmProvider; import org.sonar.scanner.bootstrap.ScannerProperties; import org.sonar.scanner.ci.CiConfiguration; import org.sonar.scanner.fs.InputModuleHierarchy; -import static org.apache.commons.lang.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isBlank; import static org.sonar.scanner.scan.ScanProperties.SCM_REVISION; public class ScmRevisionImpl implements ScmRevision { |