Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
cellar-4.0.2
-
None
Description
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:
It essentially calls Map<String,String>#get(URI) which always returns null:
java> java.net.URI uri = new java.net.URI("https://google.com");
java.net.URL uri = 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(uri);
java.lang.Object res4 = null
I also see that there's a similar problem in other parts, like here: https://github.com/apache/karaf-cellar/blob/master/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoAddCommand.java#L90-L97
Or is there anything I am missing about this code?
If necessary, I can send a PR.