From 259ac08c90651f91fb766735582df43c540cfaf5 Mon Sep 17 00:00:00 2001 From: jianfengmao Date: Tue, 4 Jul 2023 19:22:47 -0600 Subject: [PATCH 1/2] Remove try with resource in PDW values() --- src/main/java/org/jpy/PyDictWrapper.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/org/jpy/PyDictWrapper.java b/src/main/java/org/jpy/PyDictWrapper.java index d7aca90b..3310512d 100644 --- a/src/main/java/org/jpy/PyDictWrapper.java +++ b/src/main/java/org/jpy/PyDictWrapper.java @@ -174,9 +174,7 @@ public Set keySet() { */ @Override public Collection values() { - try (final PyObject pyObj = PyLib.pyDictValues(this.pyObject.getPointer())) { - return pyObj.asList(); - } + return PyLib.pyDictValues(this.pyObject.getPointer()).asList() } /** From ecd0aba38c6bf0f38bd8e35c695b1056f5d65a36 Mon Sep 17 00:00:00 2001 From: jianfengmao Date: Tue, 4 Jul 2023 19:32:16 -0600 Subject: [PATCH 2/2] Fix syntax error --- src/main/java/org/jpy/PyDictWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jpy/PyDictWrapper.java b/src/main/java/org/jpy/PyDictWrapper.java index 3310512d..c6686514 100644 --- a/src/main/java/org/jpy/PyDictWrapper.java +++ b/src/main/java/org/jpy/PyDictWrapper.java @@ -174,7 +174,7 @@ public Set keySet() { */ @Override public Collection values() { - return PyLib.pyDictValues(this.pyObject.getPointer()).asList() + return PyLib.pyDictValues(this.pyObject.getPointer()).asList(); } /**