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

ValidatorUtils.copyFastHashMap is broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.8.0
    • 1.9.0
    • None
    • None

    Description

      ValidatorUtils.copyFastHashMap is broken which in turn causes Field#clone() to loose hVars and hMsgs. Field#clone().

      This is f.e. used in ValidatorAction#
      handleIndexedField() causing validation to misbehave when using indexedListProperty (which is where we found this).
      Test case that fails in 1.8.0 but works in 1.7:

      public void testCopyFastHashMap() {
        final FastHashMap original = new FastHashMap();
        original.put("key1", "value1");
        original.put("key2", "value2");
        original.put("key3", "value3");
        original.setFast(true);
        final FastHashMap copy = ValidatorUtils.copyFastHashMap(original);
        assertEquals(original, copy);
      }

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            tow Tobias Wildgruber
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: