Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Base
    • Labels:
      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

        Issue Links

          Activity

          Hide
          Benedikt Ritter added a comment -

          If CHAIN-101 is fixed, LinkedHashMap can be used as delegate for a ContextMap.

          Show
          Benedikt Ritter added a comment - If CHAIN-101 is fixed, LinkedHashMap can be used as delegate for a ContextMap.
          Hide
          Steve Westwood added a comment - - edited

          This issue is obsolete given the work in CHAIN-53 to accommodate JDK 1.5 and generics. Whereas the older version of ContextBase extended HashMap, this current trunk version uses ConcurrentHashMap.

          Suggest that this issue be closed.

          Show
          Steve Westwood added a comment - - edited This issue is obsolete given the work in CHAIN-53 to accommodate JDK 1.5 and generics. Whereas the older version of ContextBase extended HashMap, this current trunk version uses ConcurrentHashMap. Suggest that this issue be closed.
          Hide
          ori added a comment -

          There's additional overhead to using LinkedHashMap, HashMap is more efficient, especially if you're creating the Map on every request.

          Show
          ori added a comment - There's additional overhead to using LinkedHashMap, HashMap is more efficient, especially if you're creating the Map on every request.
          Hide
          Niall Pemberton added a comment -

          Requires moving Commons Chain to a mimimum of JDK 1.4

          Show
          Niall Pemberton added a comment - Requires moving Commons Chain to a mimimum of JDK 1.4

            People

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

              Dates

              • Created:
                Updated:

                Development