impossibl / pgjdbc-ng

A new JDBC driver for PostgreSQL aimed at supporting the advanced features of JDBC and Postgres
https://impossibl.github.io/pgjdbc-ng
Other
600 stars 108 forks source link

fix for NPE in JDBCTypeMetaData #599

Open alex0x08 opened 9 months ago

alex0x08 commented 9 months ago

Hi, got this NPE after H2 upgrade to 2.2.222 (latest) version: pgjdbc-ng-bug

This was taken from "H2 Console" subproject, which I use in combination with your driver. So I observed driver sources and found a place that looks like very simple bug. For sure, there must be more complicated reason for such NPE, but function 'getMaxPrecision()' below has the same check as in PR: type = type.unwrap(); PGType pgType = PGType.valueOf(type); if (pgType == null) { return 0; } So hope this is just small and annoying bug, nothing more. After patch: pgjdbc-ng-patched