geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Smith (JIRA)" <>
Subject [jira] [Created] (GEODE-1881) CompactMapRangeIndex doesn't handle null map keys
Date Fri, 09 Sep 2016 22:37:20 GMT
Dan Smith created GEODE-1881:

             Summary: CompactMapRangeIndex doesn't handle null map keys
                 Key: GEODE-1881
             Project: Geode
          Issue Type: Bug
          Components: querying
            Reporter: Dan Smith

When indexing map fields that have null keys, geode throws an NPE.

Steps to reproduce:
1. Create an index on a map field eg
create index --name="idx_positions" --expression="positions[*]" --region="region"
2. Add entries with null keys in the the indexed map
entry.positions  = new HashMap()
entry.positions.put(null, "somevalue);

You will get an NPE
Caused by: java.lang.NullPointerException
	at java.util.concurrent.ConcurrentHashMap.get(
	at com.gemstone.gemfire.cache.query.internal.index.CompactMapRangeIndex.saveIndexAddition(
	at com.gemstone.gemfire.cache.query.internal.index.CompactMapRangeIndex.saveMapping(
	at com.gemstone.gemfire.cache.query.internal.index.AbstractIndex$IMQEvaluator.applyProjection(
	at com.gemstone.gemfire.cache.query.internal.index.AbstractIndex$IMQEvaluator.doNestedIterations(
	at com.gemstone.gemfire.cache.query.internal.index.AbstractIndex$IMQEvaluator.doNestedIterations(
	at com.gemstone.gemfire.cache.query.internal.index.AbstractIndex$IMQEvaluator.evaluate(
	... 44 more

This message was sent by Atlassian JIRA

View raw message