You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ge...@apache.org on 2009/04/23 15:12:14 UTC
svn commit: r767911 - in
/servicemix/smx4/kernel/trunk/gshell/gshell-features/src:
main/java/org/apache/servicemix/kernel/gshell/features/internal/FeaturesServiceImpl.java
test/java/org/apache/servicemix/kernel/gshell/features/FeaturesServiceTest.java
Author: gertv
Date: Thu Apr 23 13:12:14 2009
New Revision: 767911
URL: http://svn.apache.org/viewvc?rev=767911&view=rev
Log:
SMX4KNL-266: features/install -i throws ArrayStoreException
Modified:
servicemix/smx4/kernel/trunk/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/FeaturesServiceImpl.java
servicemix/smx4/kernel/trunk/gshell/gshell-features/src/test/java/org/apache/servicemix/kernel/gshell/features/FeaturesServiceTest.java
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/FeaturesServiceImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/FeaturesServiceImpl.java?rev=767911&r1=767910&r2=767911&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/FeaturesServiceImpl.java (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/FeaturesServiceImpl.java Thu Apr 23 13:12:14 2009
@@ -321,7 +321,11 @@
}
public String[] listInstalledFeatures() {
- return installed.keySet().toArray(new String[installed.size()]);
+ List<String> result = new ArrayList<String>();
+ for (Feature feature : installed.keySet()) {
+ result.add(feature.getName());
+ }
+ return result.toArray(new String[result.size()]);
}
protected Feature getFeature(String name, String version) throws Exception {
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-features/src/test/java/org/apache/servicemix/kernel/gshell/features/FeaturesServiceTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-features/src/test/java/org/apache/servicemix/kernel/gshell/features/FeaturesServiceTest.java?rev=767911&r1=767910&r2=767911&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-features/src/test/java/org/apache/servicemix/kernel/gshell/features/FeaturesServiceTest.java (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-features/src/test/java/org/apache/servicemix/kernel/gshell/features/FeaturesServiceTest.java Thu Apr 23 13:12:14 2009
@@ -125,6 +125,10 @@
replay(preferencesService, prefs, repositoriesNode, featuresNode, bundleContext, installedBundle);
svc.installFeature("f1");
+
+ String[] installed = svc.listInstalledFeatures();
+ assertEquals(1, installed.length);
+ assertEquals("f1", installed[0]);
}
public void testUninstallFeature() throws Exception {