Details
-
Bug
-
Status: Patch Available
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
Here is related code:
OutputStream out = fs.create(metadataPath);
out.write(jsonContainer.toString().getBytes("UTF-8"));
out.close();
If out.write() throws exception, out would be left unclosed.
out.close() should be enclosed in finally block.