Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mVOw0-0006rE-LC for pgsql-jdbc@arkaria.postgresql.org; Wed, 29 Sep 2021 02:03:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mVOvz-0005zt-KK for pgsql-jdbc@arkaria.postgresql.org; Wed, 29 Sep 2021 02:02:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mVOvz-0005zl-CL for pgsql-jdbc@lists.postgresql.org; Wed, 29 Sep 2021 02:02:59 +0000 Received: from out-26.smtp.github.com ([192.30.252.209] helo=smtp.github.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mVOvw-0005Dd-QT for pgsql-jdbc@lists.postgresql.org; Wed, 29 Sep 2021 02:02:59 +0000 Received: from github.com (hubbernetes-node-5b09722.ash1-iad.github.net [10.56.115.23]) by smtp.github.com (Postfix) with ESMTPA id A87325E050D for ; Tue, 28 Sep 2021 19:02:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1632880974; bh=+LEcXu6ajxEnmcAi+lEcZrryOWGBt5R5nG/VuL9EbAk=; h=Date:From:To:Subject:From; b=vl/1Kdb1yglRrQl24VHOQjmZOMcs3B3SdNJu3z6CiRK2vf1VXhBhqnT+YapcVU1Ot wA9ZLXjUbVj2kwyClZJso3LJxjJsneDpOhQkwsWh30o+DzYN6vrdwHslO1XJetGNpF a7xbB/WznkQqw09EF8e0HFLdJKqhk/pJqDMU4x6Y= Date: Tue, 28 Sep 2021 19:02:54 -0700 From: =?UTF-8?B?Sm9yZ2UgU29sw7NyemFubw==?= To: pgsql-jdbc@lists.postgresql.org Message-ID: Subject: [pgjdbc/pgjdbc] bf0038: fix: handle nulls when the following clasess are u... Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Approved: 58GruLoMopuc X-GitHub-Recipient-Address: pgsql-jdbc@lists.postgresql.org X-Auto-Response-Suppress: All List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Branch: refs/heads/master=0D Home: https://github.com/pgjdbc/pgjdbc=0D Commit: bf00387461bafdf0f19a8557bff554e469207cce=0D https://github.com/pgjdbc/pgjdbc/commit/bf00387461bafdf0f19a8557bff= 554e469207cce=0D Author: Jorge Sol=C3=B3rzano =0D Date: 2021-09-29 (Wed, 29 Sep 2021)=0D =0D Changed paths:=0D M CHANGELOG.md=0D M pgjdbc/src/main/java/org/postgresql/geometric/PGbox.java=0D M pgjdbc/src/main/java/org/postgresql/geometric/PGcircle.java=0D M pgjdbc/src/main/java/org/postgresql/geometric/PGline.java=0D M pgjdbc/src/main/java/org/postgresql/geometric/PGlseg.java=0D M pgjdbc/src/main/java/org/postgresql/geometric/PGpath.java=0D M pgjdbc/src/main/java/org/postgresql/geometric/PGpoint.java=0D M pgjdbc/src/main/java/org/postgresql/geometric/PGpolygon.java=0D M pgjdbc/src/main/java/org/postgresql/jdbc/PgConnection.java=0D M pgjdbc/src/main/java/org/postgresql/jdbc/PgPreparedStatement.java=0D= M pgjdbc/src/main/java/org/postgresql/util/PGInterval.java=0D M pgjdbc/src/main/java/org/postgresql/util/PGmoney.java=0D M pgjdbc/src/main/java/org/postgresql/util/PGobject.java=0D A pgjdbc/src/test/java/org/postgresql/test/jdbc2/PGObjectGetTest.java= =0D A pgjdbc/src/test/java/org/postgresql/test/jdbc2/PGObjectSetTest.java= =0D =0D Log Message:=0D -----------=0D fix: handle nulls when the following clasess are used: PGbox, PGcircle,= PGline, PGlseg, PGpath, PGpoint, PGpolygon, and PGmoney (#2271)=0D =0D 1) PGobject.setValue(null) can be used to set the wrapped value to null=0D= Note: previously the sub-classes of PGobject threw NPE for setValue(null)= =0D 2) Return null from `getValue` in case the typed null is received from th= e database=0D 3) Assume PGBinaryObject#lengthInBytes =3D=3D 0 means the value should be= set as null when sending data to the database=0D =0D see #1870=0D =0D Co-authored-by: Vladimir Sitnikov =0D =0D =0D