opennlp-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joern Kottmann (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OPENNLP-527) No way to close FileEventStreams
Date Wed, 25 Jul 2012 21:26:35 GMT

     [ https://issues.apache.org/jira/browse/OPENNLP-527?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Joern Kottmann updated OPENNLP-527:
-----------------------------------

    Component/s:     (was: OpenNLP ML)
                 Maxent
    
> No way to close FileEventStreams
> --------------------------------
>
>                 Key: OPENNLP-527
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-527
>             Project: OpenNLP
>          Issue Type: Bug
>          Components: Maxent
>    Affects Versions: maxent-3.0.2-incubating
>            Reporter: Steven Bethard
>         Attachments: FileEventStream.close.patch, FileEventStream.close.patch
>
>
> So I noticed this bug because RealValueFileEventStream.main does not close the EventStream
that it opens, leaving a new file open every time it is called.
> I thought I could work around this by inlining the RealValueFileEventStream.main code,
but it turns out that RealValueFileEventStream doesn't have a close method so there's nothing
you can do. It's superclass, FileEventStream, opens up a FileInputStream, but doesn't expose
that in any way.
> So, as far as I can tell, there's no way to close one of these event streams.
> I think the simplest solution would be to add a .close() method to FileEventStream (and
have it implement java.io.Closeable). Then RealValueFileEventStream would inherit that method.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message