Search Postgresql Archives

Re: Issue with PSQL JDBC Driver Null Pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Thu, 29 Jul 2021 at 15:44, Bhavesh Mistry <bhavesh.mistry13@xxxxxxxxx> 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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux