Github user ajs6f commented on a diff in the pull request:

    https://github.com/apache/jena/pull/157#discussion_r71161082
  
    --- Diff: 
jena-arq/src/main/java/org/apache/jena/atlas/data/SortedDataBag.java ---
    @@ -69,19 +69,81 @@
         
         protected final ThresholdPolicy<E> policy;
         protected final SerializationFactory<E> serializationFactory;
    -    protected final Comparator<? super E> comparator;
    +    protected final CanAbortComparator comparator;
         
         protected boolean finishedAdding = false;
         protected boolean spilled = false;
         protected boolean closed = false;
    +    protected volatile boolean cancelled;
         
         public SortedDataBag(ThresholdPolicy<E> policy, 
SerializationFactory<E> serializerFactory, Comparator<? super E> comparator)
         {
             this.policy = policy;
             this.serializationFactory = serializerFactory;
    -        this.comparator = comparator;
    +        this.comparator = new CanAbortComparator(comparator);
         }
         
    +    private final class CanAbortComparator implements Comparator<E> 
    --- End diff --
    
    It might be worth breaking this out into its own compilation unit. In the 
current arrangement, this is not a `static` class, and I don't think it could 
be because it is picking up the type parameter from the enclosing class. That 
doesn't seem ideal.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to