Uploaded image for project: 'Metadata Aggregator'
  1. Metadata Aggregator
  2. MDA-207 review MDA API
  3. MDA-253

Stage should execute over a List, not a Collection

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.2
    • Fix Version/s: 0.10.0
    • Component/s: Pipeline
    • Labels:
      None

      Description

      Stage#execute takes a Collection<Item<T>> parameter. I don't recall any case in which it has ever made sense for the items in that collection not to be treated as ordered. I know that a lot of the real-word use cases would fail if the ArrayList that underlies the current implementation was replaced by, say, a HashSet.

      If we're actually assuming an ordered collection, we should probably make that explicit by changing that parameter to a List<Item<T>> instead.

      This will obviously affect a lot of classes, although not as many as you might think (many are written as subclasses of a base class that implements the iteration, and operate only on a single item at a time). Nevertheless, to make a simpler transition for downstream packages, it might be worth seeing whether the old method signature can be changed to a deprecated default implementation which performs a cast and a deprecation warning. This is probably not absolutely required, as I think most of the affected classes not within the MDA itself will be in the ukf-mda and inc-mda projects, which are in my care in any case. 

        Attachments

          Activity

            People

            Assignee:
            ian@iay.org.uk Ian Young
            Reporter:
            ian@iay.org.uk Ian Young
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: