Re: Issue with PSQL JDBC Driver Null Pointer

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: Issue with PSQL JDBC Driver Null Pointer
Дата
Msg-id CADK3HHL2A=KJ8pZr9eNnf2+5FAjEspAVsTAmobAB0To2UUxNHQ@mail.gmail.com
обсуждение исходный текст
Ответ на Issue with PSQL JDBC Driver Null Pointer  (Bhavesh Mistry <bhavesh.mistry13@gmail.com>)
Ответы Re: Issue with PSQL JDBC Driver Null Pointer  (Bhavesh Mistry <bhavesh.mistry13@gmail.com>)
Список pgsql-general


On Thu, 29 Jul 2021 at 15:44, Bhavesh Mistry <bhavesh.mistry13@gmail.com> wrote:
Hi Dave,

It still does not address the NPE issue.  If an alias is NULL. What should be the behavior?


public String getTypeForAlias(String alias) {
String type = TYPE_ALIASES.get(alias);
if (type != null) {
return type;
}
type = TYPE_ALIASES.get(alias.toLowerCase()) // NPE STILL HERE;
if (type == null) {
type = alias;
}
//populate for future use
TYPE_ALIASES.put(alias, type);
return type;
}
 

Very good question. I guess we should return null in this case.

I'll fix that

Dave

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

Предыдущее
От: Bhavesh Mistry
Дата:
Сообщение: Re: Issue with PSQL JDBC Driver Null Pointer
Следующее
От: Edson Carlos Ericksson Richter
Дата:
Сообщение: Re: Issue with PSQL JDBC Driver Null Pointer