[
https://issues.apache.org/jira/browse/CXF-5406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergey Beryozkin resolved CXF-5406.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.7.9
3.0.0-milestone1
Assignee: Sergey Beryozkin
> ClassCastException in AtomPojoProvider when an Atom entry is returned with a
> media-type of application/atom+xml (no type parameter)
> -----------------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-5406
> URL: https://issues.apache.org/jira/browse/CXF-5406
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.7.7
> Reporter: Dale Peakall
> Assignee: Sergey Beryozkin
> Fix For: 3.0.0-milestone1, 2.7.9
>
>
> According to RFC5023 (section 12) a server SHOULD return a type parameter on
> the media-type when returning an Atom Entry (e.g.
> application/atom+xml;type=entry). However, it is not mandatory that the
> server do this and RFC5023 states:
> {quote}
> If not specified, the type is assumed to be unspecified, requiring
> Atom processors to examine the root element to determine the type of
> Atom document.
> {quote}
> However, AtomPojoProvider simply assumes that when no type parameter is
> present that the content is a feed and throws a ClassCastException when it
> ends up trying to cast the Entry returned by Abdera into a Feed.
> Also AtomPojoProvider's check on the type parameter value is case-senstitive
> where RFC5023 states that:
> {quote}
> Neither the parameter name nor its value are case sensitive.
> {quote}
>
--
This message was sent by Atlassian JIRA
(v6.1#6144)