You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2023/12/31 13:09:00 UTC
[jira] [Created] (IO-834) AbstractOrigin getReader/getWriter etc, should be abstract
Elliotte Rusty Harold created IO-834:
----------------------------------------
Summary: AbstractOrigin getReader/getWriter etc, should be abstract
Key: IO-834
URL: https://issues.apache.org/jira/browse/IO-834
Project: Commons IO
Issue Type: Bug
Reporter: Elliotte Rusty Harold
Many methods in thsi base class have no useful default implementation. E.g.
public Writer getWriter(final Charset charset, final OpenOption... options) throws IOException {
return Files.newBufferedWriter(getPath(), charset, options);
}
This only works for files, but not for URIs, char sequences, byte sequences, etc. The file based methods should be pushed down into FileOrigin/PathOrigin and these methods should be abstract.
To avoid breaking API they can for now throw UnsuportedOperationException instead.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)