Update shallow vs deep cloning of objects in Java