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

Coverity Scan Issues Detected on 3/18

    XMLWordPrintableJSON

Details

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

    Description

      2 new defect(s) introduced to Apache Atlas found with Coverity Scan.

      New defect(s) Reported-by: Coverity Scan
      Showing 2 of 2 defect(s)

        • CID 160099: Null pointer dereferences (NULL_RETURNS)
          /repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityChangeNotifier.java: 234 in org.apache.atlas.repository.store.graph.v1.AtlasEntityChangeNotifier.updateFullTextMapping(java.lang.String, java.util.List)()

      ________________________________________________________________________________________________________

          • CID 160099: Null pointer dereferences (NULL_RETURNS)
            /repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityChangeNotifier.java: 234 in org.apache.atlas.repository.store.graph.v1.AtlasEntityChangeNotifier.updateFullTextMapping(java.lang.String, java.util.List)()
            228 LOG.warn("Unable to determine if FullText is disabled. Proceeding with FullText mapping");
            229 }
            230
            231 if (StringUtils.isEmpty(entityId) || CollectionUtils.isEmpty(classifications)) { 232 return; 233 }

            CID 160099: Null pointer dereferences (NULL_RETURNS)
            Assigning: "atlasVertex" = null return value from "findByGuid".
            234 AtlasVertex atlasVertex = AtlasGraphUtilsV1.findByGuid(entityId);
            235
            236 try

            { 237 String classificationFullText = fullTextMapperV2.getIndexTextForClassifications(entityId, classifications); 238 String existingFullText = (String) GraphHelper.getProperty(atlasVertex, Constants.ENTITY_TEXT_PROPERTY_KEY); 239 ** CID 160098: Null pointer dereferences (NULL_RETURNS) /webapp/src/main/java/org/apache/atlas/web/resources/ZipSource.java: 199 in org.apache.atlas.web.resources.ZipSource.getEntity(java.lang.String)() ________________________________________________________________________________________________________ *** CID 160098: Null pointer dereferences (NULL_RETURNS) /webapp/src/main/java/org/apache/atlas/web/resources/ZipSource.java: 199 in org.apache.atlas.web.resources.ZipSource.getEntity(java.lang.String)() 193 return null; 194 }

            195 }
            196
            197 private AtlasEntity getEntity(String guid) throws AtlasBaseException

            Unknown macro: {198 if(guidEntityJsonMap.containsKey(guid)) { CID 160098: Null pointer dereferences (NULL_RETURNS) Calling a method on null object "getEntityWithExtInfo(guid)". 199 return getEntityWithExtInfo(guid).getEntity(); 200 }201 202 return null;203 }

            204

      Attachments

        1. ATLAS-1672-Coverity Scan-3-18.patch
          2 kB
          Ashutosh Mestry

        Issue Links

          Activity

            People

              amestry Ashutosh Mestry
              amestry Ashutosh Mestry
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: