Safely handle closing an already closed WindowedFile
commitf8cf10124fb586f4254d96aebf4fb1fc23b5c64c
authorShawn O. Pearce <spearce@spearce.org>
Tue, 21 Apr 2009 01:21:03 +0000 (20 18:21 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Thu, 23 Apr 2009 22:25:56 +0000 (24 00:25 +0200)
treebc1832842b1d4eda214834476a053c97f54bd2f3
parent0114d4c082779d7e5f3f1a04564fc0d149d7b89a
Safely handle closing an already closed WindowedFile

If cacheOpen throws an exception (e.g. FileNotFoundException) we
may wind up in cacheClose, where the fd is null because we didn't
successfully construct the RandomAccessFile.  In such cases there
is nothing to attempt to close.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit/src/org/spearce/jgit/lib/WindowedFile.java