Under Java 1.7 it didn't matter what instance was returned from the getter, but under 1.8 this matters. Under 1.8 you have to assign the collection passed in to your class variable and you have to return your class variable, you can't return a new Collection containing the elements. I was trying to search for any documentation on this change but I can't find anything.
It seems that the JAXB implementation is very fragile. There is no documentation in the JAXB chanelog that would indicate this as being a fundamental change to the library: https://jaxb.java.net/nonav/2.2.5-4/docs/release-documentation.html#a-2-2-5u4
JDK JAXB version info: https://jaxb.java.net/guide/Which_JAXB_RI_is_included_in_which_JDK_.html
What is the upgrade path for JAXB? Is there even one from 1.7 to 1.8?
Is JAXB even worth using if it's this fragile from JDK to JDK?
This question is more about upgrading JAXB as it seems it's really not backwards compatible and there is no documentation that I could find that says: "WARNING! not compatible with previous JAXB version if you use collections make sure you make the following changes."