commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CRYPTO-75) ConfigurationKeys#COMMONS_CRYPTO_CIPHER_CLASSES_DEFAULT is not guaranteed constant
Date Sat, 18 Jun 2016 09:55:49 GMT

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

Sebb commented on CRYPTO-75:
----------------------------

As far as the user code is concerned, they would not see any difference; just the value of
the constant would be changed once before initial publication.

As far as Crypto code is concerned, it would need to check whether the string was a full class
path name or an alias; if an alias (i.e. no path segments) then convert that to the full class
name.
Note that the alias could consist of the bare class name, making the conversion trivial.

An alternative would be to replace the constant with a getter method. This would allow for
internal class name changes automatically.

Since constant values may be inlined by the compiler, their values must not change once published;
the new value may not be picked up by external code.

> ConfigurationKeys#COMMONS_CRYPTO_CIPHER_CLASSES_DEFAULT is not guaranteed constant
> ----------------------------------------------------------------------------------
>
>                 Key: CRYPTO-75
>                 URL: https://issues.apache.org/jira/browse/CRYPTO-75
>             Project: Commons Crypto
>          Issue Type: Bug
>            Reporter: Sebb
>
> ConfigurationKeys#COMMONS_CRYPTO_CIPHER_CLASSES_DEFAULT contains a fully-qualified class
name.
> This is not guaranteed to be constant if the package names ever have to be changed.
> The constant should be changed to an alias that is handled by the runtime code when creating
the class.



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

Mime
View raw message