You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "songwanging (JIRA)" <ji...@apache.org> on 2015/09/10 18:34:45 UTC

[jira] [Created] (OPENNLP-815) unhandled exception

songwanging created OPENNLP-815:
-----------------------------------

             Summary: unhandled exception
                 Key: OPENNLP-815
                 URL: https://issues.apache.org/jira/browse/OPENNLP-815
             Project: OpenNLP
          Issue Type: Bug
    Affects Versions: tools-1.5.3
            Reporter: songwanging
            Priority: Minor


In method run() of class CensusDictionaryCreatorTool(opennlp-tools\src\main\java\opennlp\tools\cmdline\namefind\CensusDictionaryCreatorTool.java)

The catch block in the following code snippet, caught an IOException, while it performs no actions to handle its expected exception, which makes
itself useless. 

To fix this bug, developers should add more code into the catch block to handle this exception.
 try {
  ...
    } finally {
      try {
        sampleStream.close();
      } catch(IOException e) {
        // sorry this can fail..
      }
    }
 ...
}



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