You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Yurii Rashkovskii (JIRA)" <ji...@apache.org> on 2016/09/24 08:19:20 UTC

[jira] [Created] (KARAF-4729) cluster:feature-repo-refresh never works

Yurii Rashkovskii created KARAF-4729:
----------------------------------------

             Summary: cluster:feature-repo-refresh never works
                 Key: KARAF-4729
                 URL: https://issues.apache.org/jira/browse/KARAF-4729
             Project: Karaf
          Issue Type: Bug
          Components: cellar-features
    Affects Versions: cellar-4.0.2
            Reporter: Yurii Rashkovskii
            Priority: Critical


It is impossible to refresh a feature repo:

> feature-repo-list default | grep standard
standard-4.0.6           | cluster/local | mvn:org.apache.karaf.features/standard/4.0.6/xml/features
> feature-repo-refresh default standard-4.0.6
Features repository standard-4.0.6 doesn't exist in cluster group default

I believe the problem lies here:

https://github.com/apache/karaf-cellar/blob/master/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoRefreshCommand.java#L76-L83

It essentially calls Map<String,String>#get(URI) which always returns null:

java> java.net.URL url = new java.net.URL("https://google.com");
java.net.URL url = https://google.com
java> Map<String, String> m = new HashMap<>();
java.util.Map<java.lang.String, java.lang.String> m = {}
java> m.put("https://google.com", "test");
java.lang.Object res3 = null
java> m.get(url);
java.lang.Object res4 = null

If necessary, I can send a PR.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)