[
https://issues.apache.org/jira/browse/FTPSERVER-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635512#action_12635512
]
Andrea Francia commented on FTPSERVER-186:
------------------------------------------
If this is a design choice I think that should be documented and justified
peraphs in the IoUtils javadoc.
Documenting and justifying design choiche is for great help for people that
read your code (possibly you after some time) and for they future decisions.
Surely there are advantages by not include another dependency, but there also
adavantages including it. Why not explain briefly the tradeoff choosen on the
comments?
> org.apache.ftpserver.util.IoUtils reinvent the wheel
> ----------------------------------------------------
>
> Key: FTPSERVER-186
> URL: https://issues.apache.org/jira/browse/FTPSERVER-186
> Project: FtpServer
> Issue Type: Bug
> Reporter: Andrea Francia
>
> The IoUtils class contains some method that are already provided by
> commons-io library.
> These methods:
> - public final static void close(InputStream is)
> - public final static void close(OutputStream os)
> - public final static void close(Reader rd)
> - public final static void close(Writer wr)
> Should be substituted with the relevant closeQuietly() method of
> org.apache.commons.io.IOUtils.
> These methods:
> - public final static void copy(Reader input, Writer output, int bufferSize)
> - public final static void copy(InputStream input, OutputStream output, int
> bufferSize)
> Should be substitured with the relevant copy() methods of
> org.apache.commons.io.IOUtils.
> These methods:
> - public final static String readFully(Reader reader) throws IOException
> - public final static String readFully(InputStream input) throws IOException
> Should be substitured with the relevant toString() methods of
> org.apache.commons.io.IOUtils.
> About this mehods:
> - public final static void delete(File file) throws IOException
> I'm not sure, maybe there something in the org.apache.commons.io.FileUtils.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.