This is an automated email from the ASF dual-hosted git repository. virajjasani pushed a commit to branch 5.2 in repository https://gitbox.apache.org/repos/asf/phoenix.git
commit f0c6449ab91ff4c099bbfdf63b3388f153e99b80 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 9bd595ba71..a69f88f356 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 @@ -630,7 +630,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; }
