[ 
https://issues.apache.org/jira/browse/OLINGO-463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14174658#comment-14174658
 ] 

David A. Ventimiglia commented on OLINGO-463:
---------------------------------------------

Example code that provokes the problem

{code:java}
        EntityType e = new EntityType();
        e.setDocumentation(new Documentation());
{code}

Create entities like these, with Documentation elements that lack a 
LongDescription and/or Summary, add them to your Schema, then request the Atom 
XML metadata document, and you will get this NPE.


> Olingo Java V2 and EntityType.Documentation rendering problem
> -------------------------------------------------------------
>
>                 Key: OLINGO-463
>                 URL: https://issues.apache.org/jira/browse/OLINGO-463
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-core
>    Affects Versions: V2 2.0.0
>            Reporter: David A. Ventimiglia
>
> In Olingo Java V2, the class 
> org.apache.olingo.odata2.core.ep.producer.XmlMetadataProducer has the method 
> writeDocumentation, and in that method on line 582 (at least in the source 
> that I downloaded), it calls writeCharacters in the class 
> javax.xml.stream.XMLStreamWriter and passes in 
> documentation.getLongDescription without anticipating the possibility taht 
> the longDescription will be null.  I think this is a bug, because the OData 
> v2.0 spec says that a Documentation element CAN specify a LongDescription, no 
> that it MUST specify a LongDescription.  Likewise with the Summary.  I could 
> be wrong about this, but as far as I can tell, this is a bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to