Project: springxd
Issue XD-1782: Exception thrown when all containers are shut down
If all containers are shut down and there's a stream deployed this exception is thrown on the admin: {noformat} java.util.NoSuchElementException java.util.ArrayList$Itr.next(ArrayList.java:839) org.springframework.xd.dirt.server.ModuleDeploymentWriter.writeDeployment(ModuleDeploymentWriter.java:260) org.springframework.xd.dirt.server.ContainerListener.redeployStreamModule(ContainerListener.java:432) org.springframework.xd.dirt.server.ContainerListener.onChildLeft(ContainerListener.java:403) org.springframework.xd.dirt.server.ContainerListener.childEvent(ContainerListener.java:159) org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:509) org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:503) org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:92) com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297) org.apache.curator.framework.listen.ListenerContainer.forEach(ListenerContainer.java:83) org.apache.curator.framework.recipes.cache.PathChildrenCache.callListeners(PathChildrenCache.java:500) org.apache.curator.framework.recipes.cache.EventOperation.invoke(EventOperation.java:35) org.apache.curator.framework.recipes.cache.PathChildrenCache$10.run(PathChildrenCache.java:762) java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) java.util.concurrent.FutureTask.run(FutureTask.java:266) java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) java.util.concurrent.FutureTask.run(FutureTask.java:266) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) java.lang.Thread.run(Thread.java:744) {noformat} This is a regression caused by the earlier code refactoring for stream deployment.
Story points: 2