You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2015/08/18 14:52:23 UTC
[2/2] olingo-odata4 git commit: [OLINGO-487] Make property name known
for proxy error case
[OLINGO-487] Make property name known for proxy error case
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/e79f6283
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/e79f6283
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/e79f6283
Branch: refs/heads/master
Commit: e79f628386c300ae014d1ad4aefcaca76ad425de
Parents: 7df31c5
Author: Christian Amend <ch...@sap.com>
Authored: Tue Aug 18 14:51:21 2015 +0200
Committer: Christian Amend <ch...@sap.com>
Committed: Tue Aug 18 14:51:21 2015 +0200
----------------------------------------------------------------------
.../java/org/apache/olingo/ext/pojogen/AbstractUtility.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e79f6283/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/AbstractUtility.java
----------------------------------------------------------------------
diff --git a/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/AbstractUtility.java b/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/AbstractUtility.java
index 7e0dbdd..c94129b 100644
--- a/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/AbstractUtility.java
+++ b/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/AbstractUtility.java
@@ -140,19 +140,19 @@ public abstract class AbstractUtility {
return getNavigationBindings(sourceEntityType, property);
} catch (Exception e) {
// maybe source entity type without entity set ...
- return getNavigationBindings(property.getType());
+ return getNavigationBindings(property.getType(), property.getName());
}
}
- private NavPropertyBindingDetails getNavigationBindings(final EdmStructuredType type) {
+ private NavPropertyBindingDetails getNavigationBindings(final EdmStructuredType type, String propertyName) {
if (type == null) {
- throw new IllegalStateException("Invalid navigation property");
+ throw new IllegalStateException("No EntitySet defined. Invalid navigation property: " + propertyName);
}
try {
return new NavPropertyBindingDetails(edm, type);
} catch (IllegalStateException ignore) {
- return getNavigationBindings(type.getBaseType());
+ return getNavigationBindings(type.getBaseType(), propertyName);
}
}