[Libreoffice-commits] core.git: wizards/com
Caolán McNamara
caolanm at redhat.com
Tue Mar 1 10:54:15 UTC 2016
wizards/com/sun/star/wizards/db/SQLQueryComposer.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 2fb8c4b642bae77e0a515512450129503db5aa38
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 1 10:53:35 2016 +0000
coverity#1326385 Dereference null return value
Change-Id: I0097e9759c1ac3a1e03d9c2741c109e147dce540
diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
index e6e8c62..d169f7d 100644
--- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
+++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
@@ -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)
{
More information about the Libreoffice-commits
mailing list