setObject bug in postgresql jdbc driver

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема setObject bug in postgresql jdbc driver
Дата
Msg-id 00a601c0c40f$54e6a890$0401a8c0@INSPIRON
обсуждение исходный текст
Список pgsql-general
 
Hi,
 
I have some code which legitimately tries to call setObject(n,o) where o is an Object, and is null. The jdbc driver doesn't check for this type, and as a result fails.
 
 
This is how I changed the code to deal with this.
 
 public void setObject(int parameterIndex, Object x) throws SQLException
 {
    if (x == null){
      // postgres ignores the type so it doesn't matter what we pass
      setNull(parameterIndex,Types.OTHER);
      return;
    }
Is there any reason why it wouldn't check for null right away ?
 
Can someone commit this to the source tree if it is ok?
 
Regards,
 
Dave Cramer
 

В списке pgsql-general по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Address already in use?
Следующее
От: Justin Clift
Дата:
Сообщение: New look for the techdocs website...