@Override public String getValueString() { return Util.join(getValues(),"/"); }
/** * Previously we used to persist {@link Axis}, but now those are divided into subtypes. * So upon deserialization, resolve to the proper type. */ public Object readResolve() { if (getClass()!=Axis.class) return this; if (getName().equals("jdk")) return new JDKAxis(getValues()); if (getName().equals("label")) return new LabelAxis(getName(),getValues()); return new TextAxis(getName(),getValues()); }
/** * Previously we used to persist {@link Axis}, but now those are divided into subtypes. * So upon deserialization, resolve to the proper type. */ public Object readResolve() { if (getClass()!=Axis.class) return this; if (getName().equals("jdk")) return new JDKAxis(getValues()); if (getName().equals("label")) return new LabelAxis(getName(),getValues()); return new TextAxis(getName(),getValues()); }
/** * Previously we used to persist {@link Axis}, but now those are divided into subtypes. * So upon deserialization, resolve to the proper type. */ public Object readResolve() { if (getClass()!=Axis.class) return this; if (getName().equals("jdk")) return new JDKAxis(getValues()); if (getName().equals("label")) return new LabelAxis(getName(),getValues()); return new TextAxis(getName(),getValues()); }
/** * Previously we used to persist {@link Axis}, but now those are divided * into subtypes. So upon deserialization, resolve to the proper type. */ public Object readResolve() { if (getClass() != Axis.class) { return this; } if (getName().equals("jdk")) { return new JDKAxis(getValues()); } if (getName().equals("label")) { return new LabelAxis(getName(), getValues()); } return new TextAxis(getName(), getValues()); }
/** * Previously we used to persist {@link Axis}, but now those are divided into subtypes. * So upon deserialization, resolve to the proper type. */ public Object readResolve() { if (getClass()!=Axis.class) return this; /* This method is necessary only because earlier versions of Jenkins treated axis names "label" and "jdk" differently, plus Axis was a concrete class, and we need to be able to read that back. So this measure is not needed for newly added Axes. */ if (getName().equals("jdk")) return new JDKAxis(getValues()); if (getName().equals("label")) return new LabelAxis(getName(),getValues()); return new TextAxis(getName(),getValues()); }
@Before public void setUp() throws Exception { repo = tmp.getRoot(); createPretendSlave("slave_one"); createPretendSlave("slave_two"); matrixProject = j.createProject(MatrixProject.class, "matrix_test"); matrixProject.setScm(new MercurialSCM(null, repo.getPath(), null, null, null, null, false)); matrixProject.setAxes(new AxisList(new LabelAxis("label", Arrays.asList("slave_one", "slave_two")))); // TODO switch to MercurialContainer m.hg(repo, "init"); m.touchAndCommit(repo, "a"); }