karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Updated] (KARAF-5173) Some tests could benefit from a common CallbackHandler
Date Thu, 01 Jun 2017 15:00:09 GMT

     [ https://issues.apache.org/jira/browse/KARAF-5173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jean-Baptiste Onofré updated KARAF-5173:
----------------------------------------
    Fix Version/s: 4.2.0

> Some tests could benefit from a common CallbackHandler
> ------------------------------------------------------
>
>                 Key: KARAF-5173
>                 URL: https://issues.apache.org/jira/browse/KARAF-5173
>             Project: Karaf
>          Issue Type: Improvement
>          Components: karaf-core
>    Affects Versions: 4.2.0
>            Reporter: Stephen Kitt
>            Assignee: Jean-Baptiste Onofré
>            Priority: Trivial
>             Fix For: 4.2.0
>
>
> I’ve noticed that a number of tests contain code like
>         CallbackHandler cb = new CallbackHandler() {
>             public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
{
>                 for (Callback cb : callbacks) {
>                     if (cb instanceof NameCallback) {
>                         ((NameCallback) cb).setName("hnelson");
>                     } else if (cb instanceof PasswordCallback) {
>                         ((PasswordCallback) cb).setPassword("secret".toCharArray());
>                     }
>                 }
>             }
>         };
> It might make sense to introduce a concrete implementation of CallbackHandler to provide
this.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message