You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Dapeng Sun (JIRA)" <ji...@apache.org> on 2016/06/16 08:40:05 UTC

[jira] [Commented] (CRYPTO-72) CryptoCipherFactory.getInstance does unnecessary class instantiation

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

Dapeng Sun commented on CRYPTO-72:
----------------------------------

Thank [~sebb@apache.org], I have fixed it at removing log dependence. Once the pr merged, the issue will be fixed

> CryptoCipherFactory.getInstance does unnecessary class instantiation
> --------------------------------------------------------------------
>
>                 Key: CRYPTO-72
>                 URL: https://issues.apache.org/jira/browse/CRYPTO-72
>             Project: Commons Crypto
>          Issue Type: Bug
>            Reporter: Sebb
>
> The CryptoCipherFactory.getInstance method calls getCipherClasses which splits the string containing the class name(s) and then creates an instance of each (if possible) using ReflectionUtils.getClassByName.
> However the getInstance method stops processing on the first successful class, so any subsequent entries are not used.
> This is wasteful; the call to ReflectionUtils.getClassByName should only be done if it is going to be used.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)