You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Christian Amend (JIRA)" <ji...@apache.org> on 2015/10/22 16:55:27 UTC
[jira] [Resolved] (OLINGO-784) NPE in EdmPropertyImpl:43
[ https://issues.apache.org/jira/browse/OLINGO-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Amend resolved OLINGO-784.
------------------------------------
Resolution: Fixed
Assignee: Christian Amend
Fix Version/s: (Java) V4 4.1.0
Fixed with commit: https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=17e4a3aeffb892667e670b71f303ea2b5522bd06
Also in accordance with the lazy loading concept the type info object will now only be instantiated if needed.
> NPE in EdmPropertyImpl:43
> -------------------------
>
> Key: OLINGO-784
> URL: https://issues.apache.org/jira/browse/OLINGO-784
> Project: Olingo
> Issue Type: Improvement
> Components: odata4-server
> Affects Versions: (Java) V4 4.1.0
> Reporter: Michael van der Gulik
> Assignee: Christian Amend
> Priority: Trivial
> Fix For: (Java) V4 4.1.0
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> {code}
> typeInfo = new EdmTypeInfo.Builder().setEdm(edm).setTypeExpression(property.getType().toString()).build();
> {code}
> will fail with a NullPointerException if the developer forgets to set property.type.
> It would be nice to include:
> {code}
> if(null==property.getType()) {
> throw new NullPointerException("Property has no type");
> }
> {code}
> This way the dev gets an error message.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)