| From: | Derrick Hudson <dsh(at)dman13(dot)dyndns(dot)org> |
|---|---|
| To: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | patch to avoid a NullPointerException |
| Date: | 2013-02-16 05:15:45 |
| Message-ID: | 20130216051545.GA27777@dman13.dyndns.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
I have observed a NullPointerException raised in PGobject.equals().
The attached patch checks for a null value and avoids raising an
exception.
I am working with an application which makes extensive use of
user-defined types, particularly enums, and also uses EclipseLink. I
found it necessary to create EclipseLink converters to convert from
the Java representation of the user-defined types to a PGobject so
that PgJDBC sends the correct type information to the PostgreSQL
server. It appears to be necessary to create an PGobject instance
with the correct type label and a null value in order to store a NULL
in a column with a user-defined type. However, this results in a
NullPointerException when EclipseLink tests the two PGobject instances
for equality.
-Derrick
| Attachment | Content-Type | Size |
|---|---|---|
| patch | text/plain | 685 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bryan Varner | 2013-02-16 07:16:40 | Working toward a JTA 1.0.1 Compliant XADataSource |
| Previous Message | Marc Fournier | 2013-02-15 00:04:32 | Re: persistent connections and 'set variable' |