You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Andreas Pfenninger <An...@rcomext.com> on 2015/07/17 13:07:50 UTC
[Olingo V2.0.4] Bug in Function Imports: nullable parameters not
supported
Hello
We are using function imports in Olingo V2.0.4 and found a bug. The OLingo framework seems not to allow optional parameters, e.g. for the following function:
<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>
Annotation: @EdmFunctionImportParameter(name = "param1", facets = @EdmFacets(nullable = true))
Even though parameter "param1" has the attribute Nullable="true", OLingo throws a NullPointerException if that parameter is not passed in the query:
test.svc/Function?param2=3
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.
Thanks and regards,
Andreas
This e-mail, including attachments, is intended for the person(s) or company named and may contain confidential and/or legally privileged information.
Unauthorized disclosure, copying or use of this information may be unlawful and is prohibited. If you are not the intended recipient, please delete this message and notify the sender.
All incoming and outgoing e-mail messages are stored in the Swiss Re Electronic Message Repository.
If you do not wish the retention of potentially private e-mails by Swiss Re, we strongly advise you not to use the Swiss Re e-mail account for any private, non-business related communications.
Re: [Olingo V2.0.4] Bug in Function Imports: nullable parameters
not supported
Posted by "Bolz, Michael" <mi...@sap.com>.
Hello Andreas,
Thanks for finding and analysing the issue.
It would be very nice when your could open an according Bug Issue in our JIRA (on https://issues.apache.org/jira/browse/OLINGO <https://issues.apache.org/jira/browse/OLINGO>).
Best regards,
Michael
> On 17 Jul 2015, at 13:07, Andreas Pfenninger <An...@rcomext.com> wrote:
>
> Hello
>
> We are using function imports in Olingo V2.0.4 and found a bug. The OLingo framework seems not to allow optional parameters, e.g. for the following function:
> <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>
>
> Annotation: @EdmFunctionImportParameter(name = "param1", facets = @EdmFacets(nullable = true))
> Even though parameter "param1" has the attribute Nullable="true", OLingo throws a NullPointerException if that parameter is not passed in the query:
>
> test.svc/Function?param2=3
>
> 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.
>
> Thanks and regards,
> Andreas
>
>
>
> This e-mail, including attachments, is intended for the person(s) or company named and may contain confidential and/or legally privileged information.
> Unauthorized disclosure, copying or use of this information may be unlawful and is prohibited. If you are not the intended recipient, please delete this message and notify the sender.
> All incoming and outgoing e-mail messages are stored in the Swiss Re Electronic Message Repository.
> If you do not wish the retention of potentially private e-mails by Swiss Re, we strongly advise you not to use the Swiss Re e-mail account for any private, non-business related communications.