[Mulgara-svn] r1565 - trunk/src/jar/query/java/org/mulgara/query

pag at mulgara.org pag at mulgara.org
Sat Feb 28 07:03:48 UTC 2009


Author: pag
Date: 2009-02-27 23:03:47 -0800 (Fri, 27 Feb 2009)
New Revision: 1565

Modified:
   trunk/src/jar/query/java/org/mulgara/query/Query.java
Log:
Fixed a clone bug where an answer set to null can lead to an NPE. Patch by David Smith.

Modified: trunk/src/jar/query/java/org/mulgara/query/Query.java
===================================================================
--- trunk/src/jar/query/java/org/mulgara/query/Query.java	2009-02-28 02:17:13 UTC (rev 1564)
+++ trunk/src/jar/query/java/org/mulgara/query/Query.java	2009-02-28 07:03:47 UTC (rev 1565)
@@ -206,7 +206,9 @@
     this.orderList = query.orderList;
     this.limit = query.limit;
     this.offset = query.offset;
-    this.answer = (Answer)query.answer.clone();
+    if (query.answer != null) {
+      this.answer = (Answer)query.answer.clone();
+    }
     /*
       this(query.getVariableList(),
           query.getModelExpression(),




More information about the Mulgara-svn mailing list