Commit 38297a84 by apoorvnaik Committed by Madhan Neethiraj

ATLAS-1997: fix to avoid NPE while getting vertex_indices

parent eb5d6fcd
......@@ -263,17 +263,19 @@ public class GraphBackedSearchIndexer implements SearchIndexer, ActiveStateChang
}
if (management != null) {
recomputeIndexedKeys = false;
AtlasGraphIndex vertexIndex = management.getGraphIndex(Constants.VERTEX_INDEX);
Set<String> indexKeys = new HashSet<>();
if (vertexIndex != null) {
recomputeIndexedKeys = false;
for (AtlasPropertyKey fieldKey : vertexIndex.getFieldKeys()) {
indexKeys.add(fieldKey.getName());
}
Set<String> indexKeys = new HashSet<>();
vertexIndexKeys = indexKeys;
for (AtlasPropertyKey fieldKey : vertexIndex.getFieldKeys()) {
indexKeys.add(fieldKey.getName());
}
vertexIndexKeys = indexKeys;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment