Tobias Wildgruber created VALIDATOR-492:
-------------------------------------------

             Summary: ValidatorUtils.copyFastHashMap is broken
                 Key: VALIDATOR-492
                 URL: https://issues.apache.org/jira/browse/VALIDATOR-492
             Project: Commons Validator
          Issue Type: Bug
    Affects Versions: 1.8.0
            Reporter: Tobias Wildgruber


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);}}
{{}}}

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to