mirror of https://github.com/apache/lucene.git
LUCENE-6637: Fix FSTTester to not violate file permissions on -Dtests.verbose=true
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1688317 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7ac8dd4111
commit
4b758ee3fe
|
@ -254,6 +254,11 @@ Build
|
|||
* LUCENE-6568: Make rat invocation depend on ivy configuration being set up
|
||||
(Ramkumar Aiyengar)
|
||||
|
||||
Test Framework
|
||||
|
||||
* LUCENE-6637: Fix FSTTester to not violate file permissions on
|
||||
-Dtests.verbose=true. (Mesbah M. Alam, Uwe Schindler)
|
||||
|
||||
Changes in Backwards Compatibility Policy
|
||||
|
||||
* LUCENE-6553: The iterator returned by the LeafReader.postings method now
|
||||
|
|
|
@ -18,10 +18,9 @@ package org.apache.lucene.util.fst;
|
|||
*/
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.Writer;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
|
@ -321,10 +320,11 @@ public class FSTTester<T> {
|
|||
}
|
||||
|
||||
if (LuceneTestCase.VERBOSE && pairs.size() <= 20 && fst != null) {
|
||||
Writer w = Files.newBufferedWriter(Paths.get("out.dot"), StandardCharsets.UTF_8);
|
||||
System.out.println("Printing FST as dot file to stdout:");
|
||||
final Writer w = new OutputStreamWriter(System.out, Charset.defaultCharset());
|
||||
Util.toDot(fst, w, false, false);
|
||||
w.close();
|
||||
System.out.println("SAVED out.dot");
|
||||
w.flush();
|
||||
System.out.println("END dot file");
|
||||
}
|
||||
|
||||
if (LuceneTestCase.VERBOSE) {
|
||||
|
|
Loading…
Reference in New Issue