You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Peter Kelley reported this issue through the mailinglist on 2013-03-09:
I'm having some issues with SimpleClassifier holding files open after it
completes which is messing up my file processing pipeline. I think that the
offending method is ClassifyUtils.getContent() which has the following source:
/**
* INTERNAL:
*/
public class ClassifyUtils {
public static byte[] getContent(String file_or_url) {
File file = new File(file_or_url);
if (file.exists()) {
try {
return StreamUtils.read(new FileInputStream(file));
} catch (IOException e) {
// ignore
}
}
// try file_or_url as URL
return null;
}
Note that the file is never closed. Would it be possible to amend this method
to close the file after it has finished?
Original issue reported on code.google.com by p.kruijsen on 12 Jul 2013 at 8:01
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
p.kruijsen
on 12 Jul 2013 at 8:01The text was updated successfully, but these errors were encountered: