You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Pratiyush (JIRA)" <ji...@apache.org> on 2016/04/15 16:06:25 UTC
[jira] [Closed] (CSV-176) Resource leak: StringWriter is never
closed in CSVFormat.java
[ https://issues.apache.org/jira/browse/CSV-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pratiyush closed CSV-176.
-------------------------
Resolution: Not A Problem
As, mentioned by Sebb. There will be no effect of closing StringWriter.
> Resource leak: StringWriter is never closed in CSVFormat.java
> -------------------------------------------------------------
>
> Key: CSV-176
> URL: https://issues.apache.org/jira/browse/CSV-176
> Project: Commons CSV
> Issue Type: Improvement
> Reporter: Pratiyush
> Priority: Minor
>
> public String format(final Object... values) {
> final StringWriter out = new StringWriter();
> try {
> new CSVPrinter(out, this).printRecord(values);
> return out.toString().trim();
> } catch (final IOException e) {
> // should not happen because a StringWriter does not do IO.
> throw new IllegalStateException(e);
> }
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)