olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject olingo-odata2 git commit: [OLINGO-1301] Fix for metadata redefine
Date Tue, 16 Oct 2018 19:09:12 GMT
Repository: olingo-odata2
Updated Branches:
  refs/heads/master efff5d910 -> d32a900a4


[OLINGO-1301] Fix for metadata redefine


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata2/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata2/commit/d32a900a
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata2/tree/d32a900a
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata2/diff/d32a900a

Branch: refs/heads/master
Commit: d32a900a45e77ae41eeb6962755cda0e6452d3be
Parents: efff5d9
Author: mibo <mibo@apache.org>
Authored: Mon Oct 15 22:04:02 2018 +0200
Committer: mibo <mibo@apache.org>
Committed: Tue Oct 16 21:04:41 2018 +0200

----------------------------------------------------------------------
 .../processor/core/access/model/JPAEdmMappingModelService.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/d32a900a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/model/JPAEdmMappingModelService.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/model/JPAEdmMappingModelService.java
b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/model/JPAEdmMappingModelService.java
index 846ecbd..69153ec 100644
--- a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/model/JPAEdmMappingModelService.java
+++ b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/model/JPAEdmMappingModelService.java
@@ -218,8 +218,9 @@ public class JPAEdmMappingModelService implements JPAEdmMappingModelAccess
{
     if (mappingModelStream != null) {
       return mappingModelStream;
     }
-    return JPAEdmMappingModelService.class.getClassLoader().getResourceAsStream("../../"
+ mappingModelName);
-
+    ClassLoader classLoader = JPAEdmMappingModelService.class.getClassLoader();
+    InputStream modelStream = classLoader.getResourceAsStream("../../" + mappingModelName);
+    return (modelStream != null) ? modelStream : classLoader.getResourceAsStream(mappingModelName);
   }
 
   @Override


Mime
View raw message