aziubin commented on PR #1033:
URL: https://github.com/apache/cxf/pull/1033#issuecomment-1331034447
@reta looks good. I tested new fix in my environment and it works well.
There is one thing, which I wanted to discuss with you. The
`MessageContentsList(List<?> values)` constructor can be used to create new
`MessageContentsList` instance based on existing generic list. There is a
possibility that existing code uses this constructor, passing another
`MessageContentsList` as argument. In this hypothetical situation, `removed`
hash set of the original `MessageContentsList` will not be taken into account,
and all markers will be lost in new instance of `MessageContentsList`. With
original implementation all removed markers will be presented. To solve this,
we may change code like below:
public MessageContentsList(List<?> values) {
super(values);
if (values instanceof MessageContentsList) {
removed = new HashSet<>(((MessageContentsList) values).removed);
}
}
I verified that `MessageContentsList` is never passed as argument of
`MessageContentsList(List<?> values)` in CXF source code and this additional
change can be necessary just to keep backward compatibility if existing custom
code passes `MessageContentsList` to `MessageContentsList(List<?> values)`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]