mirror of https://github.com/apache/lucene.git
LUCENE-8812: disable Java 9 try-with-resources style in TestKoreanNumberFilter
Signed-off-by: Namgyu Kim <namgyu@apache.org>
This commit is contained in:
parent
5a75b8a080
commit
fe58b6f3a2
|
@ -48,9 +48,13 @@ public class TestKoreanNumberFilter extends BaseTokenStreamTestCase {
|
|||
if (is == null) {
|
||||
throw new RuntimeException("Cannot find userdict.txt in test classpath!");
|
||||
}
|
||||
Reader reader = new InputStreamReader(is, StandardCharsets.UTF_8);
|
||||
try (reader) {
|
||||
return UserDictionary.open(reader);
|
||||
try {
|
||||
try {
|
||||
Reader reader = new InputStreamReader(is, StandardCharsets.UTF_8);
|
||||
return UserDictionary.open(reader);
|
||||
} finally {
|
||||
is.close();
|
||||
}
|
||||
} catch (IOException ioe) {
|
||||
throw new RuntimeException(ioe);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue