Patch for some bugs/annoyances - Mailing list pgsql-jdbc

From Patrick Higgins
Subject Patch for some bugs/annoyances
Date
Msg-id 1071173821.24112.31.camel@phiggins.transzap.com
Whole thread Raw
Responses Re: Patch for some bugs/annoyances  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
Here's a patch fixing a bug in throwing a PSQLException which causes
helpful information to not be displayed. The code is clearly trying to
call the PSQLException(String, PSQLState, Object[]) constructor, but
instead gets the PSQLException(String, Object) constructor because it
forgets the PSQLState.

This first bug may have been causing the second; I can't remember
anymore. Anyway, sometimes this.state in PSQLException is null causing
getSQLState() to throw a NullPointerException. I've included a check for
this and return the string "null" when the state is null.

Finally, I've changed PSQLState to implement Serializable so that I can
throw SQLExceptions to remote callers.

Attachment

pgsql-jdbc by date:

Previous
From: milton Leite
Date:
Subject: PostgreSQL & DB2 !!!
Next
From: Kris Jurka
Date:
Subject: Re: Patch for some bugs/annoyances