From 29e2833541052c895490a1bb85ba8db2eeb6e1c6 Mon Sep 17 00:00:00 2001 From: Christian Amend Date: Tue, 14 Apr 2015 18:09:37 +0200 Subject: [PATCH] [OLINGO-613] break when property or link is found --- .../olingo/commons/core/domain/ODataComplexValueImpl.java | 1 + .../org/apache/olingo/commons/core/domain/ODataEntityImpl.java | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataComplexValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataComplexValueImpl.java index b862b71ed..677d34b78 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataComplexValueImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataComplexValueImpl.java @@ -111,6 +111,7 @@ public class ODataComplexValueImpl extends AbstractODataValue implements ODataCo for (ODataLink link : links) { if (name.equals(link.getName())) { result = link; + break; } } diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataEntityImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataEntityImpl.java index ab6ddec15..f3bbe0c6b 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataEntityImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataEntityImpl.java @@ -111,6 +111,7 @@ public class ODataEntityImpl extends AbstractODataPayload implements ODataEntit for (ODataOperation operation : operations) { if (title.equals(operation.getTitle())) { result = operation; + break; } } @@ -136,6 +137,7 @@ public class ODataEntityImpl extends AbstractODataPayload implements ODataEntit for (ODataProperty property : getProperties()) { if (name.equals(property.getName())) { result = property; + break; } } } @@ -177,6 +179,7 @@ public class ODataEntityImpl extends AbstractODataPayload implements ODataEntit for (ODataLink link : links) { if (name.equals(link.getName())) { result = link; + break; } }