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

Replace Context with Map<String, ? extends Object>

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.0
    • 2.0
    • None
    • None

    Description

      Hello,

      I always wandered why you force chain users to use the Context interface which adds nothing over Map. I would understand that if the Context would not inherit from map and only required

      Object put(String, Object)
      Object get(String)

      But since Context itself IS Map then you gain nothing while disallowing use of Map implementations. I know that sou suggest that Context shall implement "Attribute-Property Transparency" but it is only recomendation and is not forced by commons chains anyway.

      And if you define execute like

      Object execute(Map<String, ? extends Object> context)

      it can still accept Context instances and all its subclasses.

      The downside is that you would have to give up the retrieve method introduced to Context. And BTW the Context imposes hard restriction see my other bug.

      Attachments

        Activity

          People

            simone.tripodi Simone Tripodi
            alesd Ales Dolecek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: