Skip to content

Commit 1d7b255

Browse files
authored
Merge pull request #2 from jenkinsci/generic-flow-analyzer
Generified Flow Search Algorithms
2 parents 5a35dd0 + 3d3bf57 commit 1d7b255

28 files changed

+3325
-3
lines changed

.gitignore

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
11
target
22
work
3-
.idea
3+
4+
# IntelliJ project files
45
*.iml
6+
*.iws
7+
*.ipr
8+
.idea
9+
out
10+
11+
# eclipse project file
12+
.settings
13+
.classpath
14+
.project
15+
build
16+
17+
# vim
18+
*~
19+
*.swp
20+
21+
# ctags
22+
tags
23+
24+
# OS X
25+
.DS_Store
26+
27+
# mvn versions:set
28+
pom.xml.versionsBackup

pom.xml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<developerConnection>scm:git:[email protected]:jenkinsci/${project.artifactId}-plugin.git</developerConnection>
4949
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
5050
<tag>HEAD</tag>
51-
</scm>
51+
</scm>
5252
<repositories>
5353
<repository>
5454
<id>repo.jenkins-ci.org</id>
@@ -70,5 +70,23 @@
7070
<artifactId>workflow-step-api</artifactId>
7171
<version>1.15</version>
7272
</dependency>
73+
<dependency>
74+
<groupId>${project.groupId}</groupId>
75+
<artifactId>workflow-job</artifactId>
76+
<version>1.15</version>
77+
<scope>test</scope>
78+
</dependency>
79+
<dependency>
80+
<groupId>${project.groupId}</groupId>
81+
<artifactId>workflow-cps</artifactId>
82+
<version>2.2</version>
83+
<scope>test</scope>
84+
</dependency>
85+
<dependency>
86+
<groupId>${project.groupId}</groupId>
87+
<artifactId>workflow-basic-steps</artifactId>
88+
<version>1.15</version>
89+
<scope>test</scope>
90+
</dependency>
7391
</dependencies>
7492
</project>

src/main/java/org/jenkinsci/plugins/workflow/graph/FlowNode.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,15 @@ public final boolean isRunning() {
114114
/**
115115
* Returns a read-only view of parents.
116116
*/
117+
@Nonnull
117118
public List<FlowNode> getParents() {
118119
if (parents == null) {
119120
parents = loadParents(parentIds);
120121
}
121122
return parents;
122123
}
123124

125+
@Nonnull
124126
private List<FlowNode> loadParents(List<String> parentIds) {
125127
List<FlowNode> _parents = new ArrayList<FlowNode>(parentIds.size());
126128
for (String parentId : parentIds) {
@@ -135,6 +137,7 @@ private List<FlowNode> loadParents(List<String> parentIds) {
135137

136138
@Restricted(DoNotUse.class)
137139
@Exported(name="parents")
140+
@Nonnull
138141
public List<String> getParentIds() {
139142
List<String> ids = new ArrayList<String>(2);
140143
for (FlowNode parent : getParents()) {

0 commit comments

Comments
 (0)