/** * 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()); }