[
https://issues.jboss.org/browse/TEIID-1705?page=com.atlassian.jira.plugin...
]
Steven Hawkins commented on TEIID-1705:
---------------------------------------
Ideally I would rather that none of the code has to consider invalid cases. It makes
sense now that this was added quite a while ago for the expression builder, but I think it
would make more sense to just use a null constant rather than passing a null value.
Encountered NPE in SQLStringVisitor for TIMESTAMPADD and
TIMESTAMPDIFF
----------------------------------------------------------------------
Key: TEIID-1705
URL:
https://issues.jboss.org/browse/TEIID-1705
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.4
Reporter: Mark Drilling
Assignee: Steven Hawkins
Attachments: SQLStringVisitor-Patch.txt
I was using expression builder in Designer when I encountered this NPE.
java.lang.NullPointerException
at org.teiid.query.sql.visitor.SQLStringVisitor.visit(SQLStringVisitor.java:1280)
at org.teiid.query.sql.symbol.Function.acceptVisitor(Function.java:182)
at org.teiid.query.sql.visitor.SQLStringVisitor.getSQLString(SQLStringVisitor.java:164)
at
com.metamatrix.query.internal.ui.builder.util.LanguageObjectLabelProvider.getText(LanguageObjectLabelProvider.java:129)
I think the visit method for FUNCTION in SQLStringVisitor just needs to do a null check
on the first arg. I'm attaching a code patch.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira