[
https://issues.apache.org/jira/browse/PHOENIX-7947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Viraj Jasani updated PHOENIX-7947:
----------------------------------
Fix Version/s: 5.3.3
(was: 5.3.2)
> 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: core, test
> Reporter: Andrew Kyle Purtell
> Assignee: Andrew Kyle Purtell
> Priority: Minor
> Fix For: 5.4.0, 5.3.3
>
>
> {{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)