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-core/src | |
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-core/src')
21 files changed, 31 insertions, 31 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/component/ComponentKeys.java b/sonar-core/src/main/java/org/sonar/core/component/ComponentKeys.java index d070711f51e..a37697ce133 100644 --- a/sonar-core/src/main/java/org/sonar/core/component/ComponentKeys.java +++ b/sonar-core/src/main/java/org/sonar/core/component/ComponentKeys.java @@ -21,7 +21,7 @@ package org.sonar.core.component; import java.util.regex.Pattern; import javax.annotation.Nullable; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import static com.google.common.base.Preconditions.checkArgument; diff --git a/sonar-core/src/main/java/org/sonar/core/hash/SourceLineHashesComputer.java b/sonar-core/src/main/java/org/sonar/core/hash/SourceLineHashesComputer.java index 34c4ccacc30..9a149dc1dd1 100644 --- a/sonar-core/src/main/java/org/sonar/core/hash/SourceLineHashesComputer.java +++ b/sonar-core/src/main/java/org/sonar/core/hash/SourceLineHashesComputer.java @@ -25,7 +25,7 @@ import java.util.Collections; import java.util.List; import org.apache.commons.codec.binary.Hex; import org.apache.commons.codec.digest.DigestUtils; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; diff --git a/sonar-core/src/main/java/org/sonar/core/issue/AnticipatedTransition.java b/sonar-core/src/main/java/org/sonar/core/issue/AnticipatedTransition.java index 90068c65fb1..e5e1b246b11 100644 --- a/sonar-core/src/main/java/org/sonar/core/issue/AnticipatedTransition.java +++ b/sonar-core/src/main/java/org/sonar/core/issue/AnticipatedTransition.java @@ -22,7 +22,7 @@ package org.sonar.core.issue; import java.time.Instant; import java.util.Date; import java.util.Objects; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import org.jetbrains.annotations.Nullable; import org.sonar.api.issue.Issue; import org.sonar.api.rule.RuleKey; diff --git a/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java b/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java index 0ca4cab4545..7afc0784a49 100644 --- a/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java +++ b/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java @@ -38,9 +38,9 @@ import java.util.Optional; import java.util.Set; import javax.annotation.CheckForNull; import javax.annotation.Nullable; -import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang.builder.ToStringBuilder; -import org.apache.commons.lang.builder.ToStringStyle; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; import org.sonar.api.issue.Issue; import org.sonar.api.issue.IssueStatus; import org.sonar.api.issue.impact.SoftwareQuality; diff --git a/sonar-core/src/main/java/org/sonar/core/issue/FieldDiffs.java b/sonar-core/src/main/java/org/sonar/core/issue/FieldDiffs.java index affaf53258f..5d17343f234 100644 --- a/sonar-core/src/main/java/org/sonar/core/issue/FieldDiffs.java +++ b/sonar-core/src/main/java/org/sonar/core/issue/FieldDiffs.java @@ -31,12 +31,12 @@ import java.util.Objects; import java.util.Optional; import javax.annotation.CheckForNull; import javax.annotation.Nullable; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import static com.google.common.base.Strings.emptyToNull; import static com.google.common.base.Strings.isNullOrEmpty; -import static org.apache.commons.lang.StringUtils.isNotBlank; -import static org.apache.commons.lang.StringUtils.trimToNull; +import static org.apache.commons.lang3.StringUtils.isNotBlank; +import static org.apache.commons.lang3.StringUtils.trimToNull; /** * PLUGINS MUST NOT USE THIS CLASS, EXCEPT FOR UNIT TESTING. diff --git a/sonar-core/src/main/java/org/sonar/core/issue/tracking/AbstractTracker.java b/sonar-core/src/main/java/org/sonar/core/issue/tracking/AbstractTracker.java index b3b9f343c97..41b4aa79f87 100644 --- a/sonar-core/src/main/java/org/sonar/core/issue/tracking/AbstractTracker.java +++ b/sonar-core/src/main/java/org/sonar/core/issue/tracking/AbstractTracker.java @@ -25,7 +25,7 @@ import java.util.Collection; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nonnull; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.sonar.api.rule.RuleKey; import static java.util.Comparator.comparing; diff --git a/sonar-core/src/main/java/org/sonar/core/platform/PluginClassLoader.java b/sonar-core/src/main/java/org/sonar/core/platform/PluginClassLoader.java index 7e47b756adf..fe59b63e287 100644 --- a/sonar-core/src/main/java/org/sonar/core/platform/PluginClassLoader.java +++ b/sonar-core/src/main/java/org/sonar/core/platform/PluginClassLoader.java @@ -26,7 +26,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.stream.Collectors; -import org.apache.commons.lang.SystemUtils; +import org.apache.commons.lang3.SystemUtils; import org.slf4j.LoggerFactory; import org.sonar.api.Plugin; import org.sonar.updatecenter.common.Version; @@ -134,7 +134,7 @@ public class PluginClassLoader { try { instancesByPluginKey.put(pluginKey, (Plugin) classLoader.loadClass(mainClass).getDeclaredConstructor().newInstance()); } catch (UnsupportedClassVersionError e) { - throw new IllegalStateException(String.format("The plugin [%s] does not support Java %s", pluginKey, SystemUtils.JAVA_VERSION_TRIMMED), e); + throw new IllegalStateException(String.format("The plugin [%s] does not support Java %s", pluginKey, SystemUtils.JAVA_VERSION), e); } catch (Throwable e) { throw new IllegalStateException(String.format("Fail to instantiate class [%s] of plugin [%s]", mainClass, pluginKey), e); } diff --git a/sonar-core/src/main/java/org/sonar/core/platform/PluginInfo.java b/sonar-core/src/main/java/org/sonar/core/platform/PluginInfo.java index 9f8d85f2689..636dc7e5edd 100644 --- a/sonar-core/src/main/java/org/sonar/core/platform/PluginInfo.java +++ b/sonar-core/src/main/java/org/sonar/core/platform/PluginInfo.java @@ -35,7 +35,7 @@ import java.util.regex.Pattern; import java.util.zip.ZipEntry; import javax.annotation.CheckForNull; 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.utils.MessageException; diff --git a/sonar-core/src/main/java/org/sonar/core/user/DefaultUser.java b/sonar-core/src/main/java/org/sonar/core/user/DefaultUser.java index 53bc4cc2c99..cd7e19b22ff 100644 --- a/sonar-core/src/main/java/org/sonar/core/user/DefaultUser.java +++ b/sonar-core/src/main/java/org/sonar/core/user/DefaultUser.java @@ -21,9 +21,9 @@ package org.sonar.core.user; import javax.annotation.CheckForNull; import javax.annotation.Nullable; -import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang.builder.ToStringBuilder; -import org.apache.commons.lang.builder.ToStringStyle; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; import org.sonar.api.user.User; /** diff --git a/sonar-core/src/main/java/org/sonar/core/util/CloseableIterator.java b/sonar-core/src/main/java/org/sonar/core/util/CloseableIterator.java index 3537eff1e30..8acf3a9cc8f 100644 --- a/sonar-core/src/main/java/org/sonar/core/util/CloseableIterator.java +++ b/sonar-core/src/main/java/org/sonar/core/util/CloseableIterator.java @@ -25,7 +25,7 @@ import java.util.Iterator; import java.util.List; import java.util.NoSuchElementException; import javax.annotation.CheckForNull; -import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang3.ArrayUtils; import static com.google.common.base.Preconditions.checkArgument; import static java.util.Objects.requireNonNull; diff --git a/sonar-core/src/main/java/org/sonar/core/util/ContextException.java b/sonar-core/src/main/java/org/sonar/core/util/ContextException.java index 7166737617c..7e7f7917c0c 100644 --- a/sonar-core/src/main/java/org/sonar/core/util/ContextException.java +++ b/sonar-core/src/main/java/org/sonar/core/util/ContextException.java @@ -27,7 +27,7 @@ import java.util.List; import javax.annotation.CheckForNull; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; /** * A runtime exception that provides contextual information as a list of key-value diff --git a/sonar-core/src/main/java/org/sonar/core/util/SequenceUuidFactory.java b/sonar-core/src/main/java/org/sonar/core/util/SequenceUuidFactory.java index 32b10651ead..51aa70811d5 100644 --- a/sonar-core/src/main/java/org/sonar/core/util/SequenceUuidFactory.java +++ b/sonar-core/src/main/java/org/sonar/core/util/SequenceUuidFactory.java @@ -20,7 +20,7 @@ package org.sonar.core.util; import com.google.common.annotations.VisibleForTesting; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import java.util.concurrent.atomic.AtomicInteger; diff --git a/sonar-core/src/main/java/org/sonar/core/util/SettingFormatter.java b/sonar-core/src/main/java/org/sonar/core/util/SettingFormatter.java index ac741e9a8d1..bf966906733 100644 --- a/sonar-core/src/main/java/org/sonar/core/util/SettingFormatter.java +++ b/sonar-core/src/main/java/org/sonar/core/util/SettingFormatter.java @@ -20,9 +20,9 @@ package org.sonar.core.util; import java.util.Locale; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; -import static org.apache.commons.lang.StringUtils.trim; +import static org.apache.commons.lang3.StringUtils.trim; public final class SettingFormatter { private SettingFormatter() { diff --git a/sonar-core/src/main/java/org/sonar/core/util/logs/DefaultProfiler.java b/sonar-core/src/main/java/org/sonar/core/util/logs/DefaultProfiler.java index 846415ee4f2..5ab3dceefdc 100644 --- a/sonar-core/src/main/java/org/sonar/core/util/logs/DefaultProfiler.java +++ b/sonar-core/src/main/java/org/sonar/core/util/logs/DefaultProfiler.java @@ -22,9 +22,9 @@ package org.sonar.core.util.logs; import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.Nullable; -import org.apache.commons.lang.StringUtils; -import org.sonar.api.utils.System2; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; +import org.sonar.api.utils.System2; import org.sonar.api.utils.log.LoggerLevel; class DefaultProfiler extends Profiler { diff --git a/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java b/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java index 2c97f6f2b66..a550be9ca87 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java @@ -21,7 +21,7 @@ package org.sonar.core.issue; import java.util.List; import java.util.Map; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.junit.Test; import org.sonar.api.issue.Issue; import org.sonar.api.issue.IssueStatus; diff --git a/sonar-core/src/test/java/org/sonar/core/issue/tracking/TrackerTest.java b/sonar-core/src/test/java/org/sonar/core/issue/tracking/TrackerTest.java index 4f18d6dfd26..a32e8eb6681 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/tracking/TrackerTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/tracking/TrackerTest.java @@ -30,7 +30,7 @@ import org.junit.Test; import org.sonar.api.rule.RuleKey; import static java.util.Arrays.asList; -import static org.apache.commons.lang.StringUtils.trim; +import static org.apache.commons.lang3.StringUtils.trim; import static org.assertj.core.api.Assertions.assertThat; public class TrackerTest { diff --git a/sonar-core/src/test/java/org/sonar/core/platform/PluginClassloaderFactoryTest.java b/sonar-core/src/test/java/org/sonar/core/platform/PluginClassloaderFactoryTest.java index 67294121891..cec48fb6a7f 100644 --- a/sonar-core/src/test/java/org/sonar/core/platform/PluginClassloaderFactoryTest.java +++ b/sonar-core/src/test/java/org/sonar/core/platform/PluginClassloaderFactoryTest.java @@ -23,7 +23,7 @@ import com.sonarsource.plugins.license.api.FooBar; import java.io.File; import java.util.List; import java.util.Map; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.junit.Test; import org.sonar.api.server.rule.RulesDefinition; diff --git a/sonar-core/src/test/java/org/sonar/core/platform/ServerIdTest.java b/sonar-core/src/test/java/org/sonar/core/platform/ServerIdTest.java index c427f1abc8a..792687975de 100644 --- a/sonar-core/src/test/java/org/sonar/core/platform/ServerIdTest.java +++ b/sonar-core/src/test/java/org/sonar/core/platform/ServerIdTest.java @@ -30,8 +30,8 @@ import java.util.stream.Stream; import org.junit.Test; import org.junit.runner.RunWith; -import static org.apache.commons.lang.RandomStringUtils.randomAlphabetic; -import static org.apache.commons.lang.StringUtils.repeat; +import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; +import static org.apache.commons.lang3.StringUtils.repeat; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.sonar.core.platform.ServerId.DATABASE_ID_LENGTH; diff --git a/sonar-core/src/test/java/org/sonar/core/sarif/RuleTest.java b/sonar-core/src/test/java/org/sonar/core/sarif/RuleTest.java index 12366cbd32b..c446697d5fb 100644 --- a/sonar-core/src/test/java/org/sonar/core/sarif/RuleTest.java +++ b/sonar-core/src/test/java/org/sonar/core/sarif/RuleTest.java @@ -22,7 +22,7 @@ package org.sonar.core.sarif; import java.util.Set; import org.junit.Test; -import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric; +import static org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric; import static org.assertj.core.api.Assertions.assertThat; diff --git a/sonar-core/src/test/java/org/sonar/core/sarif/SarifVersionValidatorTest.java b/sonar-core/src/test/java/org/sonar/core/sarif/SarifVersionValidatorTest.java index a9600d5a6a2..11797d5ea93 100644 --- a/sonar-core/src/test/java/org/sonar/core/sarif/SarifVersionValidatorTest.java +++ b/sonar-core/src/test/java/org/sonar/core/sarif/SarifVersionValidatorTest.java @@ -27,7 +27,7 @@ import java.util.Set; import java.util.stream.Collectors; import java.util.stream.IntStream; import java.util.stream.Stream; -import org.apache.commons.lang.RandomStringUtils; +import org.apache.commons.lang3.RandomStringUtils; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/sonar-core/src/test/java/org/sonar/core/util/FileUtilsTest.java b/sonar-core/src/test/java/org/sonar/core/util/FileUtilsTest.java index 4992a3975a7..e6ad1e12fc4 100644 --- a/sonar-core/src/test/java/org/sonar/core/util/FileUtilsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/util/FileUtilsTest.java @@ -25,7 +25,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.attribute.BasicFileAttributes; import javax.annotation.CheckForNull; -import org.apache.commons.lang.SystemUtils; +import org.apache.commons.lang3.SystemUtils; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; |