Please sign in to comment.
fix: NPE in PGXAConnection$ConnectionHandler.invoke() of .equals(null) (
#1365) The PGXAConnection inner class call-filtering proxy ConnectionHandler special cases calls to equals() by testing if the argument is itself a proxy that should be unwrapped. However it fails to test if the argument is null before calling getClass() on it, resulting in an NPE like java.lang.NullPointerException: null at org.postgresql.xa.PGXAConnection$ConnectionHandler.invoke(PGXAConnection.java:139) Fix by testing for null. While we're at it, also defensively check to ensure there's exactly one argument to .equals. It's not sensible to pass more and will error later anyway.
- Loading branch information...
Showing with 4 additions and 2 deletions.