You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jg...@apache.org on 2012/10/11 18:13:32 UTC
svn commit: r1397138 -
/karaf/branches/karaf-2.3.x/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/ListBundleServices.java
Author: jgoodyear
Date: Thu Oct 11 16:13:31 2012
New Revision: 1397138
URL: http://svn.apache.org/viewvc?rev=1397138&view=rev
Log:
[KARAF-1907] Compile error: type ServiceReference does not take parameters on OSGi Shell ListBundleServices using JDK 7
Java 7 does not compile ServiceReference with wild card generic Java 7 does not compile ServiceReference with wild card generic. Removing <?> to allow wider JDK support.
Modified:
karaf/branches/karaf-2.3.x/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/ListBundleServices.java
Modified: karaf/branches/karaf-2.3.x/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/ListBundleServices.java
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.3.x/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/ListBundleServices.java?rev=1397138&r1=1397137&r2=1397138&view=diff
==============================================================================
--- karaf/branches/karaf-2.3.x/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/ListBundleServices.java (original)
+++ karaf/branches/karaf-2.3.x/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/ListBundleServices.java Thu Oct 11 16:13:31 2012
@@ -43,12 +43,12 @@ public class ListBundleServices extends
@Override
protected void doExecute(List<Bundle> bundles) throws Exception {
for (Bundle bundle : bundles) {
- ServiceReference<?>[] refs = (inUse) ? bundle.getServicesInUse() : bundle.getRegisteredServices();
+ ServiceReference[] refs = (inUse) ? bundle.getServicesInUse() : bundle.getRegisteredServices();
printServices(bundle, refs, showProperties);
}
}
- private void printServices(Bundle bundle, ServiceReference<?>[] refs, boolean showProperties) {
+ private void printServices(Bundle bundle, ServiceReference[] refs, boolean showProperties) {
boolean headerPrinted = false;
boolean needSeparator = false;
@@ -56,7 +56,7 @@ public class ListBundleServices extends
return;
}
- for (ServiceReference<?> serviceRef : refs) {
+ for (ServiceReference serviceRef : refs) {
String[] objectClass = (String[]) serviceRef.getProperty(Constants.OBJECTCLASS);
boolean print = showAll || !isCommand(objectClass);
@@ -96,7 +96,7 @@ public class ListBundleServices extends
return false;
}
- private void printProperties(ServiceReference<?> serviceRef) {
+ private void printProperties(ServiceReference serviceRef) {
for (String key : serviceRef.getPropertyKeys()) {
System.out.println(key + " = " + ListBundleServices.getValueString(serviceRef.getProperty(key)));
}