Skip to content

Commit

Permalink
Merge pull request #2 from jenkinsci/generic-flow-analyzer
Browse files Browse the repository at this point in the history
Generified Flow Search Algorithms
  • Loading branch information
svanoort authored Aug 25, 2016
2 parents 5a35dd0 + 3d3bf57 commit 1d7b255
Show file tree
Hide file tree
Showing 28 changed files with 3,325 additions and 3 deletions.
26 changes: 25 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
target
work
.idea

# IntelliJ project files
*.iml
*.iws
*.ipr
.idea
out

# eclipse project file
.settings
.classpath
.project
build

# vim
*~
*.swp

# ctags
tags

# OS X
.DS_Store

# mvn versions:set
pom.xml.versionsBackup
20 changes: 19 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<developerConnection>scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git</developerConnection>
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
<tag>HEAD</tag>
</scm>
</scm>
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
Expand All @@ -70,5 +70,23 @@
<artifactId>workflow-step-api</artifactId>
<version>1.15</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>workflow-job</artifactId>
<version>1.15</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>workflow-cps</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>workflow-basic-steps</artifactId>
<version>1.15</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,15 @@ public final boolean isRunning() {
/**
* Returns a read-only view of parents.
*/
@Nonnull
public List<FlowNode> getParents() {
if (parents == null) {
parents = loadParents(parentIds);
}
return parents;
}

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

@Restricted(DoNotUse.class)
@Exported(name="parents")
@Nonnull
public List<String> getParentIds() {
List<String> ids = new ArrayList<String>(2);
for (FlowNode parent : getParents()) {
Expand Down
Loading

0 comments on commit 1d7b255

Please sign in to comment.