Skip to content

Commit 6bac1a2

Browse files
committed
Migrate from deprecated APIs
1 parent a58fa28 commit 6bac1a2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/test/java/org/apache/commons/lang3/SystemPropertiesTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ void testGetAwtToolkit() {
264264

265265
@Test
266266
void testGetBoolean() {
267-
final String key = RandomStringUtils.random(10);
268-
final String absentKey = RandomStringUtils.random(10);
267+
final String key = RandomStringUtils.insecure().next(10);
268+
final String absentKey = RandomStringUtils.insecure().next(10);
269269
assertNull(System.getProperty(absentKey));
270270
try {
271271
System.setProperty(key, Boolean.toString(Boolean.TRUE));
@@ -483,8 +483,8 @@ void testGetFileSeparator() {
483483

484484
@Test
485485
void testGetInt() {
486-
final String key = RandomStringUtils.random(10);
487-
final String absentKey = RandomStringUtils.random(10);
486+
final String key = RandomStringUtils.insecure().next(10);
487+
final String absentKey = RandomStringUtils.insecure().next(10);
488488
assertNull(System.getProperty(absentKey));
489489
try {
490490
System.setProperty(key, Integer.toString(Integer.MAX_VALUE));
@@ -674,8 +674,8 @@ void testGetLineSeparator() {
674674

675675
@Test
676676
void testGetLong() {
677-
final String key = RandomStringUtils.random(10);
678-
final String absentKey = RandomStringUtils.random(10);
677+
final String key = RandomStringUtils.insecure().next(10);
678+
final String absentKey = RandomStringUtils.insecure().next(10);
679679
assertNull(System.getProperty(absentKey));
680680
try {
681681
System.setProperty(key, Long.toString(Long.MAX_VALUE));

0 commit comments

Comments
 (0)