Skip to content

Commit

Permalink
Rebase, use try-with-resources
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Nett <[email protected]>
  • Loading branch information
rnett committed Apr 28, 2021
1 parent f085bab commit 59750dc
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,12 @@ public final class GraphOperationBuilder implements OperationBuilder {
GraphOperationBuilder(Graph graph, String type, String name, boolean dangerousGradientBuilder) {
this.graph = graph;
this.dangerousGradientBuilder = dangerousGradientBuilder;
Graph.Reference r = graph.ref();
try {
try (Graph.Reference r = graph.ref()) {
if (dangerousGradientBuilder) {
this.unsafeNativeHandle = allocateDangerousGradient(r.nativeHandle(), type, name);
} else {
this.unsafeNativeHandle = allocate(r.nativeHandle(), type, name);
}
} finally {
r.close();
}
}

Expand Down

0 comments on commit 59750dc

Please sign in to comment.