Improve getAcceptedParameterTypes method along the lines of the respective improvement in the ActivateMethod class in Rev. 982605
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@982613 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/helper/DeactivateMethod.java b/scr/src/main/java/org/apache/felix/scr/impl/helper/DeactivateMethod.java
index e67c6e7..4c464b9 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/helper/DeactivateMethod.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/helper/DeactivateMethod.java
@@ -25,6 +25,10 @@
public class DeactivateMethod extends ActivateMethod
{
+ private static final Class[] DEACTIVATE_TYPES_DS11 =
+ { COMPONENT_CONTEXT_CLASS, BUNDLE_CONTEXT_CLASS, MAP_CLASS, Integer.TYPE, INTEGER_CLASS };
+
+
public DeactivateMethod( final AbstractComponentManager componentManager, final String methodName,
final boolean methodRequired, final Class componentClass )
{
@@ -34,14 +38,7 @@
protected Class[] getAcceptedParameterTypes()
{
- if ( isDS11() )
- {
- return new Class[]
- { COMPONENT_CONTEXT_CLASS, BUNDLE_CONTEXT_CLASS, MAP_CLASS, Integer.TYPE, INTEGER_CLASS };
- }
-
- return new Class[]
- { COMPONENT_CONTEXT_CLASS };
+ return isDS11() ? DEACTIVATE_TYPES_DS11 : ACTIVATE_TYPES_DS10;
}