FELIX-5129 make lack of component configurations more visible
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1717855 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/ScrCommand.java b/scr/src/main/java/org/apache/felix/scr/impl/ScrCommand.java
index 7f4792a..83b431c 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/ScrCommand.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/ScrCommand.java
@@ -397,10 +397,18 @@
}
else
{
- for (final ComponentConfigurationDTO cc: scrService.getComponentConfigurationDTOs(component))
- {
- info(cc, out);
- }
+ Collection<ComponentConfigurationDTO> componentConfigurationDTOs = scrService.getComponentConfigurationDTOs(component);
+ if (componentConfigurationDTOs.isEmpty())
+ {
+ out.println(" (No Component Configurations)");
+ }
+ else
+ {
+ for (final ComponentConfigurationDTO cc: componentConfigurationDTOs)
+ {
+ info(cc, out);
+ }
+ }
}
out.println();
}