Aklakan commented on code in PR #2882:
URL: https://github.com/apache/jena/pull/2882#discussion_r1879147178
##########
jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterPeek.java:
##########
@@ -25,27 +25,34 @@
public class QueryIterPeek extends QueryIter1
{
- private Binding binding = null ;
+ private Binding binding = null ;
private boolean closed = false ;
-
+
public static QueryIterPeek create(QueryIterator iterator,
ExecutionContext cxt)
{
if ( iterator instanceof QueryIterPeek)
return (QueryIterPeek)iterator ;
return new QueryIterPeek(iterator, cxt) ;
}
-
+
private QueryIterPeek(QueryIterator iterator, ExecutionContext cxt)
{
super(iterator, cxt) ;
}
/** Returns the next binding without moving on. Returns "null" for no
such element. */
- public Binding peek()
+ public Binding peek()
{
if ( closed ) return null ;
- if ( ! hasNextBinding() )
- return null ;
+ try {
+ if ( ! hasNextBinding() )
+ return null ;
+ } catch (Exception e) {
Review Comment:
I moved the try-catch block back to StageGeneratorGeneric because based on
my previous argument it would be the appropriate place.
--
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]