You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Message.java , the function void copyFrom(Message m) copies propeties as if (m.properties != null) { Set<String> keys = m.properties.keySet(); for (String key : keys) { updateProperty(key, m.getProperty(key)); } }
which add a reference to propeties of the original message instead of a clone of it when a property is such as List<Integer>.
The text was updated successfully, but these errors were encountered:
But what's the best way to fix this? I'm afraid extra .clone() won't cut it either; merely pushing the problem one step further (if at all, depending how well the method is implemented). Should we simply add warning to the documentation about shallow copies of properties?
In
Message.java
, the functionvoid copyFrom(Message m)
copiespropeties
asif (m.properties != null) { Set<String> keys = m.properties.keySet(); for (String key : keys) { updateProperty(key, m.getProperty(key)); } }
which add a reference to
propeties
of the original message instead of a clone of it when a property is such asList<Integer>
.The text was updated successfully, but these errors were encountered: