You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Andreas Pfenninger (JIRA)" <ji...@apache.org> on 2015/08/03 13:11:04 UTC
[jira] [Created] (OLINGO-744) Bug in Function Imports: nullable
parameters not supported
Andreas Pfenninger created OLINGO-744:
-----------------------------------------
Summary: Bug in Function Imports: nullable parameters not supported
Key: OLINGO-744
URL: https://issues.apache.org/jira/browse/OLINGO-744
Project: Olingo
Issue Type: Bug
Components: odata2-jpa
Affects Versions: V2 2.0.4
Reporter: Andreas Pfenninger
The OLingo framework seems not to allow optional parameters, e.g. for the following function:
{code:xml}
<FunctionImport Name="Function" ReturnType="Collection(PU.Foo)" EntitySet="Foos" m:HttpMethod="GET">
<Parameter Name="param1" Type="Edm.String" Nullable="true"
<Parameter Name="param2" Type="Edm.Int64"
</FunctionImport>
{code}
Annotation: {code:java}
@EdmFunctionImportParameter(name = "param1", facets = @EdmFacets(nullable = true))
{code}
Even though parameter "param1" has the attribute Nullable="true", OLingo throws a NullPointerException if that parameter is not passed in the query:
{code}test.svc/Function?param2=3{code}
The desired behavior is a function with optional query parameter "param1".
Root cause is a bug in JPAFunctionContext.java:
- line 97: arguments array in method "getAruguments" initialized with wrong size
- line 119: Missing null check in method "convertArguement"
It would be very much appreciated if you could fix the bug in a future release.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)