Skip to content

Commit

Permalink
[OLINGO-1167] Reference with fully qualified name
Browse files Browse the repository at this point in the history
  • Loading branch information
ammerzon authored and mibo committed Oct 13, 2023
1 parent 1cb2907 commit ce5028d
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,15 @@ private EdmTypeInfo(final Edm edm, final String typeExpression, final boolean in

fullQualifiedName = new FullQualifiedName(namespace, typeName);

primitiveType = EdmPrimitiveTypeKind.getByName(typeName);
try {
if (namespace.equals("Edm")) {
primitiveType = EdmPrimitiveTypeKind.valueOf(typeName);
} else {
primitiveType = EdmPrimitiveTypeKind.valueOf(namespace + "." + typeName);
}
} catch (final IllegalArgumentException e) {
primitiveType = null;
}

if (primitiveType == null && edm != null) {
typeDefinition = edm.getTypeDefinition(fullQualifiedName);
Expand Down

0 comments on commit ce5028d

Please sign in to comment.