aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2018-03-13 16:11:40 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2018-03-15 06:39:57 +0900
commit3e1066d0a4460c63b7d77293959c6e548bef9a16 (patch)
treef468870902e969f396cfb5c922579ff1dd0d2bc6 /org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java
parentaa563091d5454909d46b3426e872a0f57892c578 (diff)
downloadjgit-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