[ https://issues.apache.org/jira/browse/OLINGO-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Bonk updated OLINGO-1263: -------------------------------- Description: If you try to filter an entity set with the filter {{$filter=()}}, HTTP Status Code 500 and the error message <?xml version='1.0' encoding='UTF-8'?> <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <code/> <message xml:lang="en">while trying to invoke the method org.apache.olingo.odata2.api.uri.expression.CommonExpression.getKind() of a null object loaded from local variable 'leftNode'</message> </error> is returned. Expected behaviour: Either return HTTP Status Code 400 with an error message like "Invalid filter expression '()'" or return HTTP Status Code 200 with the unfiltered entity set. How to reproduce: Create the my-car-service sample: mvn archetype:generate \ -DinteractiveMode=false \ -Dversion=1.0.0-SNAPSHOT \ -DgroupId=com.sample \ -DartifactId=my-car-service \ -DarchetypeGroupId=org.apache.olingo \ -DarchetypeArtifactId=olingo-odata2-sample-cars-annotation-archetype \ -DarchetypeVersion=RELEASE Deploy the service and do a request using the URL http://<hostname>:<port>//my-car-service/CarService.svc/Cars?$filter=() was: If you try to filter an entity set with the filter }}{{$filter=()}}, HTTP Status Code 500 and the error message <?xml version='1.0' encoding='UTF-8'?> <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <code/> <message xml:lang="en">while trying to invoke the method org.apache.olingo.odata2.api.uri.expression.CommonExpression.getKind() of a null object loaded from local variable 'leftNode'</message> </error> is returned. Expected behaviour: Either return HTTP Status Code 400 with an error message like "Invalid filter expression '()'" or return HTTP Status Code 200 with the unfiltered entity set. How to reproduce: Create the my-car-service sample: mvn archetype:generate \ -DinteractiveMode=false \ -Dversion=1.0.0-SNAPSHOT \ -DgroupId=com.sample \ -DartifactId=my-car-service \ -DarchetypeGroupId=org.apache.olingo \ -DarchetypeArtifactId=olingo-odata2-sample-cars-annotation-archetype \ -DarchetypeVersion=RELEASE Deploy the service and do a request using the URL http://<hostname>:<port>//my-car-service/CarService.svc/Cars?$filter=() > $filter=() returns HTTP status 500 > ---------------------------------- > > Key: OLINGO-1263 > URL: https://issues.apache.org/jira/browse/OLINGO-1263 > Project: Olingo > Issue Type: Bug > Components: odata2-core > Affects Versions: V2 2.0.10, V2 2.0.11 > Environment: Any environment > Reporter: Thomas Bonk > Priority: Major > > If you try to filter an entity set with the filter {{$filter=()}}, HTTP > Status Code 500 and the error message > <?xml version='1.0' encoding='UTF-8'?> > <error > xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> > <code/> > <message xml:lang="en">while trying to invoke the method > org.apache.olingo.odata2.api.uri.expression.CommonExpression.getKind() of a > null object loaded from local variable 'leftNode'</message> > </error> > is returned. > > Expected behaviour: > Either return HTTP Status Code 400 with an error message like "Invalid filter > expression '()'" or return HTTP Status Code 200 with the unfiltered entity > set. > How to reproduce: > Create the my-car-service sample: > mvn archetype:generate \ > -DinteractiveMode=false \ > -Dversion=1.0.0-SNAPSHOT \ > -DgroupId=com.sample \ > -DartifactId=my-car-service \ > -DarchetypeGroupId=org.apache.olingo \ > -DarchetypeArtifactId=olingo-odata2-sample-cars-annotation-archetype \ > -DarchetypeVersion=RELEASE > Deploy the service and do a request using the URL > http://<hostname>:<port>//my-car-service/CarService.svc/Cars?$filter=() -- This message was sent by Atlassian JIRA (v7.6.3#76005)