From lucene-dev-return-5969-apmail-jakarta-lucene-dev-archive=jakarta.apache.org@jakarta.apache.org Sun Apr 04 11:39:29 2004 Return-Path: Delivered-To: apmail-jakarta-lucene-dev-archive@www.apache.org Received: (qmail 96148 invoked from network); 4 Apr 2004 11:39:28 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 4 Apr 2004 11:39:28 -0000 Received: (qmail 44197 invoked by uid 500); 4 Apr 2004 11:39:12 -0000 Delivered-To: apmail-jakarta-lucene-dev-archive@jakarta.apache.org Received: (qmail 44162 invoked by uid 500); 4 Apr 2004 11:39:12 -0000 Mailing-List: contact lucene-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Developers List" Reply-To: "Lucene Developers List" Delivered-To: mailing list lucene-dev@jakarta.apache.org Received: (qmail 44099 invoked from network); 4 Apr 2004 11:39:12 -0000 Received: from unknown (HELO exchange.sun.com) (192.18.33.10) by daedalus.apache.org with SMTP; 4 Apr 2004 11:39:12 -0000 Received: (qmail 26210 invoked by uid 50); 4 Apr 2004 11:39:52 -0000 Date: 4 Apr 2004 11:39:52 -0000 Message-ID: <20040404113952.26209.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: lucene-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 28187] New: - FileInputStream never closed in HTMLParser X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=28187 FileInputStream never closed in HTMLParser Summary: FileInputStream never closed in HTMLParser Product: Lucene Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Examples AssignedTo: lucene-dev@jakarta.apache.org ReportedBy: daniel.naber@t-online.de HTMLParser.java contains this code: public HTMLParser(File file) throws FileNotFoundException { this(new FileInputStream(file)); } This FileInputStream should be closed with the close() method, as there's no guarantee that the garbage collection will run and do this for you. I don't know how to fix this without changing the API to take a FileInputStream instead of a File, as the call to this() must be the first thing in the constructor, i.e. you cannot create the stream, call this(...), and then close the stream. --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-dev-help@jakarta.apache.org