mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SSHD-739) A call to resolvePropertyValue can be very inefficient
Date Tue, 11 Apr 2017 18:49:41 GMT
Guillaume Nodet created SSHD-739:
------------------------------------

             Summary: A call to resolvePropertyValue can be very inefficient
                 Key: SSHD-739
                 URL: https://issues.apache.org/jira/browse/SSHD-739
             Project: MINA SSHD
          Issue Type: Bug
            Reporter: Guillaume Nodet


Each time a property is retrieved, all system properties names are iterated.
This is because {{PropertyResolverUtil#resolvePropertyValue}} is calling {{GenericUtils.isEmpty(props)}}
on a {{SyspropsMapWrapper}}.

This can be solved by using {{isNull(props)}} instead of {{isEmpty(props)}} as there's no
need to check if the map is empty.
In the same call, there's also a call to {{System.getProperty}} which seems to be redundant
with the {{SyspropsMapWrapper}}.  I think it should be removed.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message