summaryrefslogtreecommitdiffstats
path: root/java/sca/modules
diff options
context:
space:
mode:
authorvamsic007 <vamsic007@13f79535-47bb-0310-9956-ffa450edef68>2008-08-22 17:32:37 +0000
committervamsic007 <vamsic007@13f79535-47bb-0310-9956-ffa450edef68>2008-08-22 17:32:37 +0000
commit5412883f03a9276a6bc76a2be7ccf46995ffe3e6 (patch)
treeea7a9d6ac2a678c4b9e278d360e91a89529459b0 /java/sca/modules
parent488dacc706abd484cd5061e24c8ff805696771a5 (diff)
TUSCANY-2562 Callback issue when reference is set with getter & setter method
o Problem appears when the reference computed by HeuristicPojoProcessor has a bidirectional interface. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@688128 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules')
-rw-r--r--java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java b/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java
index fc4d27e752..ff5be90889 100644
--- a/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java
+++ b/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java
@@ -552,6 +552,8 @@ public class HeuristicPojoProcessor extends BaseJavaClassVisitor {
} catch (InvalidInterfaceException e1) {
throw new IntrospectionException(e1);
}
+
+ // FIXME: This part seems to have already been taken care above!!
try {
processCallback(paramType, reference);
} catch (InvalidServiceType e) {
@@ -584,9 +586,13 @@ public class HeuristicPojoProcessor extends BaseJavaClassVisitor {
Callback callback = interfaze.getAnnotation(Callback.class);
if (callback != null && !Void.class.equals(callback.value())) {
Class<?> callbackClass = callback.value();
- JavaInterface javaInterface = javaFactory.createJavaInterface();
- javaInterface.setJavaClass(callbackClass);
- contract.getInterfaceContract().setCallbackInterface(javaInterface);
+ JavaInterface javaInterface;
+ try {
+ javaInterface = javaFactory.createJavaInterface(callbackClass);
+ contract.getInterfaceContract().setCallbackInterface(javaInterface);
+ } catch (InvalidInterfaceException e) {
+ throw new InvalidServiceType("Invalid callback interface "+callbackClass, interfaze);
+ }
} else if (callback != null && Void.class.equals(callback.value())) {
throw new InvalidServiceType("No callback interface specified on annotation", interfaze);
}