afs commented on code in PR #3603:
URL: https://github.com/apache/jena/pull/3603#discussion_r2549384391


##########
jena-arq/src/main/java/org/apache/jena/query/QueryCancelledException.java:
##########
@@ -22,4 +22,5 @@
 public class QueryCancelledException extends QueryExecException
 {
     public QueryCancelledException() {}
+    public QueryCancelledException(Throwable cause) { super(cause) ; }

Review Comment:
   This can be removed.
   
   The two uses are double wrapping a `QueryCancelledException`.



##########
jena-arq/src/test/java/org/apache/jena/sparql/api/TestQueryExecutionCancel.java:
##########
@@ -60,6 +56,9 @@
 import org.apache.jena.sparql.sse.SSE;
 import org.apache.jena.sparql.util.Context;
 import org.apache.jena.sparql.util.Symbol;
+import org.junit.jupiter.api.BeforeAll;

Review Comment:
   Would it be possible to keep the order?
   
   (In Eclispe, I have the import grouped to have the order `java`, `javax`, 
`com`, `org.junit` then all others. that tends to put jena ones in a block.)



##########
jena-geosparql/src/main/java/org/apache/jena/geosparql/implementation/access/AccessGeoSPARQL.java:
##########
@@ -229,4 +231,11 @@ private static boolean containsGeoLiterals(Graph graph, 
Node node) {
             graph.contains(node, Geo.AS_GML_NODE, null);
         return result;
     }
+
+    public static RuntimeException buildException(RuntimeException e) {
+        if (e instanceof QueryCancelledException e2) {
+            return new QueryCancelledException(e2);
+        }
+        return new RuntimeException(e);
+    }

Review Comment:
   See `QueryIterFailed`:
   
   ```suggestion
       protected static QueryExecException buildException(RuntimeException 
cause) {
           return switch(cause) {
               case QueryCancelledException ex -> ex;
               case QueryExecException ex -> ex;
               default -> new QueryExecException(cause);
           };
       }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to