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

Gary D. Gregory resolved NET-722.
---------------------------------
    Fix Version/s: 3.10.0
       Resolution: Fixed

[~david_costanzo] 

Thank you for your report. Fixed in git master.

 

> Javadoc for FtpClient.setControlKeepAliveReplyTimeout(Duration) says timeout 
> is in milliseconds
> -----------------------------------------------------------------------------------------------
>
>                 Key: NET-722
>                 URL: https://issues.apache.org/jira/browse/NET-722
>             Project: Commons Net
>          Issue Type: Improvement
>          Components: FTP
>    Affects Versions: 3.9.0
>            Reporter: David Costanzo
>            Priority: Trivial
>             Fix For: 3.10.0
>
>
> The JavaDoc comment for 
> [FtpClient.setControlKeepAliveReplyTimeout(Duration)|https://github.com/apache/commons-net/blob/master/src/main/java/org/apache/commons/net/ftp/FTPClient.java#L2918]
>  is technically incorrect:
>  
> {noformat}
>    /**
>      * Sets how long to wait for control keep-alive message replies.
>      *
>      * @param timeout number of milliseconds to wait (defaults to 1000)
>      * @since 3.0
>      * @see #setControlKeepAliveTimeout(Duration)
>      */
>     public void setControlKeepAliveReplyTimeout(final Duration timeout) {
>         controlKeepAliveReplyTimeout = DurationUtils.zeroIfNull(timeout);
>     } 
> {noformat}
> The timeout is no longer "number of milliseconds" because it's a Duration and 
> so has the unit embedded within.  The JavaDoc also doesn't document the 
> behavior when {{null}} is given.
> Perhaps this something like
> {noformat}
> @param timeout amount of time to wait.  This defaults to 1000 milliseconds if 
> not explicitly set.  A value of {@code null} disables the timeout.{noformat}
> I'm sure you can do better than I can.



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

Reply via email to