[
https://issues.apache.org/jira/browse/OLINGO-455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Bolz resolved OLINGO-455.
---------------------------------
Resolution: Fixed
After a look into {{org.apache.olingo.odata2.core.edm.provider}} package within
the API module there exists more classes which all should be changed (to
returning empty {{List}} instead of {{NULL}}).
However to prevent any problems which could occur by changing the behaviour of
several methods (within the API module) I decided to do a check within the
{{EdmServiceMetadataImplProv.getEntitySetInfos()}} for {{NULL}} lists.
See commit: [\[OLINGO-455\] Null check for list
access|https://git-wip-us.apache.org/repos/asf?p=olingo-odata2.git;a=commit;h=14c6dd5be84f1ef8a0fe790caee299a5b1326b47].
> Prevent NPE caused by returning NULL instead of empty Lists
> -----------------------------------------------------------
>
> Key: OLINGO-455
> URL: https://issues.apache.org/jira/browse/OLINGO-455
> Project: Olingo
> Issue Type: Bug
> Components: odata2-core
> Affects Versions: V2 2.0.0
> Reporter: Michael Bolz
> Assignee: Michael Bolz
> Priority: Minor
> Fix For: V2 2.0.1
>
>
> In several classes (e.g. {{EntityContainer}}, {{Schema}}) instead of an empty
> {{List}} a {{NULL}} value is returned.
> This causes NPEs e.g. in {{EdmServiceMetadataImplProv.getEntitySetInfos()}}
> (line *152*).
> Best practice is returning empty {{List}} instead of {{NULL}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)