diff options
author | Matteo Mara <matteo.mara@sonarsource.com> | 2024-10-07 18:13:33 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-10-14 20:03:03 +0000 |
commit | 1ad3667d30dd82213ae47bea2c267188f003b2c7 (patch) | |
tree | 422f1f66b48114de0e79de9f7bd53aceff3f7c91 /server/sonar-webserver-pushapi | |
parent | ce2e686a3e269f937ffb51635928cd1a597b2d07 (diff) | |
download | sonarqube-1ad3667d30dd82213ae47bea2c267188f003b2c7.tar.gz sonarqube-1ad3667d30dd82213ae47bea2c267188f003b2c7.zip |
NO-JIRA Stop using deprecated methods from RandomStringUtils
Diffstat (limited to 'server/sonar-webserver-pushapi')
-rw-r--r-- | server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/qualityprofile/QualityProfileChangeEventServiceImplTest.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/qualityprofile/QualityProfileChangeEventServiceImplTest.java b/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/qualityprofile/QualityProfileChangeEventServiceImplTest.java index 8d629900c8f..0ba4583234b 100644 --- a/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/qualityprofile/QualityProfileChangeEventServiceImplTest.java +++ b/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/qualityprofile/QualityProfileChangeEventServiceImplTest.java @@ -44,7 +44,7 @@ import org.sonar.server.qualityprofile.ActiveRuleChange; import org.sonarqube.ws.Common; import static java.util.List.of; -import static org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric; +import static org.apache.commons.lang3.RandomStringUtils.secure; import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.api.measures.CoreMetrics.NCLOC_LANGUAGE_DISTRIBUTION_KEY; import static org.sonar.db.rule.RuleTesting.newCustomRule; @@ -183,7 +183,7 @@ public class QualityProfileChangeEventServiceImplTest { RuleParamDto rule1Param = db.rules().insertRuleParam(rule1); ActiveRuleDto activeRule1 = db.qualityProfiles().activateRule(activatedQualityProfile, rule1); - ActiveRuleParamDto activeRuleParam1 = ActiveRuleParamDto.createFor(rule1Param).setValue(randomAlphanumeric(20)); + ActiveRuleParamDto activeRuleParam1 = ActiveRuleParamDto.createFor(rule1Param).setValue(secure().nextAlphanumeric(20)); db.getDbClient().activeRuleDao().insertParam(db.getSession(), activeRule1, activeRuleParam1); db.getSession().commit(); @@ -193,7 +193,7 @@ public class QualityProfileChangeEventServiceImplTest { RuleParamDto rule2Param = db.rules().insertRuleParam(rule2); ActiveRuleDto activeRule2 = db.qualityProfiles().activateRule(deactivatedQualityProfile, rule2); - ActiveRuleParamDto activeRuleParam2 = ActiveRuleParamDto.createFor(rule2Param).setValue(randomAlphanumeric(20)); + ActiveRuleParamDto activeRuleParam2 = ActiveRuleParamDto.createFor(rule2Param).setValue(secure().nextAlphanumeric(20)); db.getDbClient().activeRuleDao().insertParam(db.getSession(), activeRule2, activeRuleParam2); db.getSession().commit(); |