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

Fix coverity scan issues found in latest report

    XMLWordPrintableJSON

Details

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

    Description

        • CID 161144: Null pointer dereferences (NULL_RETURNS)
          /repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java: 267 in org.apache.atlas.discovery.EntityDiscoveryService.searchUsingBasicQuery(java.lang.String, java.lang.String, java.lang.String, int, int)()

      ________________________________________________________________________________________________________

          • CID 161144: Null pointer dereferences (NULL_RETURNS)
            /repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java: 267 in org.apache.atlas.discovery.EntityDiscoveryService.searchUsingBasicQuery(java.lang.String, java.lang.String, java.lang.String, int, int)()
            261
            262 bindings.put("startIdx", params.offset());
            263 bindings.put("endIdx", params.offset() + params.limit());
            264
            265 basicQuery += gremlinQueryProvider.getQuery(AtlasGremlinQuery.TO_RANGE_LIST);
            266
            >>> CID 161144: Null pointer dereferences (NULL_RETURNS)
            >>> Assigning: "scriptEngine" = null return value from "getGremlinScriptEngine".
            267 ScriptEngine scriptEngine = graph.getGremlinScriptEngine();
            268
            269 try {
            270 Object result = graph.executeGremlinScript(scriptEngine, bindings, basicQuery, false);
            271
            272 if (result instanceof List && CollectionUtils.isNotEmpty((List) result)) {
        • CID 161143: Null pointer dereferences (NULL_RETURNS)
          /graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0Graph.java: 329 in org.apache.atlas.repository.graphdb.titan0.Titan0Graph.executeGremlinScript(java.lang.String)()

      ________________________________________________________________________________________________________

          • CID 161143: Null pointer dereferences (NULL_RETURNS)
            /graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0Graph.java: 329 in org.apache.atlas.repository.graphdb.titan0.Titan0Graph.executeGremlinScript(java.lang.String)()
            323
            324 private Object executeGremlinScript(String gremlinQuery) throws ScriptException {
            325 Object result = null;
            326 ScriptEngine engine = getGremlinScriptEngine();
            327
            328 try { >>> CID 161143: Null pointer dereferences (NULL_RETURNS) >>> Calling a method on null object "engine". 329 Bindings bindings = engine.createBindings(); 330 331 bindings.put("g", getGraph()); 332 333 result = engine.eval(gremlinQuery, bindings); 334 }

            finally {

      Attachments

        1. ATLAS-1685.1.patch
          24 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: