Browse Source
The runProcess method creates an OutputStream that is not managed by a try-with-resource because it's manually closed and any IOException raised by the close() method is explicitly ignored. Suppress the resource warning with an explanatory comment. Enclose the call to StreamGobbler#copy in an inner try-block, and move the call to close() inside its finally block. This prevents the stream from being left unclosed if StreamGobbler#copy raises IOException. Change-Id: Idca9adfc4d87e0989d787ad8239c055c0c849814 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>stable-5.0
David Pursehouse
7 years ago
committed by
Matthias Sohn
1 changed files with 15 additions and 11 deletions
Loading…
Reference in new issue