[Mulgara-svn] r1942 - trunk/src/jar/querylang/java/org/mulgara/itql
pag at mulgara.org
pag at mulgara.org
Thu Apr 22 03:47:36 UTC 2010
Author: pag
Date: 2010-04-21 20:47:35 -0700 (Wed, 21 Apr 2010)
New Revision: 1942
Modified:
trunk/src/jar/querylang/java/org/mulgara/itql/TqlInterpreter.java
Log:
added some protection to code that can occasionally process a null command
Modified: trunk/src/jar/querylang/java/org/mulgara/itql/TqlInterpreter.java
===================================================================
--- trunk/src/jar/querylang/java/org/mulgara/itql/TqlInterpreter.java 2010-04-22 03:46:28 UTC (rev 1941)
+++ trunk/src/jar/querylang/java/org/mulgara/itql/TqlInterpreter.java 2010-04-22 03:47:35 UTC (rev 1942)
@@ -303,13 +303,17 @@
// this populates lastCommand
resetInterpreter();
commandTree.apply(this);
- lastCommand.setText(commandText);
-
- // take the lastCommand result, and add it to the list of results
- commandList.add(lastCommand);
+ if (lastCommand != null) {
+ lastCommand.setText(commandText);
+
+ // take the lastCommand result, and add it to the list of results
+ commandList.add(lastCommand);
+
+ if (logger.isDebugEnabled()) logger.debug("Successfully parsed command: " + command);
+ } else {
+ if (logger.isDebugEnabled()) logger.debug("Null parse: " + command);
+ }
- if (logger.isDebugEnabled()) logger.debug("Successfully parsed command " + command);
-
} catch (ParserException e) {
flush();
throw new MulgaraParserException(e);
More information about the Mulgara-svn
mailing list