You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/02/15 12:28:41 UTC
[camel] 02/03: CAMEL-16193 - Use SecureRandom instead of Random -
Camel-Leveldb
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 55f48d47bb13cc15e5edf898a15daf28571a5a77
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Feb 15 13:25:02 2021 +0100
CAMEL-16193 - Use SecureRandom instead of Random - Camel-Leveldb
---
.../org/apache/camel/component/leveldb/LevelDBBinaryTest.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBBinaryTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBBinaryTest.java
index af81141d..518d09e 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBBinaryTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBBinaryTest.java
@@ -17,7 +17,7 @@
package org.apache.camel.component.leveldb;
import java.io.ByteArrayOutputStream;
-import java.util.Random;
+import java.security.SecureRandom;
import java.util.concurrent.TimeUnit;
import org.apache.camel.builder.RouteBuilder;
@@ -43,11 +43,11 @@ public class LevelDBBinaryTest extends LevelDBTestSupport {
public void testLevelDBAggregate() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:aggregated");
byte[] a = new byte[10];
- new Random().nextBytes(a);
+ new SecureRandom().nextBytes(a);
byte[] b = new byte[10];
- new Random().nextBytes(b);
+ new SecureRandom().nextBytes(b);
byte[] c = new byte[10];
- new Random().nextBytes(c);
+ new SecureRandom().nextBytes(c);
try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
outputStream.write(a);