diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2018-03-13 16:11:40 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2018-03-15 06:39:57 +0900 |
commit | 3e1066d0a4460c63b7d77293959c6e548bef9a16 (patch) | |
tree | f468870902e969f396cfb5c922579ff1dd0d2bc6 /org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java | |
parent | aa563091d5454909d46b3426e872a0f57892c578 (diff) | |
download | jgit-3e1066d0a4460c63b7d77293959c6e548bef9a16.tar.gz jgit-3e1066d0a4460c63b7d77293959c6e548bef9a16.zip |
Add SilentFileInputStream to allow ignoring exceptions raised by close()
There are several cases where a FileInputStream is opened outside of
a try-with-resource because we want to explicitly close it and ignore
any IOException that is raised by the close() method.
Introduce a helper class, SilentFileInputStream, that overrides the
close method and ignores the exceptions. This allows to open the stream
in a try-with-resource block and remove the explicit handling of the
close method.
Change-Id: I8612f948a1a5b3d1031344922ad75ce4492cfc61
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java')
0 files changed, 0 insertions, 0 deletions