[
https://issues.apache.org/jira/browse/OLINGO-3?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13739538#comment-13739538
]
Sergey Beryozkin commented on OLINGO-3:
---------------------------------------
Yes, an empty list would be nicer, there is some inconsistency at HttpHeaders
level, some methods return empty lists, but some - will return null. It's not
2.0 specific, it was in 1.1 too, it is just CXF 2.7.x returns an empty list in
all the cases
> NPE guard for missing Accept headers
> ------------------------------------
>
> Key: OLINGO-3
> URL: https://issues.apache.org/jira/browse/OLINGO-3
> Project: Olingo
> Issue Type: Bug
> Components: odata2-core
> Environment: 1.0.0-SNAPSHOT
> Reporter: Aki Yoshida
> Priority: Minor
> Fix For: 1.0.0
>
> Attachments: odata-core-20130814.patch
>
>
> org.apache.olingo.odata2.core.rest.RestUtil's extractAcceptHeaders is not
> guarding against an NPE for the missing accept headers.
> cxf-2.7.x currently returns an empty list in this case, therefore it does not
> lead to an issue. However, the correct behavior is to return a null in this
> case.
> https://java.net/jira/browse/JAX_RS_SPEC-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=359530#action_359530
> Therefore, the above method should guard against an NPE for the acceptHeaders
> variable being null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira