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

ASF GitHub Bot commented on KARAF-6020:
---------------------------------------

jbonofre closed pull request #659: [KARAF-6020] Fix display of conditional 
features in features:info command
URL: https://github.com/apache/karaf/pull/659
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/features/command/src/main/java/org/apache/karaf/features/command/InfoFeatureCommand.java
 
b/features/command/src/main/java/org/apache/karaf/features/command/InfoFeatureCommand.java
index a8b460615f..82d4935678 100644
--- 
a/features/command/src/main/java/org/apache/karaf/features/command/InfoFeatureCommand.java
+++ 
b/features/command/src/main/java/org/apache/karaf/features/command/InfoFeatureCommand.java
@@ -306,7 +306,7 @@ private int displayFeatureTree(FeaturesService admin, 
String featureName, String
                     for (Conditional cond : resolved.getConditional()) {
                         List<Dependency> conditionDependencies = 
cond.getDependencies();
                         for (int i = 0, j = conditionDependencies.size(); i < 
j; i++) {
-                            Dependency toDisplay = dependencies.get(i);
+                            Dependency toDisplay = 
conditionDependencies.get(i);
                             unresolved += displayFeatureTree(admin, 
toDisplay.getName(), toDisplay.getVersion(), prefix);
                         }
                     }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Command feature:info fails showing conditional dependencies
> -----------------------------------------------------------
>
>                 Key: KARAF-6020
>                 URL: https://issues.apache.org/jira/browse/KARAF-6020
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.2.1
>         Environment: Linux (CentOS) and Windows
>            Reporter: Julien Malaise
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: 4.2.2
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> The command feature:info with option -t (to show a tree of dependencies) 
> fails when dependencies are conditional.
> I get this message : Error executing command: Index: 0, Size: 0
> And these logs :
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>   at java.util.ArrayList.rangeCheck(ArrayList.java:653) [?:?]
>   at java.util.ArrayList.get(ArrayList.java:429) [?:?]
>   at java.util.Collections$UnmodifiableList.get(Collections.java:1309) [?:?]
>   at 
> org.apache.karaf.features.command.InfoFeatureCommand.displayFeatureTree(InfoFeatureCommand.java:252)
>  
> In InfoFeatureCommand.java, at line 252,
> {color:#d04437}dependencies{color}.get( i) should be replaced by 
> {color:#14892c}conditionDependencies{color}.get( i)
>  



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

Reply via email to