commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CRYPTO-72) CryptoCipherFactory.getInstance does unnecessary class instantiation
Date Wed, 15 Jun 2016 09:00:20 GMT
Sebb created CRYPTO-72:
--------------------------

             Summary: 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)

Mime
View raw message