[ 
https://issues.apache.org/jira/browse/SSHD-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16205180#comment-16205180
 ] 

Goldstein Lyor commented on SSHD-778:
-------------------------------------

I guess you could do it that way, but the way I recommended is simpler - via 
{{PropertyResolverUtils.updateProperty}}. Furthermore, you don't need to 
convert the value to a string - if you look at {{getLong}} implementation you 
will see:
{code:java}
public static long toLong(Object value, long defaultValue) {
        if (value == null) {
            return defaultValue;
        } else if (value instanceof Number) {
            return ((Number) value).longValue();
        } else {    // we parse the string in case it is not a valid long value
            return Long.parseLong(value.toString());
        }
    }
{code}
So theoretically you could even use an integer or a double - anything that is a 
{{Number}}

> Allow overiding WAIT_FOR_SPACE_TIMEOUT and DEFAULT_WAIT_FOR_SPACE_TIMEOUT 
> default setting
> -----------------------------------------------------------------------------------------
>
>                 Key: SSHD-778
>                 URL: https://issues.apache.org/jira/browse/SSHD-778
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 1.1.0, 1.6.0
>            Reporter: none
>            Assignee: Goldstein Lyor
>              Labels: sshd
>             Fix For: 1.4.0
>
>
> Hi, could the ability to overide the defaults for 
> DEFAULT_WAIT_FOR_SPACE_TIMEOUT and WAIT_FOR_SPACE_TIMEOUT be supported please?
> This would allow a project like gerrit to set it's own default but also allow 
> users to set it's own too.
> These constants should be moved to the FactoryManager.
> See https://bugs.chromium.org/p/gerrit/issues/detail?id=7425



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to