camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Babak Vahdat (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-11655) Camel-Nagios: Use Encryption enum instead of EncryptionMethod
Date Fri, 18 Aug 2017 18:23:01 GMT

    [ 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)

Mime
View raw message