Uploaded image for project: 'Commons Validator'
  1. Commons Validator
  2. VALIDATOR-23

Validator Range Checking Bug

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • Operating System: other
      Platform: Other

    • 12022

    Description

      See struts See struts bug 10191 for more details.

      The original bug submitter suggested using doubles,
      in the GenericValidator.

      • public static boolean isInRange(int value, int min, int max) {
        + public static boolean isInRange(double value, double min, double max) {

      So doubles so could be compared
      however on the Struts side it may be more useful to do
      RTTI first on the Range objects and check for
      Byte, Short, Integer, Long, Float, Double in that
      in that order based on the Max, Min set, I am assuming they are
      stored as Objects also ?

      I have never used the Validator framework myself
      so I there could be more changes needed than
      those above.

      What do you think ? rleland@apache.org

      So what I am requesting is a
      + public static boolean isInRange(double value, double min, double max)
      + public static boolean isInRange(short value, short min, short max) for more details.

      The original bug submitter suggested using doubles,
      in the GenericValidator.

      • public static boolean isInRange(int value, int min, int max) {
        + public static boolean isInRange(double value, double min, double max) {

      So doubles so could be compared
      however on the Struts side it may be more useful to do
      RTTI first on the Range objects and check for
      Byte, Short, Integer, Long, Float, Double in that
      in that order based on the Max, Min set, I am assuming they are
      stored as Objects also ?

      I have never used the Validator framework myself
      so I there could be more changes needed than
      those above.

      What do you think ? rleland@apache.org

      So what I am requesting is a
      + public static boolean isInRange(double value, double min, double max)
      + public static boolean isInRange(short value, short min, short max)

      Attachments

        Activity

          People

            Unassigned Unassigned
            strutsbugs@freetocreate.org strutsbugs
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: