incubator-blur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (BLUR-389) InputStream may not be closed upon return from EnqueueDataAsync#loadWords()
Date Wed, 05 Nov 2014 20:35:35 GMT
Ted Yu created BLUR-389:
---------------------------

             Summary: InputStream may not be closed upon return from EnqueueDataAsync#loadWords()
                 Key: BLUR-389
                 URL: https://issues.apache.org/jira/browse/BLUR-389
             Project: Apache Blur
          Issue Type: Bug
            Reporter: Ted Yu
            Priority: Minor


{code}
    InputStream inputStream = EnqueueDataAsync.class.getResourceAsStream("words.txt");
    BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
    String word;
    while ((word = reader.readLine()) != null) {
      words.add(word.trim());
{code}
inputStream should be closed in finally block.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message