Skip to content
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.

Commit

Permalink
Add null checks to clear warning from IntelliJ
Browse files Browse the repository at this point in the history
  • Loading branch information
ajsquared committed Jan 7, 2016
1 parent 8ef1ddf commit 53b0097
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/com/etsy/arbiter/OozieWorkflowGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ public void generateOozieWorkflows(String outputBase, List<Workflow> workflows,
Action transition = getTransition(workflowGraph, a);
switch (a.getType()) {
case "start":
if (transition == null) {
throw new RuntimeException("No transition found for start action");
}
directives.add("start")
.attr("to", transition.getName())
.up();
Expand All @@ -141,6 +144,9 @@ public void generateOozieWorkflows(String outputBase, List<Workflow> workflows,
directives.up();
break;
case "join":
if (transition == null) {
throw new RuntimeException(String.format("No transition found for join action %s", a.getName()));
}
directives.add("join")
.attr("name", a.getName())
.attr("to", transition.getName())
Expand Down

0 comments on commit 53b0097

Please sign in to comment.