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
|
||||
|
||||
* 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)
|
||||
|
||||
|
|
|
@ -605,8 +605,8 @@ public final class FST<T> implements Accountable {
|
|||
* 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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue