There is no change in the behavior of the way instance are passed. But the question whether you see modified list elements depends on the iteration order: you will see modified lists only if you modify lists contained in entries that not have been seen already by the outer Iterator
. Since the iteration order might change between different HashMap
implementations it might really happen that you see modified lists in one JDK but not another.
The bottom line is that you should not use such nested Iterator
s. When modifying in one loop and looking into it in another loop after the first loop has been finished you will see the modified lists, reliably.