You might want to add a couple of modifications better enforce an integer constraint:
NumberFormat nf = NumberFormat.getNumberInstance(locale); nf.setMaximumFractionDigits(0); nf.setParseIntegerOnly(true); Brent Worden > -----Original Message----- > From: Phil Steitz [mailto:[EMAIL PROTECTED] > Sent: Saturday, June 25, 2005 10:31 PM > To: Jakarta Commons Developers List > Subject: Re: [math][patch] 1.4 dependency in FractionFormat > > Committed. Pls review this and the other Fraction changes. > > Phil > > On 6/12/05, Mark Diggory <[EMAIL PROTECTED]> wrote: > > +1 > > > > Phil Steitz wrote: > > > > >When building with 1.3, I discovered that the FractionFormat class > > >introduced a 1.4 dependency. The change below removes the > dependency > > >and the tests pass. If there are no objections, I will > commit this, > > >which will fix the build on 1.3 > > > > > >--- > src/java/org/apache/commons/math/fraction/FractionFormat.java > (revision > > >178359) > > >+++ > src/java/org/apache/commons/math/fraction/FractionFormat.java > (working copy) > > >@@ -150,7 +150,7 @@ > > > * @return the default number format specific to the > given locale. > > > > > > */ > > > > > > private static NumberFormat getDefaultNumberFormat(Locale > > > locale) { > > > > > >- NumberFormat nf = NumberFormat.getIntegerInstance(locale); > > > > > >+ NumberFormat nf = NumberFormat.getNumberInstance(locale); > > > > > > return nf; > > > > > > } > > > > > >Phil > > > > > > >--------------------------------------------------------------------- > > >To unsubscribe, e-mail: [EMAIL PROTECTED] > > >For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]