mirror of https://github.com/apache/lucene.git
FST.save can truncate output (BufferedOutputStream may be closed after the underlying stream)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1668551 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e893b4dd54
commit
425c57b22f
|
@ -64,6 +64,9 @@ New Features
|
||||||
|
|
||||||
Bug Fixes
|
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.
|
* LUCENE-6249: StandardQueryParser doesn't support pure negative clauses.
|
||||||
(Dawid Weiss)
|
(Dawid Weiss)
|
||||||
|
|
||||||
|
|
|
@ -605,8 +605,8 @@ public final class FST<T> implements Accountable {
|
||||||
* Writes an automaton to a file.
|
* Writes an automaton to a file.
|
||||||
*/
|
*/
|
||||||
public void save(final Path path) throws IOException {
|
public void save(final Path path) throws IOException {
|
||||||
try (OutputStream os = Files.newOutputStream(path)) {
|
try (OutputStream os = new BufferedOutputStream(Files.newOutputStream(path))) {
|
||||||
save(new OutputStreamDataOutput(new BufferedOutputStream(os)));
|
save(new OutputStreamDataOutput(os));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue