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 4f99a3f19219394dc35269930a4f10d9ba21866f Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Mon Feb 15 13:28:04 2021 +0100 CAMEL-16193 - Use SecureRandom instead of Random - Camel-Pubnub --- .../apache/camel/component/pubnub/example/PubNubSensor2Example.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensor2Example.java b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensor2Example.java index 6aa6d9d..22123ee 100644 --- a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensor2Example.java +++ b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensor2Example.java @@ -16,9 +16,9 @@ */ package org.apache.camel.component.pubnub.example; +import java.security.SecureRandom; import java.util.HashMap; import java.util.Map; -import java.util.Random; import java.util.concurrent.ConcurrentHashMap; import com.pubnub.api.models.consumer.pubsub.PNMessageResult; @@ -113,7 +113,7 @@ public final class PubNubSensor2Example { private int temperature; DeviceWeatherInfo(String device) { - Random rand = new Random(); + SecureRandom rand = new SecureRandom(); this.device = device; this.humidity = rand.nextInt(100); this.temperature = rand.nextInt(40);