tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luciano Resende <luckbr1...@gmail.com>
Subject NPE in Widget, Re: svn commit: r1346827 - /tuscany/sca-java-2.x/trunk/modules/implementation-widget-runtime/src/main/java/org/apache/tuscany/sca/implementation/widget/provider/WidgetImplementationInvoker.java
Date Thu, 07 Jun 2012 02:07:34 GMT
On Wed, Jun 6, 2012 at 4:15 AM,  <antelder@apache.org> wrote:
> Author: antelder
> Date: Wed Jun  6 11:15:29 2012
> New Revision: 1346827
>
> URL: http://svn.apache.org/viewvc?rev=1346827&view=rev
> Log:
> Fix NPE with widget sample
>
> Modified:
>    tuscany/sca-java-2.x/trunk/modules/implementation-widget-runtime/src/main/java/org/apache/tuscany/sca/implementation/widget/provider/WidgetImplementationInvoker.java
>
> Modified: tuscany/sca-java-2.x/trunk/modules/implementation-widget-runtime/src/main/java/org/apache/tuscany/sca/implementation/widget/provider/WidgetImplementationInvoker.java
> URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-widget-runtime/src/main/java/org/apache/tuscany/sca/implementation/widget/provider/WidgetImplementationInvoker.java?rev=1346827&r1=1346826&r2=1346827&view=diff
> ==============================================================================
> --- tuscany/sca-java-2.x/trunk/modules/implementation-widget-runtime/src/main/java/org/apache/tuscany/sca/implementation/widget/provider/WidgetImplementationInvoker.java
(original)
> +++ tuscany/sca-java-2.x/trunk/modules/implementation-widget-runtime/src/main/java/org/apache/tuscany/sca/implementation/widget/provider/WidgetImplementationInvoker.java
Wed Jun  6 11:15:29 2012
> @@ -56,7 +56,8 @@ class WidgetImplementationInvoker implem
>     public Message invoke(Message msg) {
>
>         // Get the resource id from the request message
> -        String id = (String)((Object[])msg.getBody())[0];
> +
> +        String id = msg.getBody() == null ? "" : (String)((Object[])msg.getBody())[0];
>         try {
>
>             if (id.length() == 0) {
>
>


Have you seen this using the store application or some other sample ?
Just asking because I noticed that there is a bug on the binding.http
+ widget together which I'm trying to fix by making the widget more
independent.. and I want to make sure I cover all the scenarios that
it is being used.


-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Mime
View raw message