update dependencies, migrate RandomStringUtils
This commit is contained in:
+2
-2
@@ -179,9 +179,9 @@ public class ShortenedUrlManager implements SmartInitializingSingleton, UserData
|
||||
if (StringUtils.hasText(code)) {
|
||||
Assert.isTrue(!shortenedUrlRepository.existsById(code), "Given code already exists!");
|
||||
} else {
|
||||
code = RandomStringUtils.random(codeLength, true, true).toUpperCase();
|
||||
code = RandomStringUtils.secure().next(codeLength, true, true).toUpperCase();
|
||||
while (shortenedUrlRepository.existsById(code)) {
|
||||
code = RandomStringUtils.random(codeLength, true, true).toUpperCase();
|
||||
code = RandomStringUtils.secure().next(codeLength, true, true).toUpperCase();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user