rubenada commented on code in PR #5221:
URL: https://github.com/apache/calcite/pull/5221#discussion_r3861208403
##########
core/src/main/java/org/apache/calcite/model/ModelHandler.java:
##########
@@ -114,12 +124,48 @@ public ModelHandler(SchemaPlus rootSchema, String uri,
root = mapper.readValue(inline, JsonRoot.class);
} else {
mapper = uri.endsWith(".yaml") || uri.endsWith(".yml") ? YAML_MAPPER :
JSON_MAPPER;
- root = mapper.readValue(new File(uri), JsonRoot.class);
+ try {
+ root = mapper.readValue(modelFile(uri), JsonRoot.class);
+ } catch (IOException e) {
Review Comment:
Good point. New generic catch block added, just in case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]