You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Tim Schmolka (JIRA)" <ji...@apache.org> on 2015/11/04 21:03:27 UTC
[jira] [Commented] (OPENNLP-815) unhandled exception
[ https://issues.apache.org/jira/browse/OPENNLP-815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14990289#comment-14990289 ]
Tim Schmolka commented on OPENNLP-815:
--------------------------------------
edited CensusDictionaryCreatorTool to fix issue
> 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
> Attachments: vcs-diff3391880537723483708.patch
>
>
> 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)