Permalink
Browse files

Fix null check in getTablePrivileges

The null check to report the owner as grantor if it's missing is
broken.
  • Loading branch information...
marschall committed Dec 13, 2015
1 parent 66a5876 commit 244ce59f13d7b6e06a059c832a1348a74ee5e2fe
Showing with 1 addition and 1 deletion.
  1. +1 −1 org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java
@@ -2866,7 +2866,7 @@ else if (connection.haveMinimumServerVersion(ServerVersion.v7_3))
for (Object grant : grants) {
String[] grantTuple = (String[]) grant;
// report the owner as grantor if it's missing
String grantor = grantTuple[0].equals(null) ? owner : grantTuple[0];
String grantor = grantTuple[0] == null ? owner : grantTuple[0];
// owner always has grant privileges
String grantable = owner.equals(grantee) ? "YES" : grantTuple[1];
byte[][] tuple = new byte[7][];

0 comments on commit 244ce59

Please sign in to comment.