[Mulgara-svn] r892 - trunk/src/jar/tuples/java/org/mulgara/store/tuples

pag at mulgara.org pag at mulgara.org
Fri May 2 15:59:31 UTC 2008


Author: pag
Date: 2008-05-02 08:59:30 -0700 (Fri, 02 May 2008)
New Revision: 892

Modified:
   trunk/src/jar/tuples/java/org/mulgara/store/tuples/FilteredTuples.java
Log:
Errors during a filter test are now treated as a failing test.

Modified: trunk/src/jar/tuples/java/org/mulgara/store/tuples/FilteredTuples.java
===================================================================
--- trunk/src/jar/tuples/java/org/mulgara/store/tuples/FilteredTuples.java	2008-05-01 18:08:13 UTC (rev 891)
+++ trunk/src/jar/tuples/java/org/mulgara/store/tuples/FilteredTuples.java	2008-05-02 15:59:30 UTC (rev 892)
@@ -158,17 +158,13 @@
    * @throws TuplesException {@inheritDoc}
    */
   public boolean next() throws TuplesException {
-    try {
-      do {
-        // move to the next on the unfiltered
-        boolean currentNext = unfiltered.next();
-        // Short-circuit execution if this tuples' cursor is after the last row
-        if (!currentNext) return false;
-        // check if the filter passes the current row on the unfiltered
-      } while (!testFilter());
-    } catch (QueryException qe) {
-      throw new TuplesException("Unable to iterate to the next tuples element while filtering", qe);
-    }
+    do {
+      // move to the next on the unfiltered
+      boolean currentNext = unfiltered.next();
+      // Short-circuit execution if this tuples' cursor is after the last row
+      if (!currentNext) return false;
+      // check if the filter passes the current row on the unfiltered
+    } while (!testFilter());
 
     return true;
   }
@@ -214,9 +210,13 @@
    * @return The test result.
    * @throws QueryException If there was an error accessing data needed for the test.
    */
-  private boolean testFilter() throws QueryException {
+  private boolean testFilter() {
     // re-root the filter expression to this Tuples
     filter.setContextOwner(this);
-    return filter.test(context);
+    try {
+      return filter.test(context);
+    } catch (QueryException qe) {
+      return false;
+    }
   }
 }




More information about the Mulgara-svn mailing list