pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: dmp <danap@ttc-cmc.net>
To: Dave Cramer <pg@fastcrypt.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Bug report: NullPointerException from Driver.connect when passed a Properties with non-string values
Date: Mon, 28 Jan 2013 13:43:46 -0700
Message-ID: <5106E302.6010004@ttc-cmc.net> (raw)
In-Reply-To: <CADK3HHJrkvmLKcRtkOf6i_a1sk2+haewd-2NeuEgCNNz1AT11Q@mail.gmail.com>
References: <74B305A4-D481-4D4C-8E0E-8EBAB50CF584@highfleet.com>
	<5106C07B.8020800@ttc-cmc.net>
	<CADK3HHK9HgJ+-2x9cBMbH9VryUoNvTAbzcG1D+xgN9WR=05vEw@mail.gmail.com>
	<E67FF73D-0FCA-406A-A03B-BFB1398B9936@highfleet.com>
	<CADK3HHKv+_nhrHsw9T8ymt277FiyQ_x3jU95LE6ObGaD60Sm-Q@mail.gmail.com>
	<CADK3HHJrkvmLKcRtkOf6i_a1sk2+haewd-2NeuEgCNNz1AT11Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

Nathaniel patch should be fine. I think you have to test the properties Dave
as he has done. Its just a matter if you want it the SQLException or return
NULL.

Did you test this Nathaniel?

danap.

Dave Cramer wrote:
> My proposed patch is this
>
> if (url.startsWith("jdbc:postgresql:")) {
>              return null;
>          }
> Right at the top of getConnection, before we do any real work.
>
> Thoughts ?
>
> Dave Cramer
>
> dave.cramer(at)credativ(dot)ca
> http://www.credativ.ca


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (21+ messages)  latest in thread

Message-ID: <5106E302.6010004@ttc-cmc.net>
Permalink:  ../5106E302.6010004@ttc-cmc.net/
Also on:    postgresql.org/message-id/5106E302.6010004@ttc-cmc.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: danap@ttc-cmc.net, pg@fastcrypt.com
  Subject: Re: Bug report: NullPointerException from Driver.connect when passed a Properties with non-string values
  In-Reply-To: <5106E302.6010004@ttc-cmc.net>
  References: <74B305A4-D481-4D4C-8E0E-8EBAB50CF584@highfleet.com> <5106C07B.8020800@ttc-cmc.net> <CADK3HHK9HgJ+-2x9cBMbH9VryUoNvTAbzcG1D+xgN9WR=05vEw@mail.gmail.com> <E67FF73D-0FCA-406A-A03B-BFB1398B9936@highfleet.com> <CADK3HHKv+_nhrHsw9T8ymt277FiyQ_x3jU95LE6ObGaD60Sm-Q@mail.gmail.com> <CADK3HHJrkvmLKcRtkOf6i_a1sk2+haewd-2NeuEgCNNz1AT11Q@mail.gmail.com> <5106E302.6010004@ttc-cmc.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox