]> source.dussan.org Git - jgit.git/commit
Make sure all bytes are written to files on close, or get an error. 41/4841/3
authorRobin Rosenberg <robin.rosenberg@dewire.com>
Sun, 15 Jan 2012 10:22:52 +0000 (11:22 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Sun, 15 Jan 2012 10:22:52 +0000 (11:22 +0100)
commite875c905d310153165c5bdb24ead55d98596923a
treeb247debd7c714838109a23a0f103dc1a17a54de4
parent02729810f9246b9f332945f730d65c68f118d489
Make sure all bytes are written to files on close, or get an error.

Java's BufferedOutputStream swallows any errors that occur when flushing
the buffer in close().

This class overrides close to make sure an error during the final
flush is reported back to the caller.

Change-Id: I74a82b31505fadf8378069c5f6554f1033c28f9b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
13 files changed:
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/AbbreviationTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/ConcurrentRepackTest.java
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackIndexWriter.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonClient.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkPushConnection.java
org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java
org.eclipse.jgit/src/org/eclipse/jgit/util/io/SafeBufferedOutputStream.java [new file with mode: 0644]