mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 21:42:27 +00:00
Changed access modifiers of getBuildingDownstream() and
getBuildingUpstream() to public so they can be accessed from plugins, small refactoring (reuse getTransitiveDownstreamProjects() and getTransitiveUpstreamProjects() respectively)
This commit is contained in:
1 parent
3fb9bdb6b3
commit
b20ef418b8
1 file changed
+4
-4
@@ -1094,10 +1094,10 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
|
||||
* This means eventually there will be an automatic triggering of
|
||||
* the given project (provided that all builds went smoothly.)
|
||||
*/
|
||||
protected AbstractProject getBuildingDownstream() {
|
||||
public AbstractProject getBuildingDownstream() {
|
||||
Set<Task> unblockedTasks = Jenkins.getInstance().getQueue().getUnblockedTasks();
|
||||
|
||||
for (AbstractProject tup : Jenkins.getInstance().getDependencyGraph().getTransitiveDownstream(this)) {
|
||||
for (AbstractProject tup : getTransitiveDownstreamProjects()) {
|
||||
if (tup!=this && (tup.isBuilding() || unblockedTasks.contains(tup)))
|
||||
return tup;
|
||||
}
|
||||
@@ -1111,10 +1111,10 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
|
||||
* This means eventually there will be an automatic triggering of
|
||||
* the given project (provided that all builds went smoothly.)
|
||||
*/
|
||||
protected AbstractProject getBuildingUpstream() {
|
||||
public AbstractProject getBuildingUpstream() {
|
||||
Set<Task> unblockedTasks = Jenkins.getInstance().getQueue().getUnblockedTasks();
|
||||
|
||||
for (AbstractProject tup : Jenkins.getInstance().getDependencyGraph().getTransitiveUpstream(this)) {
|
||||
for (AbstractProject tup : getTransitiveUpstreamProjects()) {
|
||||
if (tup!=this && (tup.isBuilding() || unblockedTasks.contains(tup)))
|
||||
return tup;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user