You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Andrew Kyle Purtell (Jira)" <ji...@apache.org> on 2026/06/29 20:12:00 UTC

[jira] [Updated] (PHOENIX-7947) PhoenixConnection.getTable NPE when auto-unboxing

     [ https://issues.apache.org/jira/browse/PHOENIX-7947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kyle Purtell updated PHOENIX-7947:
-----------------------------------------
    Summary: PhoenixConnection.getTable NPE when auto-unboxing  (was: GlobalConnectionTenantTableIT NPE when auto-unboxing)

> PhoenixConnection.getTable NPE when auto-unboxing
> -------------------------------------------------
>
>                 Key: PHOENIX-7947
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-7947
>             Project: Phoenix
>          Issue Type: Sub-task
>          Components: test
>            Reporter: Andrew Kyle Purtell
>            Assignee: Andrew Kyle Purtell
>            Priority: Minor
>             Fix For: 5.4.0, 5.3.2
>
>
> {{GlobalConnectionTenantTableIT}} has three deterministically failing tests that all throw the same NPE ("Cannot invoke "java.lang.Long.longValue()" because "timestamp" is null at PhoenixConnection.java:643"). The root cause is in {{PhoenixConnection.getTable(@Nullable String tenantId, String fullTableName, @Nullable Long timestamp)}}. Its documented contract says a null timestamp means "use the cache, fall back to a server lookup on miss," and the cache hit path honors that, but the cache miss catch dispatches to {{getTableNoCache(PName, String, long)}} whose third parameter is a primitive long, so when {{timestamp == null}} the JVM auto-unboxes the null {{Long}} and throws a NPE.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)