Kaydet (Commit) 2fb8c4b6 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1326385 Dereference null return value

Change-Id: I0097e9759c1ac3a1e03d9c2741c109e147dce540
üst 16067d4f
...@@ -242,13 +242,16 @@ public class SQLQueryComposer ...@@ -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)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment