This is an automated email from the ASF dual-hosted git repository. virajjasani pushed a commit to branch 5.3 in repository https://gitbox.apache.org/repos/asf/phoenix.git
commit 7b4d9bab252542b7a045cf9642a58171fac39f79 Author: Andrew Purtell <[email protected]> AuthorDate: Tue Jun 30 10:51:42 2026 -0700 PHOENIX-7947 GlobalConnectionTenantTableIT NPE when auto-unboxing (#2558) Co-authored-by: Claude Opus 4.8[1m] <[email protected]> --- .../src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java b/phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java index 44ab9c99ae..2e2fa51154 100644 --- a/phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java +++ b/phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java @@ -640,7 +640,13 @@ public class PhoenixConnection throw new TableNotFoundException(fullTableName); } } catch (TableNotFoundException e) { - table = getTableNoCache(pTenantId, fullTableName, timestamp); + // timestamp is @Nullable Long; avoid a Long -> long auto-unboxing NPE when the caller + // asked for the latest table (null timestamp) and the cache missed. + if (timestamp == null) { + table = getTableNoCache(pTenantId, fullTableName); + } else { + table = getTableNoCache(pTenantId, fullTableName, timestamp); + } } return table; }
