patch to avoid a NullPointerException
От
Derrick Hudson
Тема
patch to avoid a NullPointerException
Дата
Msg-id
20130216051545.GA27777@dman13.dyndns.org
Список
Дерево обсуждения
patch to avoid a NullPointerException Derrick Hudson <dsh@dman13.dyndns.org>
Re: patch to avoid a NullPointerException Dave Cramer <pg@fastcrypt.com>
Re: patch to avoid a NullPointerException Kris Jurka <books@ejurka.com>
Re: patch to avoid a NullPointerException Dave Cramer <pg@fastcrypt.com>
Re: patch to avoid a NullPointerException Kris Jurka <books@ejurka.com>
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
В списке pgsql-jdbc по дате отправления