reta commented on code in PR #3475:
URL: https://github.com/apache/cxf/pull/3475#discussion_r4026603937
##########
core/src/main/java/org/apache/cxf/bus/managers/ServerLifeCycleManagerImpl.java:
##########
@@ -63,7 +63,10 @@ public void startServer(Server server) {
}
public void stopServer(Server server) {
- ListIterator<ServerLifeCycleListener> li =
listeners.listIterator(listeners.size());
+ @SuppressWarnings("unchecked")
+ final CopyOnWriteArrayList<ServerLifeCycleListener> cloned =
+ (CopyOnWriteArrayList<ServerLifeCycleListener>) listeners.clone();
+ ListIterator<ServerLifeCycleListener> li =
cloned.listIterator(cloned.size());
Review Comment:
> @reta What do you think about putting this into a common place like
[CollectionUtils](https://github.com/apache/cxf/blob/main/core/src/main/java/org/apache/cxf/common/util/CollectionUtils.java)
to avoid duplicating it?
Sure @coheigea , I think we could keep it closer to XxxLifecycleManagers,
let me push a change shortly, thanks!
--
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]