apurtell commented on a change in pull request #4118:
URL: https://github.com/apache/hbase/pull/4118#discussion_r810564124
##########
File path:
hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestBytes.java
##########
@@ -386,14 +388,11 @@ public void testBinarySearch() {
@Test
public void testToStringBytesBinaryReversible() {
- // let's run test with 1000 randomly generated byte arrays
- Random rand = new Random(EnvironmentEdgeManager.currentTime());
byte[] randomBytes = new byte[1000];
for (int i = 0; i < 1000; i++) {
- rand.nextBytes(randomBytes);
+ Bytes.random(randomBytes);
Review comment:
> Maybe we could introduce a insecureRandom(byte[]) where we just use
ThreadLocalRandom.
Sure, we can do that in this patch. Good idea. Let me update.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]