diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmProviderImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmProviderImpl.java index abd17da87..bf5ea7d68 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmProviderImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmProviderImpl.java @@ -86,9 +86,10 @@ public class EdmProviderImpl extends AbstractEdm { try { CsdlEntityContainerInfo entityContainerInfo = provider.getEntityContainerInfo(containerName); if (entityContainerInfo != null) { - addEntityContainerAnnotations(provider.getEntityContainer(), entityContainerInfo.getContainerName()); + CsdlEntityContainer entityContainer = provider.getEntityContainer(); + addEntityContainerAnnotations(entityContainer, entityContainerInfo.getContainerName()); return new EdmEntityContainerImpl(this, provider, entityContainerInfo.getContainerName(), - provider.getEntityContainer()); + entityContainer); } return null; } catch (ODataException e) {