FELIX-4787 : DS implementation should be based on R6
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1657605 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/bnd.bnd b/scr/bnd.bnd
index b01fad8..fccecf8 100644
--- a/scr/bnd.bnd
+++ b/scr/bnd.bnd
@@ -19,8 +19,6 @@
org.apache.felix.scr.component;version=1.1.0;mandatory:="status"; status="provisional", \
org.osgi.service.component;version=1.3;-split-package:=first, \
org.osgi.service.component.runtime.*;version=1.3, \
- org.osgi.dto;version=1.0, \
- org.osgi.framework.dto;version=1.8, \
org.osgi.util.function;version=1.0, \
org.osgi.util.promise;version=1.0
@@ -32,8 +30,8 @@
# Metatype import is optional and dynamic, but allow eager wiring by importing it
# optional import for Gogo annotations
# The Felix Shell support is optional
-# Framework version 1.4 (from R4.1) is required because we depend on ServiceReference being
-# Comparable and Bundle.getBundleContext method being available.
+# Framework version 1.8 (from R6) is required because we depend on ServiceObjects
+# and prototype scope. being
# LogService is optional but if present the R4.0 version 1.3 is sufficient.
# PackageAdmin is used to find reference types if the component's bundle does not import it.
# See BindMethod.getParameterClass(Class) for details. R4.0 version 1.2 is sufficient.
@@ -42,7 +40,9 @@
org.osgi.service.metatype;version="[1.1,2)";resolution:=optional, \
org.apache.felix.service.command;resolution:=optional, \
org.apache.felix.shell;provide:=true;resolution:=optional, \
- org.osgi.framework;version="[1.4,2)", \
+ org.osgi.framework;version="[1.8,2)", \
+ org.osgi.dto;version=1.0, \
+ org.osgi.framework.dto;version=1.8, \
org.osgi.service.log;version="[1.3,2)";resolution:=optional, \
org.osgi.service.packageadmin;version="[1.2,2)";resolution:=optional, \
org.osgi.service.component;provide:=true, \
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/helper/ClassUtils.java b/scr/src/main/java/org/apache/felix/scr/impl/helper/ClassUtils.java
index 81f2c40..0f88c29 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/helper/ClassUtils.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/helper/ClassUtils.java
@@ -41,7 +41,7 @@
public static final Class<?> SERVICE_REFERENCE_CLASS = ServiceReference.class;
- public static final Class<?> COMPONENTS_SERVICE_OBJECTS_CLASS;
+ public static final Class<?> COMPONENTS_SERVICE_OBJECTS_CLASS = ComponentServiceObjects.class;
public static final Class<?> MAP_CLASS = Map.class;
public static final Class<?> MAP_ENTRY_CLASS = Map.Entry.class;
@@ -49,18 +49,6 @@
public static final Class<?> COLLECTION_CLASS = Collection.class;
public static final Class<?> LIST_CLASS = List.class;
- static {
- Class<?> serviceObjectsClass = null;
- try {
- serviceObjectsClass = ComponentServiceObjects.class;
- }
- catch (Throwable t)
- {
- //can't load class
- }
- COMPONENTS_SERVICE_OBJECTS_CLASS = serviceObjectsClass;
- }
-
/**
* Returns the class object representing the class of the field reference
* The class loader of the component class is used to load the service class.