You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by cs...@apache.org on 2011/12/05 16:52:09 UTC

svn commit: r1210508 - /karaf/trunk/shell/services/src/main/java/org/apache/karaf/shell/services/ListServices.java

Author: cschneider
Date: Mon Dec  5 15:52:09 2011
New Revision: 1210508

URL: http://svn.apache.org/viewvc?rev=1210508&view=rev
Log:
KARAF-1077 Use constant for objectClass, remove separator for short view

Modified:
    karaf/trunk/shell/services/src/main/java/org/apache/karaf/shell/services/ListServices.java

Modified: karaf/trunk/shell/services/src/main/java/org/apache/karaf/shell/services/ListServices.java
URL: http://svn.apache.org/viewvc/karaf/trunk/shell/services/src/main/java/org/apache/karaf/shell/services/ListServices.java?rev=1210508&r1=1210507&r2=1210508&view=diff
==============================================================================
--- karaf/trunk/shell/services/src/main/java/org/apache/karaf/shell/services/ListServices.java (original)
+++ karaf/trunk/shell/services/src/main/java/org/apache/karaf/shell/services/ListServices.java Mon Dec  5 15:52:09 2011
@@ -26,6 +26,7 @@ import org.apache.felix.service.command.
 import org.apache.karaf.shell.bundles.BundleSelector;
 import org.apache.karaf.util.ShellUtil;
 import org.osgi.framework.Bundle;
+import org.osgi.framework.Constants;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 
@@ -69,7 +70,7 @@ public class ListServices extends OsgiCo
         }
 
         for (ServiceReference<?> serviceRef : refs) {
-            String[] objectClass = (String[]) serviceRef.getProperty("objectClass");
+            String[] objectClass = (String[]) serviceRef.getProperty(Constants.OBJECTCLASS);
 
             boolean print = showAll || !isCommand(objectClass);
 
@@ -84,7 +85,7 @@ public class ListServices extends OsgiCo
 
             if (print) {
                 // Print service separator if necessary.
-                if (needSeparator) {
+                if (needSeparator && showProperties) {
                     System.out.println("----");
                 }