Repository: olingo-odata4 Updated Branches: refs/heads/master 263e42802 -> 098ed145d
[OLINGO-340] Fix Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/15f7de8f Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/15f7de8f Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/15f7de8f Branch: refs/heads/master Commit: 15f7de8f6c75f3dd179a9e68037983fa2fa57b84 Parents: 263e428 Author: Francesco Chicchiriccò <--global> Authored: Fri Jul 4 11:09:42 2014 +0200 Committer: Francesco Chicchiriccò <--global> Committed: Fri Jul 4 11:09:42 2014 +0200 ---------------------------------------------------------------------- .../org/apache/olingo/client/core/edm/EdmEnumTypeImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/15f7de8f/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEnumTypeImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEnumTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEnumTypeImpl.java index 4a76953..cc29e06 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEnumTypeImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEnumTypeImpl.java @@ -62,11 +62,12 @@ public class EdmEnumTypeImpl extends AbstractEdmEnumType implements EdmEnumType if (xmlEnumType.getUnderlyingType() == null) { this.underlyingType = EdmPrimitiveTypeFactory.getInstance(EdmPrimitiveTypeKind.Int32); } else { - this.underlyingType = EdmPrimitiveTypeFactory.getInstance( - EdmPrimitiveTypeKind.valueOfFQN(version, xmlEnumType.getUnderlyingType())); - if (!ArrayUtils.contains(VALID_UNDERLYING_TYPES, this.underlyingType.getKind())) { - throw new EdmException("Not allowed as underlying type: " + this.underlyingType.getKind()); + final EdmPrimitiveTypeKind underlyingTipeKind = + EdmPrimitiveTypeKind.valueOfFQN(version, xmlEnumType.getUnderlyingType()); + if (!ArrayUtils.contains(VALID_UNDERLYING_TYPES, underlyingTipeKind)) { + throw new EdmException("Not allowed as underlying type: " + underlyingTipeKind); } + this.underlyingType = EdmPrimitiveTypeFactory.getInstance(underlyingTipeKind); } final List<? extends Member> xmlMembers = xmlEnumType.getMembers();
