A DESCRIPTION OF THE REQUEST : Map is not able to do the deep cloning, while calling the clone() method on it.. It just uses the reference copy, not creating the another cloneed object. JUSTIFICATION : This feature should be there because, if i need another map very similar to the same map and i want to retain the first map as static and changing the cloned map, the actual map should not be change. To do this, clone() method in the collection object need to be changed to perfrom deep cloning insteed of just copying the same references. Either modify clone() method or need to introduce another method to do this stuffs. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - The Actual map should not changed, when ever i am changing the cloned map. ACTUAL - The Actual map is also getting changed, when ever i am changing the cloned map.
|