diff options
author | Michael Arrastia <MArrasti@amdocs.com> | 2018-06-06 13:27:52 +0100 |
---|---|---|
committer | Michael Arrastia <MArrasti@amdocs.com> | 2018-06-06 13:27:52 +0100 |
commit | d1feb25f849bd17264797d434d158d15d5b5fa7c (patch) | |
tree | 3418d7d332d2b00f3095597069e376316047fb10 /champ-lib/champ-titan | |
parent | a96fd576a4cb3cd25fdc2eb0c4f2c1c98f6d50cf (diff) |
Fix Fortify scan vulnerabilities
Change-Id: I9a402ca1bb1755cf5ff9fc04eba781ed7f2b4a1c
Issue-ID: AAI-1193
Signed-off-by: Michael Arrastia <MArrasti@amdocs.com>
Diffstat (limited to 'champ-lib/champ-titan')
-rw-r--r-- | champ-lib/champ-titan/src/main/java/org/onap/aai/champtitan/graph/impl/TitanChampGraphImpl.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/champ-lib/champ-titan/src/main/java/org/onap/aai/champtitan/graph/impl/TitanChampGraphImpl.java b/champ-lib/champ-titan/src/main/java/org/onap/aai/champtitan/graph/impl/TitanChampGraphImpl.java index d72d69d..f3d821c 100644 --- a/champ-lib/champ-titan/src/main/java/org/onap/aai/champtitan/graph/impl/TitanChampGraphImpl.java +++ b/champ-lib/champ-titan/src/main/java/org/onap/aai/champtitan/graph/impl/TitanChampGraphImpl.java @@ -20,6 +20,7 @@ */ package org.onap.aai.champtitan.graph.impl; +import java.security.SecureRandom; import java.time.temporal.ChronoUnit; import java.util.*; import java.util.Map.Entry; @@ -31,8 +32,6 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal; import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.onap.aai.champcore.ChampCapabilities; -import org.onap.aai.champcore.FormatMapper; -import org.onap.aai.champcore.Formatter; import org.onap.aai.champcore.exceptions.ChampIndexNotExistsException; import org.onap.aai.champcore.exceptions.ChampSchemaViolationException; import org.onap.aai.champcore.graph.impl.AbstractTinkerpopChampGraph; @@ -96,7 +95,7 @@ public final class TitanChampGraphImpl extends AbstractTinkerpopChampGraph { titanGraphBuilder.set(titanGraphProperty.getKey(), titanGraphProperty.getValue()); } - titanGraphBuilder.set(TITAN_UNIQUE_SUFFIX, ((short) new Random().nextInt(Short.MAX_VALUE)+"")); + titanGraphBuilder.set(TITAN_UNIQUE_SUFFIX, ((short) new SecureRandom().nextInt(Short.MAX_VALUE)+"")); final Object storageBackend = builder.graphConfiguration.get("storage.backend"); |