You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Tomas Viberg <to...@viberg.nu> on 2002/06/19 15:55:48 UTC

[PATCH] Some patches for the 1.0 branch

Hi all,

while working with Struts 1.0.2 I have found (and corrected) some small problems. They're not an issue in the main branch, but I suppose patches can still be applied to the 1.0 branch? Anyway, here are problems I've found:

1. BeanUtils doesn't convert null values to target type, resulting in NullPointerExceptions when trying to populate a primitive property. This is resolved in Commons BeanUtils as of revision 1.23, and it would be nice if also the Struts BeanUtils could be patched.

2. The ErrorsTag renders error header and footer even if they are null.

3. ConvertUtils fails to convert null values to doubles and floats, since the String constructor of the Double and Float classes throw NullPointerException instead of NumberFormatException.

In addition, I have added "y/n" and "1/0" as valid boolean values, to bring it up to date with the BooleanConverter in Commons BeanUtils.

The patches can be found at http://www.viberg.nu/patches/2002-06-19/

Regards,
Tomas Viberg <to...@viberg.nu>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PATCH] Some patches for the 1.0 branch

Posted by Tomas Viberg <to...@viberg.nu>.
Consider it done...

/ Tomas

----- Original Message ----- 
From: "James Holmes" <jh...@yahoo.com>
To: "Struts Developers List" <st...@jakarta.apache.org>
Sent: Wednesday, June 19, 2002 4:46 PM
Subject: Re: [PATCH] Some patches for the 1.0 branch


> Tomas--
> 
> Thanks for finding the problems and contributing
> patches.  In order to keep track of patches we ask
> that you create a new entry in Bugzilla and attach
> your patches there.
> 
> http://jakarta.apache.org/site/bugs.html
> http://nagoya.apache.org/bugzilla/
> 
> Thanks,
> 
> -james
> james@jamesholmes.com
> http://www.jamesholmes.com/struts/
> 
> 
> --- Tomas Viberg <to...@viberg.nu> wrote:
> > Hi all,
> > 
> > while working with Struts 1.0.2 I have found (and
> > corrected) some small problems. They're not an issue
> > in the main branch, but I suppose patches can still
> > be applied to the 1.0 branch? Anyway, here are
> > problems I've found:
> > 
> > 1. BeanUtils doesn't convert null values to target
> > type, resulting in NullPointerExceptions when trying
> > to populate a primitive property. This is resolved
> > in Commons BeanUtils as of revision 1.23, and it
> > would be nice if also the Struts BeanUtils could be
> > patched.
> > 
> > 2. The ErrorsTag renders error header and footer
> > even if they are null.
> > 
> > 3. ConvertUtils fails to convert null values to
> > doubles and floats, since the String constructor of
> > the Double and Float classes throw
> > NullPointerException instead of
> > NumberFormatException.
> > 
> > In addition, I have added "y/n" and "1/0" as valid
> > boolean values, to bring it up to date with the
> > BooleanConverter in Commons BeanUtils.
> > 
> > The patches can be found at
> > http://www.viberg.nu/patches/2002-06-19/
> > 
> > Regards,
> > Tomas Viberg <to...@viberg.nu>
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PATCH] Some patches for the 1.0 branch

Posted by James Holmes <jh...@yahoo.com>.
Tomas--

Thanks for finding the problems and contributing
patches.  In order to keep track of patches we ask
that you create a new entry in Bugzilla and attach
your patches there.

http://jakarta.apache.org/site/bugs.html
http://nagoya.apache.org/bugzilla/

Thanks,

-james
james@jamesholmes.com
http://www.jamesholmes.com/struts/


--- Tomas Viberg <to...@viberg.nu> wrote:
> Hi all,
> 
> while working with Struts 1.0.2 I have found (and
> corrected) some small problems. They're not an issue
> in the main branch, but I suppose patches can still
> be applied to the 1.0 branch? Anyway, here are
> problems I've found:
> 
> 1. BeanUtils doesn't convert null values to target
> type, resulting in NullPointerExceptions when trying
> to populate a primitive property. This is resolved
> in Commons BeanUtils as of revision 1.23, and it
> would be nice if also the Struts BeanUtils could be
> patched.
> 
> 2. The ErrorsTag renders error header and footer
> even if they are null.
> 
> 3. ConvertUtils fails to convert null values to
> doubles and floats, since the String constructor of
> the Double and Float classes throw
> NullPointerException instead of
> NumberFormatException.
> 
> In addition, I have added "y/n" and "1/0" as valid
> boolean values, to bring it up to date with the
> BooleanConverter in Commons BeanUtils.
> 
> The patches can be found at
> http://www.viberg.nu/patches/2002-06-19/
> 
> Regards,
> Tomas Viberg <to...@viberg.nu>
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>