You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "Madhan Neethiraj (JIRA)" <ji...@apache.org> on 2017/05/17 16:28:04 UTC
[jira] [Updated] (ATLAS-1663) Fix defects reported by Coverity Scan
[ https://issues.apache.org/jira/browse/ATLAS-1663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Madhan Neethiraj updated ATLAS-1663:
------------------------------------
Fix Version/s: 0.8.1-incubating
> Fix defects reported by Coverity Scan
> -------------------------------------
>
> Key: ATLAS-1663
> URL: https://issues.apache.org/jira/browse/ATLAS-1663
> Project: Atlas
> Issue Type: Bug
> Components: atlas-core
> Affects Versions: 0.9-incubating
> Reporter: Sarath Subramanian
> Assignee: Sarath Subramanian
> Fix For: 0.9-incubating, 0.8.1-incubating
>
> Attachments: ATLAS-1663.1.patch
>
>
> Please find the latest report on new defect(s) introduced to Apache Atlas found with Coverity Scan.
>
> 3 new defect(s) introduced to Apache Atlas found with Coverity Scan.
> 1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
>
> New defect(s) Reported-by: Coverity Scan
> Showing 3 of 3 defect(s)
>
>
> ** CID 157015: Null pointer dereferences (NULL_RETURNS)
> /graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0Graph.java: 293 in org.apache.atlas.repository.graphdb.titan0.Titan0Graph.getGremlinScriptEngine()()
>
>
> ________________________________________________________________________________________________________
> *** CID 157015: Null pointer dereferences (NULL_RETURNS)
> /graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0Graph.java: 293 in org.apache.atlas.repository.graphdb.titan0.Titan0Graph.getGremlinScriptEngine()()
> 287 @Override
> 288 public ScriptEngine getGremlinScriptEngine() {
> 289 ScriptEngineManager manager = new ScriptEngineManager();
> 290 ScriptEngine engine = manager.getEngineByName("gremlin-groovy");
> 291
> 292 //Do not cache script compilations due to memory implications
> >>> CID 157015: Null pointer dereferences (NULL_RETURNS)
> >>> Calling a method on null object "engine".
> 293 engine.getContext().setAttribute("#jsr223.groovy.engine.keep.globals", "phantom", ScriptContext.ENGINE_SCOPE);
> 294
> 295 return engine;
> 296 }
> 297
> 298 @Override
>
> ** CID 157014: Null pointer dereferences (FORWARD_NULL)
> /webapp/src/main/java/org/apache/atlas/web/security/AtlasLdapAuthenticationProvider.java: 75 in org.apache.atlas.web.security.AtlasLdapAuthenticationProvider.authenticate(org.springframework.security.core.Authentication)()
>
>
> ________________________________________________________________________________________________________
> *** CID 157014: Null pointer dereferences (FORWARD_NULL)
> /webapp/src/main/java/org/apache/atlas/web/security/AtlasLdapAuthenticationProvider.java: 75 in org.apache.atlas.web.security.AtlasLdapAuthenticationProvider.authenticate(org.springframework.security.core.Authentication)()
> 69
> 70 @Override
> 71 public Authentication authenticate(Authentication authentication)
> 72 throws AuthenticationException {
> 73 try {
> 74 authentication = getLdapBindAuthentication(authentication);
> >>> CID 157014: Null pointer dereferences (FORWARD_NULL)
> >>> Comparing "authentication" to null implies that "authentication" might be null.
> 75 if (authentication != null && authentication.isAuthenticated()) {
> 76 return authentication;
> 77 } else {
> 78 authentication = getLdapAuthentication(authentication);
> 79 if (authentication != null && authentication.isAuthenticated()) {
> 80 return authentication;
>
> ** CID 157013: Null pointer dereferences (FORWARD_NULL)
> /webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java: 426 in org.apache.atlas.web.rest.EntityREST.createOrUpdate(org.apache.atlas.model.instance.AtlasEntity$AtlasEntitiesWithExtInfo)()
>
>
> ________________________________________________________________________________________________________
> *** CID 157013: Null pointer dereferences (FORWARD_NULL)
> /webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java: 426 in org.apache.atlas.web.rest.EntityREST.createOrUpdate(org.apache.atlas.model.instance.AtlasEntity$AtlasEntitiesWithExtInfo)()
> 420 @Produces(Servlets.JSON_MEDIA_TYPE)
> 421 public EntityMutationResponse createOrUpdate(AtlasEntitiesWithExtInfo entities) throws AtlasBaseException {
> 422 AtlasPerfTracer perf = null;
> 423
> 424 try {
> 425 if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
> >>> CID 157013: Null pointer dereferences (FORWARD_NULL)
> >>> Comparing "entities" to null implies that "entities" might be null.
> 426 perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "EntityREST.createOrUpdate(entityCount=" +
> 427 (entities == null || entities.getEntities() == null ? 0 : entities.getEntities().size()) + ")");
> 428 }
> 429
> 430 EntityStream entityStream = new AtlasEntityStream(entities);
> 431
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)