[
https://issues.apache.org/jira/browse/HIVE-24782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jason Phelps updated HIVE-24782:
--------------------------------
Description:
In HIVE-22889, it introduced the following lines:
{code:java}
// remove the leading and trailing quotes. hcatalog can miss on some cases.
if (execString.length() > 1 && execString.startsWith("\"") &&
execString.endsWith("\"")) {
execString = execString.substring(1, execString.length() - 1);
}
{code}
When calling Sqoop HCat jobs, or the HCat CLI, it will throw an NPE because
execString is null but not wrapped in the handy Null check that is nearby
{code:java}
if (execString != null) {
{code}
was:
In HIVE-22889, it introduced the following lines:
{code:java}
// remove the leading and trailing quotes. hcatalog can miss on some cases.
if (execString.length() > 1 && execString.startsWith("\"") &&
execString.endsWith("\"")) {
execString = execString.substring(1, execString.length() - 1);
}
{code}
When calling Sqoop HCat jobs, or the HCat CLI, it will through an NPE because
execString is null but not wrapped in the handy Null check that is nearby
{code:java}
if (execString != null) {
{code}
> Fix in HIVE-22889 introduced NPE when using non-WebHCat HCat components
> -----------------------------------------------------------------------
>
> Key: HIVE-24782
> URL: https://issues.apache.org/jira/browse/HIVE-24782
> Project: Hive
> Issue Type: Bug
> Components: HCatalog
> Reporter: Jason Phelps
> Priority: Major
>
> In HIVE-22889, it introduced the following lines:
> {code:java}
> // remove the leading and trailing quotes. hcatalog can miss on some
> cases.
> if (execString.length() > 1 && execString.startsWith("\"") &&
> execString.endsWith("\"")) {
> execString = execString.substring(1, execString.length() - 1);
> }
> {code}
> When calling Sqoop HCat jobs, or the HCat CLI, it will throw an NPE because
> execString is null but not wrapped in the handy Null check that is nearby
> {code:java}
> if (execString != null) {
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)