This is an automated email from the ASF dual-hosted git repository.

mibo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/olingo-odata4.git


The following commit(s) were added to refs/heads/master by this push:
     new 60d5ada  [OLINGO-1395] Fixed parsing error when ReturnType contains 
Annotation
     new a110e09  Merge pull request #55 from danielfernandez/olingo-1395
60d5ada is described below

commit 60d5adaff33053d18ecfae358d32251a47cbf440
Author: Daniel Fernández <[email protected]>
AuthorDate: Tue Sep 10 11:56:58 2019 +0000

    [OLINGO-1395] Fixed parsing error when ReturnType contains Annotation
---
 .../org/apache/olingo/client/core/edm/xml/ClientCsdlReturnType.java | 3 +++
 .../src/test/resources/org/apache/olingo/client/core/$metadata.xml  | 6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git 
a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlReturnType.java
 
b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlReturnType.java
index d422ef2..8ccfbda 100644
--- 
a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlReturnType.java
+++ 
b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlReturnType.java
@@ -71,6 +71,9 @@ class ClientCsdlReturnType extends CsdlReturnType implements 
Serializable {
             if (srid != null) {
               returnType.setSrid(SRID.valueOf(srid));
             }
+          } else if ("Annotation".equals(jp.getCurrentName())) {
+            jp.nextToken();
+            
returnType.getAnnotations().add(jp.readValueAs(ClientCsdlAnnotation.class));
           }
         }
       }
diff --git 
a/lib/client-core/src/test/resources/org/apache/olingo/client/core/$metadata.xml
 
b/lib/client-core/src/test/resources/org/apache/olingo/client/core/$metadata.xml
index d7072de..1523669 100644
--- 
a/lib/client-core/src/test/resources/org/apache/olingo/client/core/$metadata.xml
+++ 
b/lib/client-core/src/test/resources/org/apache/olingo/client/core/$metadata.xml
@@ -138,7 +138,11 @@
                <ReturnType 
Type="SEPMRA_SO_MAN2.I_DraftAdministrativeDataType"/>
          </Action>
          <Action Name="UARTString" IsBound="false">
-               <ReturnType Type="Edm.String"/>
+               <ReturnType Type="Edm.String">
+                       <Annotation Term="Core.Description">
+                               <String>The description for this return 
type</String>
+                       </Annotation>
+               </ReturnType>
        </Action>
          <Function Name="_FC_RTTimeOfDay_" IsBound="true" IsComposable="true">
                <Parameter Name="ParameterTimeOfDay" Type="Edm.TimeOfDay" 
Nullable="false"/>

Reply via email to