You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2016/11/30 21:33:58 UTC

[jira] [Updated] (KYLIN-2216) Potential NPE in model#findTable() call

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

Ted Yu updated KYLIN-2216:
--------------------------
    Description: 
In DimensionDesc :
{code}
        if (table != null)
            table = table.toUpperCase();

        DataModelDesc model = cubeDesc.getModel();
        tableRef = model.findTable(this.getTable());
{code}

If table is null, there would be NPE in findTable():
{code}
    public TableRef findTable(String table) throws IllegalArgumentException {
        TableRef result = tableNameMap.get(table.toUpperCase());
{code}

  was:
In DimensionDesc :
{code}
        if (table != null)
            table = table.toUpperCase();

        DataModelDesc model = cubeDesc.getModel();
        tableRef = model.findTable(this.getTable());
{code}
If table is null, there would be NPE in findTable():
{code}
    public TableRef findTable(String table) throws IllegalArgumentException {
        TableRef result = tableNameMap.get(table.toUpperCase());
{code}


> Potential NPE in model#findTable() call
> ---------------------------------------
>
>                 Key: KYLIN-2216
>                 URL: https://issues.apache.org/jira/browse/KYLIN-2216
>             Project: Kylin
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> In DimensionDesc :
> {code}
>         if (table != null)
>             table = table.toUpperCase();
>         DataModelDesc model = cubeDesc.getModel();
>         tableRef = model.findTable(this.getTable());
> {code}
> If table is null, there would be NPE in findTable():
> {code}
>     public TableRef findTable(String table) throws IllegalArgumentException {
>         TableRef result = tableNameMap.get(table.toUpperCase());
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)