Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
Bug in code logic
Description
If an exception occurs before the stream is closed there will be a resource leak since close() won't be called. Use try-finally pattern.
private void parse(java.io.File file, SloccountReportInterface report) throws IOException { InputStreamReader in = new InputStreamReader(new FileInputStream(file), encoding); this.parse(in, report); in.close(); }
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Status | Open [ 1 ] | In Progress [ 3 ] |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Resolved [ 5 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
Workflow | JNJira [ 153092 ] | JNJira + In-Review [ 207295 ] |
Fixed in https://github.com/mixalturek/sloccount-plugin/commit/22fe90021f243b01905e0b4c5ba6f5e03208ac9b.