Source:
private Set<MatrixConfiguration> rebuildConfigurations(MatrixBuildExecution context) throws IOException { { File[] oldDirs = getConfigurationsDir().listFiles(new FileFilter() { public boolean accept(File child) { return child.isDirectory() && !child.getName().startsWith("axis-"); } }); if(oldDirs!=null) { for (File dir : oldDirs) { try { Combination c = Combination.fromString(dir.getName()); final File target = getRootDirFor(c); if (!dir.renameTo(target)) { LOGGER.log(Level.WARNING, "Cannot rename directory {0} to {1}", new Object[]{dir, target}); } } catch (IllegalArgumentException e) { } } } } CopyOnWriteMap.Tree<Combination,MatrixConfiguration> configurations = new CopyOnWriteMap.Tree<Combination,MatrixConfiguration>(); loadConfigurations(getConfigurationsDir(),configurations,Collections.<String,String>emptyMap()); this.configurations = configurations; Iterable<Combination> activeCombinations; if (context!=null) { List<Set<String>> axesList = Lists.newArrayList(); for (Axis axis : axes) axesList.add(Sets.newLinkedHashSet(axis.rebuild(context))); activeCombinations = Iterables.transform(Sets.cartesianProduct(axesList), new Function<List<String>, Combination>() { public Combination apply(@Nullable List<String> strings) { assert strings != null; return new Combination(axes, strings); } }); } else { activeCombinations = axes.list(); } final Set<MatrixConfiguration> active = new LinkedHashSet<MatrixConfiguration>(); final boolean isDynamicFilter = isDynamicFilter(getCombinationFilter()); for (Combination c : activeCombinations) { if(isDynamicFilter || c.evalGroovyExpression(axes,getCombinationFilter())) { LOGGER.fine("Adding configuration: " + c); MatrixConfiguration config = configurations.get(c); if(config==null) { config = new MatrixConfiguration(this,c); config.onCreatedFromScratch(); config.save(); configurations.put(config.getCombination(), config); } active.add(config); } } this.activeConfigurations = active; return active; }

Target:
Set<MatrixConfiguration> rebuildConfigurations(MatrixBuildExecution context) throws IOException { { File[] oldDirs = getConfigurationsDir().listFiles(new FileFilter() { public boolean accept(File child) { return child.isDirectory() && !child.getName().startsWith("axis-"); } }); if(oldDirs!=null) { for (File dir : oldDirs) { try { Combination c = Combination.fromString(dir.getName()); final File target = getRootDirFor(c); if (!dir.renameTo(target)) { LOGGER.log(Level.WARNING, "Cannot rename directory {0} to {1}", new Object[]{dir, target}); } } catch (IllegalArgumentException e) { } } } } CopyOnWriteMap.Tree<Combination,MatrixConfiguration> configurations = new CopyOnWriteMap.Tree<Combination,MatrixConfiguration>(); loadConfigurations(getConfigurationsDir(),configurations,Collections.<String,String>emptyMap()); this.configurations = configurations; Iterable<Combination> activeCombinations; if (context!=null) { List<Set<String>> axesList = Lists.newArrayList(); for (Axis axis : axes) axesList.add(Sets.newLinkedHashSet(axis.rebuild(context))); activeCombinations = Iterables.transform(Sets.cartesianProduct(axesList), new Function<List<String>, Combination>() { public Combination apply(@Nullable List<String> strings) { assert strings != null; return new Combination(axes, strings); } }); } else { activeCombinations = axes.list(); } final Set<MatrixConfiguration> active = new LinkedHashSet<MatrixConfiguration>(); final boolean isDynamicFilter = isDynamicFilter(getCombinationFilter()); for (Combination c : activeCombinations) { if(isDynamicFilter || c.evalGroovyExpression(axes,getCombinationFilter())) { LOGGER.fine("Adding configuration: " + c); MatrixConfiguration config = configurations.get(c); if(config==null) { config = new MatrixConfiguration(this,c); config.onCreatedFromScratch(); config.save(); configurations.put(config.getCombination(), config); } active.add(config); } } this.activeConfigurations = active; return active; }