private void addOrModifyEnvInjectBuildWrapper( @Nonnull DescribableList<BuildWrapper, Descriptor<BuildWrapper>> wrappers, @Nonnull BuildWrapper wrapper) throws EnvInjectException { //Iterate through all wrappers and remove the envInjectWrapper if exists: only one is authorized and the new wins Iterator<BuildWrapper> buildWrapperIterator = wrappers.iterator(); while (buildWrapperIterator.hasNext()) { BuildWrapper buildWrapper = buildWrapperIterator.next(); if (buildWrapper.getClass().isAssignableFrom(wrapper.getClass())) { buildWrapperIterator.remove(); } } wrappers.add(wrapper); }
Iterator<AbstractProjectReference> iter = this.getProjectReferences().iterator(); while (iter != null && iter.hasNext()) { AbstractProjectReference apr = iter.next();
Iterator<AbstractProjectReference> iter = this.getProjectReferences().iterator(); while (iter != null && iter.hasNext()) { AbstractProjectReference apr = iter.next();
BuildableItemWithBuildWrappers buildableItemWithBuildWrappers = (BuildableItemWithBuildWrappers) item; DescribableList<BuildWrapper, Descriptor<BuildWrapper>> wrappersList = buildableItemWithBuildWrappers.getBuildWrappersList(); Iterator<BuildWrapper> buildWrapperIterator = wrappersList.iterator(); while (buildWrapperIterator.hasNext()) { BuildWrapper buildWrapper = buildWrapperIterator.next();