]> source.dussan.org Git - jgit.git/commit
Deprecate SafeBufferedOutputStream 40/84940/4
authorShawn Pearce <spearce@spearce.org>
Sun, 13 Nov 2016 19:24:41 +0000 (11:24 -0800)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Mon, 14 Nov 2016 23:33:54 +0000 (15:33 -0800)
commit8208da2f59ca13d93bd396e2f8189b0fefdb764d
treef9dad738be25b1d733e30010665264e22bf3b803
parent3e522526229ed304aa603ed5a38298971ceea464
Deprecate SafeBufferedOutputStream

Java 8 fixed the silent flush during close issue by
FilterOutputStream (base class of BufferedOutputStream)
using try-with-resources to close the stream, getting a
behavior matching what JGit's SafeBufferedOutputStream
was doing:

  try {
    flush();
  } finally {
    out.close();
  }

With Java 8 as the minimum required version to run JGit
it is no longer necessary to override close() or have
this class. Deprecate the class, and use the JRE's version
of close.

Change-Id: Ic0584c140010278dbe4062df2e71be5df9a797b3
15 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/internal/storage/file/AbbreviationTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ConcurrentRepackTest.java
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexWriterV1.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriter.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/RebaseTodoFile.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.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