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 74675f2a0cb0d24273c1802f8ee3106ab506f303
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Mon Feb 15 13:22:42 2021 +0100

    CAMEL-16193 - Use SecureRandom instead of Random - Camel-JPA
---
 .../test/java/org/apache/camel/component/jpa/JpaUsePersistTest.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaUsePersistTest.java
 
b/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaUsePersistTest.java
index dabe4d3..41af21e 100644
--- 
a/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaUsePersistTest.java
+++ 
b/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaUsePersistTest.java
@@ -16,7 +16,7 @@
  */
 package org.apache.camel.component.jpa;
 
-import java.util.Random;
+import java.security.SecureRandom;
 
 import javax.persistence.PersistenceException;
 
@@ -40,7 +40,7 @@ public class JpaUsePersistTest extends AbstractJpaMethodTest {
     public void produceExistingEntityShouldThrowAnException() throws Exception 
{
         setUp("jpa://" + Order.class.getName() + "?usePersist=true");
 
-        long id = new Random().nextLong();
+        long id = new SecureRandom().nextLong();
         Order order2 = new Order();
         order2.setId(id);
         order2.setProductName("Beer");

Reply via email to