From 60d5adaff33053d18ecfae358d32251a47cbf440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Fern=C3=A1ndez?= Date: Tue, 10 Sep 2019 11:56:58 +0000 Subject: [PATCH] [OLINGO-1395] Fixed parsing error when ReturnType contains Annotation --- .../olingo/client/core/edm/xml/ClientCsdlReturnType.java | 3 +++ .../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 d422ef27a..8ccfbdac2 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 d7072de1d..152366962 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 @@ - + + + The description for this return type + +