void () { if (myShared.isEmpty()) { return; } Collection<RunnerAndConfigurationSettings> sharedConfigurations = getSharedConfigurations(); List<RunnerAndConfigurationSettings> canNotBeShared = new ArrayList<>(); Iterator<RunnerAndConfigurationSettings> iterator = sharedConfigurations.iterator(); while (iterator.hasNext()) { final RunnerAndConfigurationSettings configuration = iterator.next(); if (!configuration.isShared()) { iterator.remove(); canNotBeShared.add(configuration); } } if (!canNotBeShared.isEmpty()) { canNotBeShared.addAll(getLocalConfigurations()); setStartupConfigurations(sharedConfigurations, canNotBeShared); } }