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

Поиск
Список
Период
Сортировка
Искать

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

От:
Jorge Solórzano <noreply@github.com>
Дата:
  Branch: refs/heads/master
  Home:   https://github.com/pgjdbc/pgjdbc
  Commit: bf00387461bafdf0f19a8557bff554e469207cce
      https://github.com/pgjdbc/pgjdbc/commit/bf00387461bafdf0f19a8557bff554e469207cce
  Author: Jorge Solórzano 
  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 




FAQ