Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [riena-dev] NPE from AbstractSWTWidgetRidget.saveData()

Stefan,

I agree. The more I look at the our method the more I think direct
access to widget.data is a bad idea. We should use the official API
instead: w.setData(key, Obj) / w.getData(key)

Elias.

On Wed, Sep 22, 2010 at 10:48 PM, Liebig, Stefan
<Stefan.Liebig@xxxxxxxxxxxx> wrote:
> Hi Elias,
>
>> -----Ursprüngliche Nachricht-----
>> Von: riena-dev-bounces@xxxxxxxxxxx [mailto:riena-dev-
>> bounces@xxxxxxxxxxx] Im Auftrag von Elias Volanakis
>> Gesendet: Donnerstag, 23. September 2010 05:53
>> An: Riena Developers list
>> Betreff: [riena-dev] NPE from AbstractSWTWidgetRidget.saveData()
>>
>> I am seeing some NPEs from saveData() in the tests (for example in
>> CompositeTableRidgetTest).
>
> Yes, this needs to be fixed.
>
>>
>> From my POV there are two things that need to be changed there:
>>
>> 1. widget.data can be null (see contract of widget.getData()). The
>> saveData() method has to be able to deal with this 2. Why are we using
>> reflection instead of widget.getData() ?
>
> Yes, even I remembered the getData() and was wondering but getData() does not always return the content of the data field.
> What it returns depends on its internal state field. I guess that this the reason for using reflection.
>
> Another problem is assuming that the data field is always an object array in the method saveData(), or?
>
>>
>> Greetings from Portland,
>> Elias.
>
> Tschüß,
> Stefan
>>
>> --
>> Elias Volanakis | Technical Lead | http://eclipsesource.com
>> elias@xxxxxxxxxxxxxxxxx | +1 503 929 5537 | @evolanakis
>> _______________________________________________
>> riena-dev mailing list
>> riena-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/riena-dev
>
> -------------------------------------------------------------
> compeople AG
> Untermainanlage 8
> 60329 Frankfurt/Main
> fon: +49 (0) 69 / 27 22 18 0
> fax: +49 (0) 69 / 27 22 18 22
> web: http://www.compeople.de/
>
> Vorstand: Jürgen Wiesmaier
> Aufsichtsratsvorsitzender: Christian Glanz
>
> Sitz der Gesellschaft: Frankfurt/Main
> Handelsregister Frankfurt HRB 56759
> Ust-Ident.-Nr: DE207665352
> -------------------------------------------------------------
>
> _______________________________________________
> riena-dev mailing list
> riena-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/riena-dev
>



-- 
Elias Volanakis | Technical Lead | http://eclipsesource.com
elias@xxxxxxxxxxxxxxxxx | +1 503 929 5537 | @evolanakis


Back to the top