Skip to content

Commit

Permalink
Merge pull request #43 from jglick/CustomDescribableModel-JENKINS-44892
Browse files Browse the repository at this point in the history
CustomDescribableModel would supersede less general methods in StepDescriptor
  • Loading branch information
dwnusbaum authored Jun 3, 2019
2 parents 559c713 + 955d53e commit a75da41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>1.17</version>
<version>1.18</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import hudson.model.Run;
import hudson.model.TaskListener;
import org.jenkinsci.plugins.structs.SymbolLookup;
import org.jenkinsci.plugins.structs.describable.CustomDescribableModel;
import org.jenkinsci.plugins.structs.describable.DescribableModel;
import org.jenkinsci.plugins.structs.describable.DescribableParameter;
import org.jenkinsci.plugins.structs.describable.UninstantiatedDescribable;
Expand Down Expand Up @@ -197,7 +198,9 @@ public boolean isMetaStep() {
* Named arguments and values, à la Ant task or Maven mojos.
* Generally should follow the semantics of {@link DescribableModel#instantiate}.
* @return an instance of {@link #clazz}
* @deprecated instead use {@link CustomDescribableModel}
*/
@Deprecated
public Step newInstance(Map<String,Object> arguments) throws Exception {
return new DescribableModel<>(clazz).instantiate(arguments);
}
Expand Down Expand Up @@ -226,7 +229,9 @@ public Map<String,Object> defineArguments(Step step) throws UnsupportedOperation
* @param step a fully-configured step (assignable to {@link #clazz})
* @return arguments that could be passed to {@link #newInstance} to create a similar step instance
* @throws UnsupportedOperationException if this descriptor lacks the ability to do such a calculation
* @deprecated instead use {@link CustomDescribableModel}
*/
@Deprecated
public UninstantiatedDescribable uninstantiate(Step step) throws UnsupportedOperationException {
if (Util.isOverridden(StepDescriptor.class, getClass(), "uninstantiate", Step.class)) {
// Newer clients are called older implementations.
Expand Down

0 comments on commit a75da41

Please sign in to comment.