Maybe I am misunderstanding what you are asking, but if you're asking
if Java 1.5's DecimalFormat.parse(String) method incorrectly accepts
bad input and silently truncates it, I believe that it is true, and
will probably continue to be true through 6, 7, etc.   After all, Sun
wouldn't want to break backwards compatability :-)

On 7/8/08, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> On Tue, Jul 8, 2008 at 12:24 PM, Martin Marinschek
>  <[EMAIL PROTECTED]> wrote:
>  > sure, we should.
>  >
>  > Leonardo, can you eventually take care of this (or ask Paul eventually
>  > to take care of this ;)?
>  >
>  > @Matze: In MyFaces 1.2, the fix is easy - just calling the setter
>  > method, but in 1.1, this ParsePosition thing has to be used? Or is
>  > this ParsePosition thing to be used all over?
>
>
> well, in 1.2 I am only interested in the fix.
>  SInce that guy is using Java5.
>
>  The RI already made my suggested fix.
>
>  Since I haven't got feedback here,
>  I haven't committed it.
>
>  In MyFaces 1.2.x (trunk) I am doing it now.
>
>  Thanks,
>
> Matthias
>
>
>  >
>  > regards,
>  >
>  > Martin
>  >
>  > On 6/17/08, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
>  >> Hi,
>  >>
>  >> please check:
>  >> https://issues.apache.org/jira/browse/TRINIDAD-1124
>  >>
>  >> since myfaces 1.2 is running on Java5, do we want the above "fix" in
>  >> <f:convertNumber /> as well ?
>  >>
>  >> Sure, we have to double-check with the TCK, but just curious.
>  >>
>  >> -Matthias
>  >>
>  >> On Mon, Jun 16, 2008 at 6:03 PM, Matthias Wessendorf <[EMAIL PROTECTED]>
>  >> wrote:
>  >>> On Fri, Jun 13, 2008 at 6:04 AM, Mike Kienenberger <[EMAIL PROTECTED]>
>  >>> wrote:
>  >>>> Use the sandbox convertNumber with a BigDecimal type.
>  >>> Ok,
>  >>> I don't use this now.
>  >>> Since Java5 there is a parseBigDecimal() on DecimalFormat.
>  >>> In Trinidad I just turn that guy on. So, that fixes it.
>  >>>
>  >>> Sandbox still still requires Java1.4, right?
>  >>>
>  >>> -matthias
>  >>>
>  >>>
>  >>>>
>  >>>> You may also want to take a few minutes and add the workaround for the
>  >>>> bug in the java currency parser (DecimalFormat) as described in
>  >>>>
>  >>>>  http://issues.apache.org/jira/browse/TOMAHAWK-610
>  >>>>
>  >>>> if it hasn't already been taken care of.
>  >>>>
>  >>>> On 6/13/08, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
>  >>>>> On Thu, Jun 12, 2008 at 9:55 PM, Leonardo Uribe <[EMAIL PROTECTED]>
>  >>>>> wrote:
>  >>>>>  > BigDecimal converter could solve this problem, maybe this value is
>  >>>>> converted
>  >>>>>  > as double or float as is.
>  >>>>>
>  >>>>>
>  >>>>> ok, the demo was a little bit to simple.
>  >>>>>  We want currency formatting etc. Means what the convertNumber actually
>  >>>>> does.
>  >>>>>
>  >>>>>
>  >>>>>  -Matthias
>  >>>>>
>  >>>>>
>  >>>>>  >
>  >>>>>  > regards
>  >>>>>  >
>  >>>>>  > Leonardo Uribe
>  >>>>>  >
>  >>>>>  > On Thu, Jun 12, 2008 at 11:45 PM, Matthias Wessendorf
>  >>>>> <[EMAIL PROTECTED]>
>  >>>>>  > wrote:
>  >>>>>  >>
>  >>>>>  >> Hi,
>  >>>>>  >>
>  >>>>>  >> perhaps someone of you knows a workaround for this:
>  >>>>>  >>
>  >>>>>  >> Take this JSP code:
>  >>>>>  >> <h:inputText value="#{bean.number}">
>  >>>>>  >>  <f:convertNumber />
>  >>>>>  >> </h:inputText>
>  >>>>>  >>
>  >>>>>  >> For instance, when the entered value is "333.111" the actual stored
>  >>>>>  >> value is 333.1109999999999899955582804977893829345703125
>  >>>>>  >>
>  >>>>>  >> I think the mathematic explanation for that in here:
>  >>>>>  >> http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems
>  >>>>>  >>
>  >>>>>  >> My users want to have 333.111 instead of the accurate value...
>  >>>>>  >>
>  >>>>>  >> Any ideas?
>  >>>>>  >>
>  >>>>>  >> Thanks!
>  >>>>>  >>
>  >>>>>  >> --
>  >>>>>  >> Matthias Wessendorf
>  >>>>>  >>
>  >>>>>  >> further stuff:
>  >>>>>  >> blog: http://matthiaswessendorf.wordpress.com/
>  >>>>>  >> sessions: http://www.slideshare.net/mwessendorf
>  >>>>>  >> mail: matzew-at-apache-dot-org
>  >>>>>  >
>  >>>>>  >
>  >>>>>
>  >>>>>
>  >>>>>
>  >>>>>
>  >>>>> --
>  >>>>>
>  >>>>> Matthias Wessendorf
>  >>>>>
>  >>>>>  further stuff:
>  >>>>>  blog: http://matthiaswessendorf.wordpress.com/
>  >>>>>  sessions: http://www.slideshare.net/mwessendorf
>  >>>>>  mail: matzew-at-apache-dot-org
>  >>>>>
>  >>>>
>  >>>
>  >>>
>  >>>
>  >>> --
>  >>> Matthias Wessendorf
>  >>>
>  >>> further stuff:
>  >>> blog: http://matthiaswessendorf.wordpress.com/
>  >>> sessions: http://www.slideshare.net/mwessendorf
>  >>> mail: matzew-at-apache-dot-org
>  >>>
>  >>
>  >>
>  >>
>  >> --
>  >> Matthias Wessendorf
>  >>
>  >> further stuff:
>  >> blog: http://matthiaswessendorf.wordpress.com/
>  >> sessions: http://www.slideshare.net/mwessendorf
>  >> mail: matzew-at-apache-dot-org
>  >>
>  >
>  >
>  > --
>  >
>  > http://www.irian.at
>  >
>  > Your JSF powerhouse -
>  > JSF Consulting, Development and
>  > Courses in English and German
>  >
>  > Professional Support for Apache MyFaces
>  >
>
>
>
>
> --
>
> Matthias Wessendorf
>
>  further stuff:
>  blog: http://matthiaswessendorf.wordpress.com/
>  sessions: http://www.slideshare.net/mwessendorf
>  mail: matzew-at-apache-dot-org
>

Reply via email to