adrian-wang commented on code in PR #3345:
URL: https://github.com/apache/hive/pull/3345#discussion_r900688205
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ranger/RangerRestClientImpl.java:
##########
@@ -428,10 +428,7 @@ public RangerExportPolicyList
readRangerPoliciesFromJsonFile(Path filePath,
HiveConf conf)
throws SemanticException {
RangerExportPolicyList rangerExportPolicyList = null;
Gson gsonBuilder = new
GsonBuilder().setDateFormat("yyyyMMdd-HH:mm:ss.SSS-Z").setPrettyPrinting().create();
- try {
- FileSystem fs = filePath.getFileSystem(conf);
- InputStream inputStream = fs.open(filePath);
- Reader reader = new InputStreamReader(inputStream,
Charset.forName("UTF-8"));
+ try (Reader reader = new
InputStreamReader(filePath.getFileSystem(conf).open(filePath),
Charset.forName("UTF-8"))) {
Review Comment:
@slachiewicz Thanks for your review, I've updated the patch
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]