diff --git a/core/src/main/java/hudson/matrix/Combination.java b/core/src/main/java/hudson/matrix/Combination.java index 13bcc5a12d..e369063dd2 100644 --- a/core/src/main/java/hudson/matrix/Combination.java +++ b/core/src/main/java/hudson/matrix/Combination.java @@ -70,17 +70,26 @@ public final class Combination extends TreeMap implements Compara /** * Converts to the ID string representation: * axisName=value,axisName=value,... + * + * @param sep1 + * The separator between multiple axes. + * @param sep2 + * The separator between axis name and value. */ - public String toString() { + public String toString(char sep1, char sep2) { StringBuilder buf = new StringBuilder(); for (Map.Entry e : entrySet()) { - if(buf.length()>0) buf.append(','); - buf.append(e.getKey()).append('=').append(e.getValue()); + if(buf.length()>0) buf.append(sep1); + buf.append(e.getKey()).append(sep2).append(e.getValue()); } if(buf.length()==0) buf.append("default"); // special case to avoid 0-length name. return buf.toString(); } + public String toString() { + return toString(',','='); + } + /** * Reverse operation of {@link #toString()}. */ diff --git a/core/src/main/java/hudson/matrix/MatrixConfiguration.java b/core/src/main/java/hudson/matrix/MatrixConfiguration.java index a621c9dde6..58d20d212b 100644 --- a/core/src/main/java/hudson/matrix/MatrixConfiguration.java +++ b/core/src/main/java/hudson/matrix/MatrixConfiguration.java @@ -85,7 +85,7 @@ public class MatrixConfiguration extends Project public FilePath getWorkspace() { Node node = getLastBuiltOn(); if(node==null) node = Hudson.getInstance(); - return node.getWorkspaceFor(getParent()).child(getName()); + return node.getWorkspaceFor(getParent()).child(getCombination().toString('/','/')); } @Override