Commit 220213db by Sarath Subramanian Committed by Madhan Neethiraj

ATLAS-1663: Fix defects reported by Coverity Scan

parent ae6fd0a1
...@@ -290,7 +290,9 @@ public class Titan0Graph implements AtlasGraph<Titan0Vertex, Titan0Edge> { ...@@ -290,7 +290,9 @@ public class Titan0Graph implements AtlasGraph<Titan0Vertex, Titan0Edge> {
ScriptEngine engine = manager.getEngineByName("gremlin-groovy"); ScriptEngine engine = manager.getEngineByName("gremlin-groovy");
//Do not cache script compilations due to memory implications //Do not cache script compilations due to memory implications
if (engine != null) {
engine.getContext().setAttribute("#jsr223.groovy.engine.keep.globals", "phantom", ScriptContext.ENGINE_SCOPE); engine.getContext().setAttribute("#jsr223.groovy.engine.keep.globals", "phantom", ScriptContext.ENGINE_SCOPE);
}
return engine; return engine;
} }
......
...@@ -424,7 +424,7 @@ public class EntityREST { ...@@ -424,7 +424,7 @@ public class EntityREST {
try { try {
if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) { if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "EntityREST.createOrUpdate(entityCount=" + perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "EntityREST.createOrUpdate(entityCount=" +
(entities == null || entities.getEntities() == null ? 0 : entities.getEntities().size()) + ")"); (CollectionUtils.isEmpty(entities.getEntities()) ? 0 : entities.getEntities().size()) + ")");
} }
EntityStream entityStream = new AtlasEntityStream(entities); EntityStream entityStream = new AtlasEntityStream(entities);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment