[ https://issues.apache.org/jira/browse/OLINGO-744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chandan V.A resolved OLINGO-744. -------------------------------- Resolution: Fixed Fix Version/s: V2 2.0.5 Hi, The issue is fixed with commit - http://git-wip-us.apache.org/repos/asf/olingo-odata2/commit/c0cdf8b6 Regards Chandan > 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 > Assignee: Chandan V.A > Fix For: V2 2.0.5 > > > 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)