tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1213614 - /tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ContextProcessor.java
Date Tue, 13 Dec 2011 09:15:11 GMT
Author: antelder
Date: Tue Dec 13 09:15:11 2011
New Revision: 1213614

URL: http://svn.apache.org/viewvc?rev=1213614&view=rev
Log:
Update context annotation processor to work with both OASIS and Tuscany types of ComponentContext

Modified:
    tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ContextProcessor.java

Modified: tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ContextProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ContextProcessor.java?rev=1213614&r1=1213613&r2=1213614&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ContextProcessor.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ContextProcessor.java
Tue Dec 13 09:15:11 2011
@@ -60,7 +60,7 @@ public class ContextProcessor extends Ba
         }
         Class<?> paramType = method.getParameterTypes()[0];
         String name = JavaIntrospectionHelper.toPropertyName(method.getName());
-        if (ComponentContext.class.equals(paramType) || RequestContext.class.equals(paramType))
{
+        if (ComponentContext.class.isAssignableFrom(paramType) || RequestContext.class.equals(paramType))
{
             JavaElementImpl element = new JavaElementImpl(method, 0);
             element.setName(name);
             element.setClassifer(org.apache.tuscany.sca.implementation.java.introspect.impl.Resource.class);
@@ -77,7 +77,7 @@ public class ContextProcessor extends Ba
             return;
         }
         Class<?> paramType = field.getType();
-        if (ComponentContext.class.equals(paramType) || RequestContext.class.equals(paramType))
{
+        if (ComponentContext.class.isAssignableFrom(paramType) || RequestContext.class.equals(paramType))
{
             JavaElementImpl element = new JavaElementImpl(field);
             element.setClassifer(Resource.class);
             JavaResourceImpl resource = new JavaResourceImpl(element);



Mime
View raw message