Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED JENKINS-17451] "projects tied to slave" shows unrelated maven …
…module jobs. shows TopLevelItem only.
- Loading branch information
Showing
2 changed files
with
6 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,6 +61,7 @@ | |
import com.thoughtworks.xstream.converters.UnmarshallingContext; | ||
import com.thoughtworks.xstream.io.HierarchicalStreamWriter; | ||
import com.thoughtworks.xstream.io.HierarchicalStreamReader; | ||
import java.util.logging.Logger; | ||
|
||
/** | ||
* Group of {@link Node}s. | ||
|
@@ -335,13 +336,13 @@ private String toString(Collection<? extends ModelObject> model) { | |
@Exported | ||
public List<AbstractProject> getTiedJobs() { | ||
List<AbstractProject> r = new ArrayList<AbstractProject>(); | ||
for (AbstractProject<?,?> p : Jenkins.getInstance().getAllItems(AbstractProject.class)) { | ||
for (AbstractProject<?,?> p : Jenkins.getInstance().getItems(AbstractProject.class)) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jglick
Member
|
||
if(this.equals(p.getAssignedLabel())) | ||
r.add(p); | ||
} | ||
return r; | ||
} | ||
|
||
public boolean contains(Node node) { | ||
return getNodes().contains(node); | ||
} | ||
|
No, this is wrong, regresses JENKINS-15666. My fault for not writing a test for it I guess.