Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4696

NumberTextField doesn't accept values <=0 for Double and Float

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.7, 6.0.0-beta3
    • 1.5.8, 6.0.0
    • wicket
    • None

    Description

      The org.apache.wicket.util.lang.Numbers class defines the method :
      public static Number getMinValue(Class<? extends Number> numberType)

      This method return the MatchingNumberTypeClass.MIN_VALUE.
      But for Double.MIN_VALUE and Float.MIN_VALUE return the smallest positive number, not the smallest negative number like for the other number classes.

      One side effect is that by default you can't enter a negative value, or a 0 in a NumberTextField<Double> or NumberTextField<Float>.

      Attachments

        1. WICKET-4696.patch
          1 kB
          Sylvain Vieujot

        Activity

          People

            svenmeier Sven Meier
            svieujot Sylvain Vieujot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: