Uploaded image for project: 'Commons Chain'
  1. Commons Chain
  2. CHAIN-40

ContextBase should use LinkedHashMap

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Base
    • None

    Description

      org.apache.commons.chain.impl.ContextBase should use java.util.LinkedHashMap (instead of java.util.HashMap) : as its superclass, and as the java.util.Map implementation for its "descriptors" attribute.
      Indeed LinkedHashMap allow "insertion-order" iteration over the context, which is an additional information about the chain execution (to know the order of the commands into the chain).
      Moreover LinkedHashMap is a HashMap : so this enhancement is "transparent" for users who didn't/don't/won't want to presume about context's iteration order.

      Thanks in advance.
      Cédric BODIN

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cbodin Cédric BODIN
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: