You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2023/10/13 10:45:00 UTC

[jira] [Resolved] (IO-817) Please don't "force" using builders

     [ https://issues.apache.org/jira/browse/IO-817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary D. Gregory resolved IO-817.
--------------------------------
    Resolution: Information Provided

> Please don't "force" using builders
> -----------------------------------
>
>                 Key: IO-817
>                 URL: https://issues.apache.org/jira/browse/IO-817
>             Project: Commons IO
>          Issue Type: Wish
>            Reporter: Andreas Loth
>            Priority: Major
>
> Commit 7ecca22f175c644da3096940a4ce899be5b33740 deprecates a whole bunch of constructors in favor of using builders.
> So the rather short code
> {code:java}
>         try (StringWriter sw = new StringWriter();
>                 WriterOutputStream wos = new WriterOutputStream(sw, StandardCharsets.UTF_8)) {
> {code}
> expands to a very verbose
> {code:java}
>         try (StringWriter sw = new StringWriter();
>                 WriterOutputStream wos = WriterOutputStream.builder().setCharset(StandardCharsets.UTF_8).setWriter(sw).get()) {
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)