You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2015/03/23 09:46:35 UTC
svn commit: r1668549 - in /lucene/dev/branches/branch_5x/lucene: CHANGES.txt
core/src/java/org/apache/lucene/util/fst/FST.java
Author: dweiss
Date: Mon Mar 23 08:46:35 2015
New Revision: 1668549
URL: http://svn.apache.org/r1668549
Log:
FST.save can truncate output (BufferedOutputStream may be closed after the underlying stream)
Modified:
lucene/dev/branches/branch_5x/lucene/CHANGES.txt
lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/fst/FST.java
Modified: lucene/dev/branches/branch_5x/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/CHANGES.txt?rev=1668549&r1=1668548&r2=1668549&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/lucene/CHANGES.txt Mon Mar 23 08:46:35 2015
@@ -32,6 +32,9 @@ New Features
Bug Fixes
+* LUCENE-6368: FST.save can truncate output (BufferedOutputStream may be closed
+ after the underlying stream). (Ippei Matsushima via Dawid Weiss)
+
* LUCENE-6249: StandardQueryParser doesn't support pure negative clauses.
(Dawid Weiss)
Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/fst/FST.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/fst/FST.java?rev=1668549&r1=1668548&r2=1668549&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/fst/FST.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/fst/FST.java Mon Mar 23 08:46:35 2015
@@ -605,8 +605,8 @@ public final class FST<T> implements Acc
* Writes an automaton to a file.
*/
public void save(final Path path) throws IOException {
- try (OutputStream os = Files.newOutputStream(path)) {
- save(new OutputStreamDataOutput(new BufferedOutputStream(os)));
+ try (OutputStream os = new BufferedOutputStream(Files.newOutputStream(path))) {
+ save(new OutputStreamDataOutput(os));
}
}