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

Gary D. Gregory updated IO-830:
-------------------------------
    Assignee:     (was: Gary D. Gregory)

> Rethink AbstractOrigin
> ----------------------
>
>                 Key: IO-830
>                 URL: https://issues.apache.org/jira/browse/IO-830
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Elliotte Rusty Harold
>            Priority: Critical
>
> UnuspportedOperationException is a code smell that indicates the class 
> hierarchy doesn't really fit the problem and violates the Liskov Subsitution 
> Principle
> See 
> https://softwareengineering.stackexchange.com/questions/337850/is-expecting-the-api-user-to-implement-an-unsupportedoperationexception-okay
> It doesn't work to treat all origins the same. E.g. CharSequences really, 
> really need a character set before they can be converted to byte arrays or 
> input streams, but byte arrays and files don't. In reverse files need a 
> character set to be converted to a reader but char sequences don't.
> Different classes need different arguments, whether you use a builder or a 
> constructor. There's not common type here. 



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

Reply via email to