You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Babak Vahdat (JIRA)" <ji...@apache.org> on 2017/08/18 18:23:01 UTC
[jira] [Commented] (CAMEL-11655) Camel-Nagios: Use Encryption enum
instead of EncryptionMethod
[ https://issues.apache.org/jira/browse/CAMEL-11655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16133400#comment-16133400 ]
Babak Vahdat commented on CAMEL-11655:
--------------------------------------
[~ancosen] IMHO this's a breaking change for the upcoming {{2.20.0}} version as the {{encryptionMethod}} query parameter has been simply removed and replaced with a new {{encryption}} query parameter, which _would_ break user's code making use of this option. AFAIK a minor release should not include any breaking changes, right? Shouldn't we better somehow mark {{encryptionMethod}} as deprecated and encourage users to make use of the new {{encryption}} parameter instead? Other than that some feedback on your made code changes:
What would be wrong to do:
{code}
nagiosSettings.setEncryption(encryption);
{code}
Instead of the following if / else if:
{code}
if (encryption != null) {
if (Encryption.NONE == encryption) {
nagiosSettings.setEncryption(Encryption.NONE);
} else if (Encryption.XOR == encryption) {
nagiosSettings.setEncryption(Encryption.XOR);
} else if (Encryption.TRIPLE_DES == encryption) {
nagiosSettings.setEncryption(Encryption.TRIPLE_DES);
} else {
throw new IllegalArgumentException("Unknown encryption method: " + encryption);
}
}
{code}
As because:
{code}
private Encryption encryption = Encryption.NONE;
{code}
Also maybe mark the {{NagiosEncryptionMethod}} enum itself as deprecated so we don't forget to remove it in Camel 3.
> Camel-Nagios: Use Encryption enum instead of EncryptionMethod
> -------------------------------------------------------------
>
> Key: CAMEL-11655
> URL: https://issues.apache.org/jira/browse/CAMEL-11655
> Project: Camel
> Issue Type: Task
> Components: camel-nagios
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Fix For: 2.20.0
>
>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)