mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
another overloaded removeProperty
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14767 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
e9d491a841
commit
672ffe80bc
1 file changed
+17
@@ -314,6 +314,23 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
|
||||
save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the property of the given type.
|
||||
*
|
||||
* @return
|
||||
* The property that was just removed.
|
||||
* @since 1.279
|
||||
*/
|
||||
public <T extends JobProperty> T removeProperty(Class<T> clazz) throws IOException {
|
||||
for (JobProperty<? super JobT> p : properties) {
|
||||
if (clazz.isInstance(p)) {
|
||||
removeProperty(p);
|
||||
return clazz.cast(p);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all the job properties configured for this job.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user