felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r982613 - /felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/helper/DeactivateMethod.java
Date Thu, 05 Aug 2010 13:31:59 GMT
Author: fmeschbe
Date: Thu Aug  5 13:31:59 2010
New Revision: 982613

URL: http://svn.apache.org/viewvc?rev=982613&view=rev
Log:
Improve getAcceptedParameterTypes method along the lines of the respective improvement in
the ActivateMethod class in Rev. 982605

Modified:
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/helper/DeactivateMethod.java

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/helper/DeactivateMethod.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/helper/DeactivateMethod.java?rev=982613&r1=982612&r2=982613&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/helper/DeactivateMethod.java (original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/helper/DeactivateMethod.java Thu
Aug  5 13:31:59 2010
@@ -25,6 +25,10 @@ import org.apache.felix.scr.impl.manager
 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 @@ public class DeactivateMethod extends Ac
 
     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;
     }
 
 



Mime
View raw message