View by Classes

Findings - Overview

warning Method may fail to clean up stream or resource (Findbugs)

Further info on the wiki.

This method may fail to clean up (close, dispose of) a stream, database object, or other resource requiring an explicit cleanup operation.

In general, if a method opens a stream or other resource, the method should use a try/finally block to ensure that the stream or resource is cleaned up before the method returns.

This bug pattern is essentially the same as the OS_OPEN_STREAM and ODR_OPEN_DATABASE_RESOURCE bug patterns, but is based on a different (and hopefully better) static analysis technique. We are interested is getting feedback about the usefulness of this bug pattern. To send feedback, either:

In particular, the false-positive suppression heuristics for this bug pattern have not been extensively tuned, so reports about false positives are helpful to us.

See Weimer and Necula, Finding and Preventing Run-Time Error Handling Mistakes, for a description of the analysis technique.

3org.jcoderz.phoenix.dbview.DbView
Method org.jcoderz.phoenix.dbview.DbView.dumpAllTables(File) may fail to clean up stream or resource of type java.sql.ResultSet [180],
Method org.jcoderz.phoenix.dbview.DbView.performConvertion(File, String) may fail to clean up stream or resource of type java.sql.ResultSet [309],
Method org.jcoderz.phoenix.dbview.DbView.performConvertion(String, Connection, String) may fail to clean up stream or resource of type java.sql.ResultSet [346]
2org.jcoderz.testdata.Importer
Method org.jcoderz.testdata.Importer.getConstraints(String, Properties) may fail to clean up stream or resource of type java.sql.ResultSet [724],
Method org.jcoderz.testdata.Importer.getConstraints(String, Properties) may fail to clean up stream or resource of type java.sql.Statement [723]
1org.jcoderz.phoenix.report.CoberturaReportReader
Method org.jcoderz.phoenix.report.CoberturaReportReader.parse(File) may fail to clean up stream or resource of type java.io.InputStream [87]
1org.jcoderz.phoenix.report.PmdReportReader
Method org.jcoderz.phoenix.report.PmdReportReader.parse(File) may fail to clean up stream or resource of type java.io.InputStream [92]
1org.jcoderz.guidelines.JavaCodeSnippets
Method org.jcoderz.guidelines.JavaCodeSnippets.generateSnippet(File, File) may fail to clean up stream or resource of type java.io.OutputStream [164]
1org.jcoderz.commons.taskdefs.XsltBatchProcessor
Method org.jcoderz.commons.taskdefs.XsltBatchProcessor.safeMove(File, File) may fail to clean up stream or resource of type java.io.InputStream [189]
1org.jcoderz.phoenix.report.CpdReportReader
Method org.jcoderz.phoenix.report.CpdReportReader.parse(File) may fail to clean up stream or resource of type java.io.InputStream [78]
1org.jcoderz.commons.util.XmlUtil
Method org.jcoderz.commons.util.XmlUtil.createStreamResult(File) may fail to clean up stream or resource of type java.io.OutputStream [360]
1org.jcoderz.commons.connector.http.transport.SslSocketFactory
Method org.jcoderz.commons.connector.http.transport.SslSocketFactory.getSslSocketFactory() may fail to clean up stream or resource of type java.io.InputStream [200]
1org.jcoderz.phoenix.report.JCoverageReportReader
Method org.jcoderz.phoenix.report.JCoverageReportReader.parse(File) may fail to clean up stream or resource of type java.io.InputStream [83]