You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Andreas Loth (Jira)" <ji...@apache.org> on 2023/10/13 08:22:00 UTC
[jira] [Created] (IO-817) Please don't "force" using builders
Andreas Loth created IO-817:
-------------------------------
Summary: 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
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)