Skip to content

Commit

Permalink
Change exception type on addEdge
Browse files Browse the repository at this point in the history
Blueprints tests require that addEdge(...) calls with a null label
throw IllegalArgumentException.  We used to throw
NullPointerException.
  • Loading branch information
dalaro committed Jun 11, 2013
1 parent a9609b9 commit 65ff57f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ public Edge addEdge(Object id, Vertex outVertex, Vertex inVertex, String label)

@Override
public TitanEdge addEdge(TitanVertex outVertex, TitanVertex inVertex, String label) {
if (null == label) {
throw new IllegalArgumentException("Edge label must be non-null");
}
return addEdge(outVertex, inVertex, getEdgeLabel(label));
}

Expand Down

0 comments on commit 65ff57f

Please sign in to comment.