Author: asoldano
Date: 2014-01-28 13:37:09 -0500 (Tue, 28 Jan 2014)
New Revision: 18282
Modified:
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java
Log:
[JBWS-3670] Check component type before casting
Modified:
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java
===================================================================
---
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java 2014-01-28
13:49:17 UTC (rev 18281)
+++
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java 2014-01-28
18:37:09 UTC (rev 18282)
@@ -114,8 +114,9 @@
}
// prepare invocation data
final ComponentView componentView = getComponentView();
- if (reference != null) {
- ((WSComponent)componentView.getComponent()).setReference(reference);
+ Component component = componentView.getComponent();
+ if (reference != null && component instanceof WSComponent) {
+ ((WSComponent)component).setReference(reference);
}
final Method method = getComponentViewMethod(wsInvocation.getJavaMethod(),
componentView.getViewMethods());
final InterceptorContext context = new InterceptorContext();
@@ -123,7 +124,7 @@
context.setMethod(method);
context.setParameters(wsInvocation.getArgs());
context.setTarget(reference.getInstance());
- context.putPrivateData(Component.class, componentView.getComponent());
+ context.putPrivateData(Component.class, component);
context.putPrivateData(ComponentView.class, componentView);
// invoke method
final Object retObj = componentView.invoke(context);
Show replies by date