[pgjdbc/pgjdbc] bf0038: fix: handle nulls when the following clasess are u...

From: Jorge Solórzano <noreply(at)github(dot)com>
To: pgsql-jdbc(at)lists(dot)postgresql(dot)org
Subject: [pgjdbc/pgjdbc] bf0038: fix: handle nulls when the following clasess are u...
Date: 2021-09-29 02:02:54
Message-ID: pgjdbc/pgjdbc/push/refs/heads/master/a2085c-bf0038@github.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: bf00387461bafdf0f19a8557bff554e469207cce
https://github.com/pgjdbc/pgjdbc/commit/bf00387461bafdf0f19a8557bff554e469207cce
Author: Jorge Solórzano <jorsol(at)gmail(dot)com>
Date: 2021-09-29 (Wed, 29 Sep 2021)

Changed paths:
M CHANGELOG.md
M pgjdbc/src/main/java/org/postgresql/geometric/PGbox.java
M pgjdbc/src/main/java/org/postgresql/geometric/PGcircle.java
M pgjdbc/src/main/java/org/postgresql/geometric/PGline.java
M pgjdbc/src/main/java/org/postgresql/geometric/PGlseg.java
M pgjdbc/src/main/java/org/postgresql/geometric/PGpath.java
M pgjdbc/src/main/java/org/postgresql/geometric/PGpoint.java
M pgjdbc/src/main/java/org/postgresql/geometric/PGpolygon.java
M pgjdbc/src/main/java/org/postgresql/jdbc/PgConnection.java
M pgjdbc/src/main/java/org/postgresql/jdbc/PgPreparedStatement.java
M pgjdbc/src/main/java/org/postgresql/util/PGInterval.java
M pgjdbc/src/main/java/org/postgresql/util/PGmoney.java
M pgjdbc/src/main/java/org/postgresql/util/PGobject.java
A pgjdbc/src/test/java/org/postgresql/test/jdbc2/PGObjectGetTest.java
A pgjdbc/src/test/java/org/postgresql/test/jdbc2/PGObjectSetTest.java

Log Message:
-----------
fix: handle nulls when the following clasess are used: PGbox, PGcircle, PGline, PGlseg, PGpath, PGpoint, PGpolygon, and PGmoney (#2271)

1) PGobject.setValue(null) can be used to set the wrapped value to null
Note: previously the sub-classes of PGobject threw NPE for setValue(null)
2) Return null from `getValue` in case the typed null is received from the database
3) Assume PGBinaryObject#lengthInBytes == 0 means the value should be set as null when sending data to the database

see #1870

Co-authored-by: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jorge Solórzano 2021-09-29 02:55:55 [pgjdbc/pgjdbc] cef1e1: chore: Update CHANGELOG and README to 42.2.24 rele...
Previous Message Jorge Solórzano 2021-09-28 02:11:08 [pgjdbc/pgjdbc] a2085c: chore: More42.2 site fixes (#2035) (#2270)