|
From: Keith D. <kd...@cs...> - 2004-11-29 20:46:59
|
Juergen/Sergey,
This is really a spring rich issue. I changed it where =
ApplicationServices
can easily be instantiated and configured without a context, now, to =
support
easier unit testing. Sergey, the following:
Application.services().setPropertyEditorRegistry(new=20
DefaultPropertyEditorRegistry());
Should work fine now. ApplicationServices will just instantiate its own
StaticApplicationContext if none is set once it's queried for general =
use
post configuration.
Keith
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf =
Of
Serg Bogatyrjov
Sent: Monday, November 29, 2004 3:12 PM
To: spr...@li...
Subject: [Springframework-developer] Re: Harmless patch for
ApplicationObjectSupport
I do not sure that my correction is appropriate. I just did a smallest=20
change to make it working. Now I can just place here example from=20
org.springframework.binding.form.FormModelTest (spring-rcp subproject):
Application application =3D new Application(new=20
DefaultApplicationLifecycleAdvisor());
Application.services().setPropertyEditorRegistry(new=20
DefaultPropertyEditorRegistry());
Application.services().setApplicationContext(new=20
StaticApplicationContext());
Each call to services() method results a null pointer exception. The=20
third row where setApplicationContext is called makes me laugh.
There is the next call chain:
Application.services() --> instance().getServices() -->=20
services.setApplicationContext(context)
While the last call argument context is null.
Thanks for your attention,
Serge Bogatyrjov.
j=FCrgen h=F6ller [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...
> =20
> Juergen
> =20
>=20
> ________________________________
>=20
> 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
>=20
>=20
>=20
> 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.
>=20
> Best regards,
> Serge Bogatyrjov.
>=20
>=20
>=20
>=20
> -------------------------------------------------------
> 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.=20
> http://productguide.itmanagersjournal.com/
-------------------------------------------------------
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.=20
http://productguide.itmanagersjournal.com/
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|