In our examples, we used very simple code. If more complexity is added to any of the methods, especially with parameters (and especially when some of the parameters are objects), it is possible you'll get concurrency issues again:
int getSomething(AnotherMutableClass amc, String whatever){ //... code is here that generates a value "whatever" amc.setProperty(whatever); //...some other code that generates another value "val" amc.setAnotherProperty(val); return amc.getIntValue();}
Even if this method belongs to ImmutableClass and does not affect the state of the ImmutableClass object, it is still a subject of the thread's race and has to be analyzed and protected as needed.
The Collections class has methods that make various ...