My bad. I'm blind. I'll fix it and check it into
CVS.
David
--- juraj Lenharcik <[EMAIL PROTECTED]>
wrote:
> when i set the locale for germany , the fromatter
> object is still null after
> the check. i set this line:
>
> formatter =
> DateFormat.getDateInstance(DateFormat.SHORT,
> locale);
>
> instead of:
> DateFormat.getDateInstance(DateFormat.SHORT,
> locale);
>
> after this the formatter object was written and is
> not null.
>
>
> juraj
>
> -----Ursprüngliche Nachricht-----
> Von: David Winterfeldt
> [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 13. September 2001 16:41
> An: [EMAIL PROTECTED]
> Betreff: Re: Bug in Struts validator !
>
>
> I don't see that you changed anything except to add
> braces around the if statement. It already checks
> if
> the locale is null and uses the default locale if it
> is null. Am I missing what you changed?
>
> David
>
> --- juraj Lenharcik <[EMAIL PROTECTED]>
> wrote:
> > hi all,
> >
> > In the class GenericValidator, when you use an
> > another locale than the
> > default you get a null pointer exception. i tried
> it
> > with the german locale
> > settings. i fixed the bug in this lines:
> >
> > DateFormat formatter = null;
> > if (locale != null){
> > ==> formatter =
> > DateFormat.getDateInstance(DateFormat.SHORT,
> > locale);
> > }else{
> > ==> formatter =
> > DateFormat.getDateInstance(DateFormat.SHORT,
> > Locale.getDefault());
> > }
> > formatter.setLenient(false);
> >
> > can someone change it and check it into the cvs?
> >
> >
> > thanks & bye
> > juraj
> >
>
>
> __________________________________________________
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information
>
http://dailynews.yahoo.com/fc/US/Emergency_Information/
__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/