Re: patch to avoid a NullPointerException

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Derrick Hudson <dsh(at)dman13(dot)dyndns(dot)org>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: patch to avoid a NullPointerException
Date: 2013-02-20 12:01:00
Message-ID: CADK3HH+-7Rt0mBH-S0b7SXywLC5OFKtefHXv7-EVwrvotyg+tw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Derrick,

Thanks, applied

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On Sat, Feb 16, 2013 at 12:15 AM, Derrick Hudson <dsh(at)dman13(dot)dyndns(dot)org>wrote:

> 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
>
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message News Subsystem 2013-02-20 14:01:23
Previous Message Dave Cramer 2013-02-20 11:42:39 Re: Patch to add a new loglevel(OFF) to turn off logging