This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 124129 [details] Proposed patch It is better to close FileInputStream, FileOutputStream, Statement and ResultSet directly and do not rely on their finalizers. I run Findbugs against netbeans main repository to find cases, where the resources are not closed properly. Attached patch fixes all the cases (except test sources) found by Findbugs. Please review the changes.
Created attachment 124130 [details] Proposed patch
Created attachment 124131 [details] Proposed patch
libs/freemarker fix seems OK. Arch.java change is OK. ParseManifest.java is OK. junit/Manager.java was probably wrong to begin with - it should not swallow the exception and at least report it.
db.* fixes are OK. Thank you.
git/* fixes are OK. The git client closes the stream itself but closing a FOS twice does not do any harm.
All the patches for Java
All the patches for Java & Editor are OK. Here is the list of review classes: j2me.cdc.project/src/org/netbeans/modules/j2me/cdc/project/ui/wizards/ImportCDCProjectWizardIterator.java java.hints.test/src/org/netbeans/modules/java/hints/test/api/HintTest.java javafx2.scenebuilder/src/org/netbeans/modules/javafx2/scenebuilder/impl/SBHomeFactory.java mobility.plugins.mpowerplayer/src/org/netbeans/modules/mobility/plugins/mpowerplayer/MPowerPlayerPlatformConfigurator.java o.apache.tools.ant.module.docs/antsrc/MakeManual.java
coherence.*, web.core fixes are OK
websvc.* fixes are OK.
Jboss seems to be ok. Tomasi please take a look at j2ee.sun.appsrv*
subversion.* OK jira...AttachmentsPanel.java - OK, although the stream is always closed inside the called method - it's noted in its javadoc. But closing twice does no harm bugtracking.* - OK bugzilla.* - OK Thanks, Tomasi
Thanks a lot for review. Fixed in profiler-main changeset: 233709:12e78ec41d36 user: Tomas Hurka <thurka@netbeans.org> date: Thu Sep 20 14:33:52 2012 +0200 summary: bugfix #218094, close open resources detected by findbugs
Integrated into 'main-golden', will be available in build *201209220001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/12e78ec41d36 User: Tomas Hurka <thurka@netbeans.org> Log: bugfix #218094, close open resources detected by findbugs