You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Michael Szlapa <Mi...@ITSolv.ca> on 2003/02/15 03:26:32 UTC
[PATCH][Beanutils] LocaleConvertUtils
Hi,
Just started using LocaleConvertUtils and I must say it is great to have the
converter utils that allow fine tuning of conversion patterns. However I
have found that although individual converters usually work,
LocaleConvertUtils has probably never worked (there is an error during
initialization of static member). Given then fact that the rest of bean
utils is very high quality, IMHO it should not have not been included yet in
the official release version of the Beanutils (1.5/1.6).
Anyway, I have tried my best to fix the problems, and included patch in the
CVS and humane formats. I do not have previous experience in the J-Commons
development but hopefully the patch is useful. Here is the list of changes:
- Create LocaleConvertUtilsTestCase class trying to make it as close as
possible to original ConvertUtilsTestCase
- Where functionality LocaleConvertUtils does not match yet ConvertUtils, I
have left not working test in place by either commenting then or renaming
test methods. Hopefully this will allow to identify the remaining gaps in
functionality of between both Locale Converters and traditional converters.
- Converters now handle the null patterns more gracefully. As converters
default pattern to null in constructors, it makes sense to handle it,
rather then throw NullPntrExc.
- Improved parse method for Number related converters so they return
instance of the proper type (Integer, Byte, etc.). this was mainly to pass
the test case.
- Made default format patterns of java.sql.Date, Time, and Timestamp classes
consistent with default behaviour of the valueOf / toString methods.
- I have changed the build file by removing converter specific tests and
adding LocaleConvertUtils test, as it seems to be the case for the
traditional converters. Maybe we should keep all test cases though?
- Added a little logging where code was changed.
Hope it is useful,
Michael Szlapa
Michael@ITSolv.ca
http://ITSolv.ca
Re: [PATCH][Beanutils] LocaleConvertUtils
Posted by Michael Szlapa <Mi...@ITSolv.ca>.
Hi Robert,
I am very sorry for my late reply, I did try to monitor the list closely but
got a little overwhelmed by number of messages and missed your reply (next
time sill put the filter).
I have created new deffect report #17624
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17624 and attached patch
to it. I am not attaching the recreated patch to the email since I am not
sure what happened to the attachement (seems to be in place in my Sent copy
of the email).
I did not split the patch into several patches since all changes revolve
around same set of few files and are related to implementing test case that
is similar to BeanUtils..
Hope you find it useful, let me know if you have any comments, I could
implement them if necessary.
Michael Szlapa
Michael@ITSolv.ca
http://ITSolv.ca
----- Original Message -----
From: "robert burrell donkin" <ro...@blueyonder.co.uk>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Wednesday, February 19, 2003 3:05 PM
Subject: Re: [PATCH][Beanutils] LocaleConvertUtils
> On Saturday, February 15, 2003, at 02:26 AM, Michael Szlapa wrote:
>
> > Hi,
>
> hi Michael
>
> i didn't want to look at this before the 1.6.1 release since it was bug
> fixes only.
>
> > Just started using LocaleConvertUtils and I must say it is great to have
> > the
> > converter utils that allow fine tuning of conversion patterns. However I
> > have found that although individual converters usually work,
> > LocaleConvertUtils has probably never worked (there is an error during
> > initialization of static member). Given then fact that the rest of bean
> > utils is very high quality, IMHO it should not have not been included
yet
> > in
> > the official release version of the Beanutils (1.5/1.6).
>
> i had to think about including it - but i don't regret committing it. a
> number of users have remarked how useful they found it :)
>
> with a bit of help, hopefully now we'll be able to push it forward. your
> original post was missing the patch. could you repost?
>
> if you haven't contributed to jakarta before, you might want to read:
>
> http://jakarta.apache.org/site/getinvolved.html
>
> and
>
> http://jakarta.apache.org/commons/patches.html
>
> since your patches are on different issues, what would be great is if you
> could separate them so that i can commit a patch for each issue
> individually. (don't worry if that's too much effort.)
>
> - robert
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [PATCH][Beanutils] LocaleConvertUtils
Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Saturday, February 15, 2003, at 02:26 AM, Michael Szlapa wrote:
> Hi,
hi Michael
i didn't want to look at this before the 1.6.1 release since it was bug
fixes only.
> Just started using LocaleConvertUtils and I must say it is great to have
> the
> converter utils that allow fine tuning of conversion patterns. However I
> have found that although individual converters usually work,
> LocaleConvertUtils has probably never worked (there is an error during
> initialization of static member). Given then fact that the rest of bean
> utils is very high quality, IMHO it should not have not been included yet
> in
> the official release version of the Beanutils (1.5/1.6).
i had to think about including it - but i don't regret committing it. a
number of users have remarked how useful they found it :)
with a bit of help, hopefully now we'll be able to push it forward. your
original post was missing the patch. could you repost?
if you haven't contributed to jakarta before, you might want to read:
http://jakarta.apache.org/site/getinvolved.html
and
http://jakarta.apache.org/commons/patches.html
since your patches are on different issues, what would be great is if you
could separate them so that i can commit a patch for each issue
individually. (don't worry if that's too much effort.)
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org