Skip to content

Commit

Permalink
Merge pull request #105 from jmao-denver/104-PyDictWrapper-values
Browse files Browse the repository at this point in the history
Remove try with resource in PyDictWrapper.values()
  • Loading branch information
jmao-denver authored Jul 18, 2023
2 parents 689bcde + ecd0aba commit 60f2b49
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/java/org/jpy/PyDictWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,7 @@ public Set<PyObject> keySet() {
*/
@Override
public Collection<PyObject> values() {
try (final PyObject pyObj = PyLib.pyDictValues(this.pyObject.getPointer())) {
return pyObj.asList();
}
return PyLib.pyDictValues(this.pyObject.getPointer()).asList();
}

/**
Expand Down

0 comments on commit 60f2b49

Please sign in to comment.