|
From: Serg B. <ser...@ma...> - 2004-11-29 20:12:45
|
I do not sure that my correction is appropriate. I just did a smallest
change to make it working. Now I can just place here example from
org.springframework.binding.form.FormModelTest (spring-rcp subproject):
Application application = new Application(new
DefaultApplicationLifecycleAdvisor());
Application.services().setPropertyEditorRegistry(new
DefaultPropertyEditorRegistry());
Application.services().setApplicationContext(new
StaticApplicationContext());
Each call to services() method results a null pointer exception. The
third row where setApplicationContext is called makes me laugh.
There is the next call chain:
Application.services() --> instance().getServices() -->
services.setApplicationContext(context)
While the last call argument context is null.
Thanks for your attention,
Serge Bogatyrjov.
jürgen höller [werk3AT] wrote:
> No problem, in principle. I just wonder what exactly you need this for? Shouldn't we at least reset the internal context state of the ApplicationObjectSupport instance if the passed-in context reference was null? Simply ignoring the call in that case, leaving the internal state as-is, doesn't seem entirely clean...
>
> Juergen
>
>
> ________________________________
>
> Von: spr...@li... im Auftrag von Serg Bogatyrjov
> Gesendet: Sa 27.11.2004 18:53
> An: spr...@li...
> Betreff: [Springframework-developer] Harmless patch for ApplicationObjectSupport
>
>
>
> This small correction will reduce efforts of writing junit tests. I
> found the need of this correction while making tests working in
> spring-rich-client project.
>
> Best regards,
> Serge Bogatyrjov.
>
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
|