You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "JC (JIRA)" <ji...@apache.org> on 2017/02/11 18:06:41 UTC

[jira] [Created] (KARAF-4986) A condition that is always true.

JC created KARAF-4986:
-------------------------

             Summary: A condition that is always true.
                 Key: KARAF-4986
                 URL: https://issues.apache.org/jira/browse/KARAF-4986
             Project: Karaf
          Issue Type: Bug
          Components: cellar-features
            Reporter: JC
            Priority: Trivial


I've found code smells and typos in a recent github snapshot. (karaf-cellar)

Path: features/src/main/java/org/apache/karaf/cellar/features/management/internal/CellarFeaturesMBeanImpl.java

{code:java}
559             for (String url : urls) {
560                 // looking for the URL in the list
561                 boolean found = false;
562                 for (String repository : clusterRepositories.keySet()) {
563                     if (repository.equals(repository)) {
564                         found = true;
565                         break;
566                     }
567                 }
568                 if (found) {
569                     Features repositoryModel = JaxbUtil.unmarshal(url, true);
{code}

The line 563 should be like this?
{code:java}
563                     if (repository.equals(url)) {
{code}

There is a similar issue in the following path as well: features/src/main/java/org/apache/karaf/cellar/features/shell/RepoRemoveCommand.java

{code:java}
116             for (String url : urls) {
117                 // looking for the URL in the list
118                 boolean found = false;
119                 for (String repository : clusterRepositories.keySet()) {
120                     if (repository.equals(repository)) {
121                         found = true;
122                         break;
123                     }
{code}

This might be trivial issues but wanted to report just in case.



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