coverity#1326385 Dereference null return value
Change-Id: I0097e9759c1ac3a1e03d9c2741c109e147dce540
This commit is contained in:
@@ -242,13 +242,16 @@ public class SQLQueryComposer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public StringBuilder getFromClause()
|
public StringBuilder getFromClause() throws SQLException
|
||||||
{
|
{
|
||||||
StringBuilder sFromClause = new StringBuilder("FROM");
|
StringBuilder sFromClause = new StringBuilder("FROM");
|
||||||
String[] sCommandNames = CurDBMetaData.getIncludedCommandNames();
|
String[] sCommandNames = CurDBMetaData.getIncludedCommandNames();
|
||||||
for (int i = 0; i < sCommandNames.length; i++)
|
for (int i = 0; i < sCommandNames.length; i++)
|
||||||
{
|
{
|
||||||
CommandName curCommandName = getComposedCommandByDisplayName(sCommandNames[i]);
|
CommandName curCommandName = getComposedCommandByDisplayName(sCommandNames[i]);
|
||||||
|
if (curCommandName == null) {
|
||||||
|
throw new SQLException("Error: CommandName unavailable");
|
||||||
|
}
|
||||||
sFromClause.append(" ").append(curCommandName.getComposedName()).append(" ").append(quoteName(curCommandName.getAliasName()));
|
sFromClause.append(" ").append(curCommandName.getComposedName()).append(" ").append(quoteName(curCommandName.getAliasName()));
|
||||||
if (i < sCommandNames.length - 1)
|
if (i < sCommandNames.length - 1)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user