Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-1663

Fix defects reported by Coverity Scan

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0
    • 0.8.1, 1.0.0
    • atlas-core
    • None

    Description

      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

      Attachments

        1. ATLAS-1663.1.patch
          2 kB
          Sarath Subramanian

        Activity

          People

            sarath Sarath Subramanian
            sarath Sarath Subramanian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: