mirror of https://github.com/apache/lucene.git
Fix some warnings with try-with-resources
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1648736 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2d422a995a
commit
994c32db1a
|
@ -129,7 +129,6 @@ public class ReutersContentSource extends ContentSource {
|
|||
while ((line = reader.readLine()) != null) {
|
||||
bodyBuf.append(line).append(' ');
|
||||
}
|
||||
reader.close();
|
||||
|
||||
addBytes(Files.size(f));
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ import org.apache.lucene.benchmark.byTask.tasks.TaskSequence;
|
|||
/**
|
||||
* Test algorithm, as read from file
|
||||
*/
|
||||
@SuppressWarnings("try")
|
||||
public class Algorithm implements AutoCloseable {
|
||||
|
||||
private TaskSequence sequence;
|
||||
|
|
|
@ -111,6 +111,7 @@ public class TestPerfTasksParse extends LuceneTestCase {
|
|||
}
|
||||
|
||||
/** Test the parsing of example scripts **/
|
||||
@SuppressWarnings("try")
|
||||
public void testParseExamples() throws Exception {
|
||||
// hackedy-hack-hack
|
||||
boolean foundFiles = false;
|
||||
|
|
|
@ -80,7 +80,6 @@ public class LikeThisQueryBuilder implements QueryBuilder {
|
|||
stopWordsSet.add(termAtt.toString());
|
||||
}
|
||||
ts.end();
|
||||
ts.close();
|
||||
} catch (IOException ioe) {
|
||||
throw new ParserException("IoException parsing stop words list in "
|
||||
+ getClass().getName() + ":" + ioe.getLocalizedMessage());
|
||||
|
|
Loading…
Reference in New Issue