Skip to content

Commit

Permalink
Fixed Object/Property bug in CC LookupFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
fickludd committed Mar 21, 2017
1 parent dad9a81 commit 4f82e15
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -27,6 +27,8 @@
import org.neo4j.cursor.Cursor; import org.neo4j.cursor.Cursor;
import org.neo4j.kernel.api.exceptions.EntityNotFoundException; import org.neo4j.kernel.api.exceptions.EntityNotFoundException;
import org.neo4j.kernel.api.index.PropertyAccessor; import org.neo4j.kernel.api.index.PropertyAccessor;
import org.neo4j.kernel.api.properties.DefinedProperty;
import org.neo4j.kernel.api.properties.Property;
import org.neo4j.kernel.api.schema_new.IndexQuery; import org.neo4j.kernel.api.schema_new.IndexQuery;
import org.neo4j.kernel.impl.api.operations.EntityOperations; import org.neo4j.kernel.impl.api.operations.EntityOperations;
import org.neo4j.storageengine.api.NodeItem; import org.neo4j.storageengine.api.NodeItem;
Expand Down Expand Up @@ -61,12 +63,13 @@ public static PrimitiveLongIterator exactIndexMatches( PropertyAccessor accessor
{ {
LongPredicate combinedPredicate = nodeId -> LongPredicate combinedPredicate = nodeId ->
{ {
try { try
{
for ( IndexQuery predicate : numericPredicates ) for ( IndexQuery predicate : numericPredicates )
{ {
int propertyKeyId = predicate.propertyKeyId(); int propertyKeyId = predicate.propertyKeyId();
Object value = accessor.getProperty( nodeId, propertyKeyId ); Property property = accessor.getProperty( nodeId, propertyKeyId );
if ( !predicate.test( value ) ) if ( property.isDefined() && !predicate.test( ((DefinedProperty)property).value() ) )
{ {
return false; return false;
} }
Expand Down

0 comments on commit 4f82e15

Please sign in to comment.