coverity#1326385 Dereference null return value

Change-Id: I0097e9759c1ac3a1e03d9c2741c109e147dce540
This commit is contained in:
Caolán McNamara
2016-03-01 10:53:35 +00:00
parent 16067d4f90
commit 2fb8c4b642

View File

@@ -242,13 +242,16 @@ public class SQLQueryComposer
}
}
public StringBuilder getFromClause()
public StringBuilder getFromClause() throws SQLException
{
StringBuilder sFromClause = new StringBuilder("FROM");
String[] sCommandNames = CurDBMetaData.getIncludedCommandNames();
for (int i = 0; i < sCommandNames.length; 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()));
if (i < sCommandNames.length - 1)
{