You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2022/04/27 14:13:46 UTC

[lucene] 02/02: LUCENE-10525: substitute jdk-11 compatible Random method

This is an automated email from the ASF dual-hosted git repository.

rmuir pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/lucene.git

commit 8dc60ff2bfa2be0c5008f7875c81100380a89c87
Author: Robert Muir <rm...@apache.org>
AuthorDate: Wed Apr 27 10:12:51 2022 -0400

    LUCENE-10525: substitute jdk-11 compatible Random method
---
 .../src/test/org/apache/lucene/tests/mockfile/TestWindowsFS.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lucene/test-framework/src/test/org/apache/lucene/tests/mockfile/TestWindowsFS.java b/lucene/test-framework/src/test/org/apache/lucene/tests/mockfile/TestWindowsFS.java
index 9c3f53cdede..2dbba2d1ad1 100644
--- a/lucene/test-framework/src/test/org/apache/lucene/tests/mockfile/TestWindowsFS.java
+++ b/lucene/test-framework/src/test/org/apache/lucene/tests/mockfile/TestWindowsFS.java
@@ -200,7 +200,7 @@ public class TestWindowsFS extends MockFileSystemTestCase {
       fileName =
           RandomStrings.randomAsciiLettersOfLength(r, r.nextInt(10))
               + reservedCharacters[r.nextInt(reservedCharacters.length)]
-              + RandomStrings.randomAsciiLettersOfLength(r, r.nextInt(1, 10));
+              + RandomStrings.randomAsciiLettersOfLength(r, 1 + r.nextInt(9));
     } else {
       fileName = reservedNames[r.nextInt(reservedNames.length)];
     }