pgjdbc-ng
pgjdbc-ng copied to clipboard
Second and subsequent calls to free() on PGBuffersArray throw NPE rather than being no-op
The PGBuffersArray class implements java.sql.Array, and the doc for the free() method in that interface states:
If
freeis called multiple times, the subsequent calls tofreeare treated as a no-op.
In the pgjdbc-ng implementation, the second call results in a NullPointerException:
java.lang.NullPointerException: null at com.impossibl.postgres.jdbc.PGBuffersArray.free(PGBuffersArray.java:294) at...
I have a small change to address the issue, will submit a PR shortly.