Uploaded image for project: 'Eagle (Retired)'
  1. Eagle (Retired)
  2. EAGLE-844

Potential NPE issue

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • v0.5.0
    • v0.5.0
    • Core::Query Engine
    • None

    Description

      The following file accessed on Dec 18 2016 (Github revision id: 8fe968cb7e340e2f21711b5a0f701e760cb91d59), eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseEntitySchemaManager.java, seems to have a potential null pointer exception.

      Map<String, EntityDefinition> entityServiceMap = EntityDefinitionManager.entities();
                  if (entityServiceMap != null || entityServiceMap.values() != null) {
                      for (EntityDefinition entityDefinition : entityServiceMap.values()) {
                          createTable(entityDefinition);
                      }
                  }
      

      if entityServiceMap is null, entityServiceMap.values() could have NPE.
      I have no idea if entityServiceMap can be null. Having said that, at least it could be a code smell.

      Attachments

        Issue Links

          Activity

            People

              wujinhu wujinhu
              lifove JC
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: