Elliotte Rusty Harold created IO-846:
----------------------------------------

             Summary: Undeprecate RandomAccessFileInputStream constructors, 
deprecate the builder
                 Key: IO-846
                 URL: https://issues.apache.org/jira/browse/IO-846
             Project: Commons IO
          Issue Type: Bug
          Components: Streams/Writers
            Reporter: Elliotte Rusty Harold


The Builder pattern is actively negative here. It introduces at least one 
runtime failure mode (not setting the underlying file) that is a compile time 
error with a constructor. The constructors are simpler, more obvious, and less 
error prone. 

The builder pattern is **not** preferred to constructors in all cases. It is a 
non-standard idiom outside the Java language that is appropriate when:

1. There are a large number of arguments.
2. At least two of the arguments have the same type so there is a real risk of 
swapping them. 
3. Any combination of arguments is allowed.

All three of those conditions are false in this case. 




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

Reply via email to