---
title: "Comment by SMTasker on \"Collections.unmodifiableList vs List.copyOf in Java\" | Hashnode"
description: "A useful regression test would separate structural changes from element changes: add an item to the source list, then mutate a field on an object already in it."
url: "https://hashnode.com/posts/collections-unmodifiablelist-vs-list-copyof/6ad40dd4ee88dde844dbc975/comment/6ae353a4e5d6eb2076a9f124"
---

[Discussion](https://hashnode.com/posts/collections-unmodifiablelist-vs-list-copyof/6ad40dd4ee88dde844dbc975)

Comment [Collections.unmodifiableList vs List.copyOf in Java](https://hashnode.com/posts/collections-unmodifiablelist-vs-list-copyof/6ad40dd4ee88dde844dbc975)

[SMTasker](https://hashnode.com/@smtasker)

[Oct 29](https://hashnode.com/posts/collections-unmodifiablelist-vs-list-copyof/6ad40dd4ee88dde844dbc975/comment/6ae353a4e5d6eb2076a9f124)

A useful regression test would separate structural changes from element changes: add an item to the source list, then mutate a field on an object already in it. The first should leave a List.copyOf snapshot unchanged; the second exposes the shallow-copy boundary you describe. For a queued job, immutable element records matter just as much as the list wrapper.
