OSDir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Commented] (GERONIMO-6603) Inconsistent method name


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

ASF GitHub Bot commented on GERONIMO-6603:
------------------------------------------

GitHub user BruceKuiLiu opened a pull request:

    https://github.com/apache/geronimo/pull/2

    GERONIMO-6603: Change the inconsistent method name.

    Change the method name 'listBundles' to 'logBundles'.
    The method is named "listBundles".
    "listBundles" seems that the method will return a list of bundles.
    Actually, this method adds the bundles into the log info.
    Thus, "logBundles" should be more intuitive than "listBundles".

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/BruceKuiLiu/geronimo trunk

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/geronimo/pull/2.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2
    
----
commit 87a3076cf3e3c2fdcb4cea0c55e3eeae084a0d03
Author: Kui LIU <brucekuiliu@...>
Date:   2018-04-21T21:19:03Z

    Change the method name 'listBundles' to 'logBundles'.

----


> Inconsistent method name
> ------------------------
>
>                 Key: GERONIMO-6603
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6603
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>            Reporter: KuiLIU
>            Priority: Major
>
> The following method is named "listBundles".
> "listBundles" seems that the method will return a list of bundles.
> Actually, this method adds the bundles into the log info.
> Thus, "logBundles" should be more intuitive than "listBundles".
> {code:java}
> protected void listBundles(BundleContext ctx) {
>         StringBuilder b = new StringBuilder("Bundles:");
>         for (Bundle bundle: ctx.getBundles()) {
>             b.append("\n   Id:").append(bundle.getBundleId()).append("  status:").append(bundle.getState()).append("  ").append(bundle.getLocation());
>         }
>         getLog().info(b.toString());
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)