You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Chandan V.A (JIRA)" <ji...@apache.org> on 2015/08/06 07:49:04 UTC

[jira] [Assigned] (OLINGO-744) Bug in Function Imports: nullable parameters not supported

     [ https://issues.apache.org/jira/browse/OLINGO-744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chandan V.A reassigned OLINGO-744:
----------------------------------

    Assignee: Chandan V.A

> 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
>
> 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)