commons-issues mailing list archives

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


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
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:
>             Project: Commons Crypto
>          Issue Type: Bug
>            Reporter: Sebb
> ConfigurationKeys#COMMONS_CRYPTO_CIPHER_CLASSES_DEFAULT contains a fully-qualified class
> 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

View raw message